tb0106.pp 476 B

12345678910111213141516171819202122232425
  1. { %CPU=i386 }
  2. { Old file: tbs0124b.pp }
  3. { }
  4. {$asmmode intel}
  5. var
  6. i : byte;
  7. l : array[0..7] of longint;
  8. begin
  9. { problem here is that l is replaced by BP-offset }
  10. { relative to stack, and the parser thinks all wrong }
  11. { because of this. }
  12. for i:=0 to 7 do
  13. l[i]:=35;
  14. asm
  15. mov eax,3
  16. mov l[eax*4],55
  17. end;
  18. if l[3]<>55 then
  19. begin
  20. Writeln('Error in parsing assembler');
  21. Halt(1);
  22. end;
  23. end.