summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw3274.pp
blob: 5b3e07d69726ce52f2f0aef68f0a17d262dc24cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ %cpu=i386 }
{ %opt=-Cg- }

{ Source provided for Free Pascal Bug Report 3274 }
{ Submitted by "Frank Kintrup" on  2004-08-27 }
{ e-mail: frank.kintrup@gmx.de }
{$MODE Delphi}
{$ASMMODE Intel}

var
  X : Integer;
  B : byte;
begin
   X:=10;
   asm
        LEA  ESI, X
        MOV  AL, Byte([ESI])
        MOV  B, AL
   end;
   writeln(b);
   if b<>10 then
     halt(1);
end.