tbs0124b.pp 431 B

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