blob: b9fefcacc75b3488758a1543d68289a682fd8828 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
{ %opt=-Cg- }
{ %cpu=i386 }
{$asmmode intel}
var
a: array[0..3] of byte;
l: longint;
begin
a[0]:=1;
a[1]:=2;
a[2]:=3;
a[2]:=4;
asm
lea ecx,[a]
inc ecx
movzx eax, byte ptr[ecx-1+1] // bug in this line (-2)
mov [l],eax
end;
if l<>2 then
halt(1);
end.
|