blob: e0879f1cc39852140eeefa62aa882a0bec31f8fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
{ %OPT=-O3 }
// Compiled with option -O3 for Win32-I386
type
PWordArray = ^TWordArray;
TWordArray = array [0..1023]of Word;
WordRec = packed record
LoByte,HiByte:Byte
end;
var
Buffer:TWordArray;
OldMousePos:LongInt = 0;
ScreenBuffer:Pointer = @Buffer;
procedure Show(ScreenBuffer:Pointer);
begin
WordRec(PWordArray(ScreenBuffer)^[OldMousePos]).HiByte:=(not
WordRec(PWordArray(ScreenBuffer)^[OldMousePos]).HiByte)and $7F
// he forgets to write the result into the array
end;
begin
Buffer[0]:=$0000;
Show(ScreenBuffer);
if Buffer[0]<>$7F00 then
halt(1);
writeln('ok');
end.
|