tb0106.pp 462 B

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