fpc/tests/webtbs/tw0797a.pp
Jonas Maebe 4512eede06 * don't use (non-volatile) ebx in assembler routine
git-svn-id: trunk@9193 -
2007-11-11 16:11:32 +00:00

28 lines
341 B
ObjectPascal

{ %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.