summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw0797a.pp
blob: 1631b8611dbda35780d5bd945803c4fb022743c2 (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
{ %CPU=i386 }
program test;
{$INLINE ON}
{$ASMMODE ATT}

var
  j : longint;

  procedure Tst(var j : longint); assembler;inline;
  var
    i : longint;
  asm
    movl j,%ecx
    movl (%ecx),%eax
    movl $5,i
    addl i,%eax
    movl %eax,(%ecx)
  end;

begin
   j:=5;
   Tst(j);
   if (j<>10) then
     begin
       halt(1);
     end;
end.