tw0961.pp 433 B

1234567891011121314151617181920212223242526272829303132
  1. { older ppc386 only define cpu86 }
  2. {$ifdef cpu86}
  3. {$define cpui386}
  4. {$endif cpu86}
  5. var
  6. x,y : byte;
  7. z : longint;
  8. {$asmmode intel}
  9. procedure test(var x : byte);
  10. begin
  11. x:=5;
  12. {$ifdef cpui386}
  13. asm
  14. mov edi,$12345678
  15. mov edi,x
  16. mov dword ptr [edi],78
  17. end;
  18. {$else cpui386}
  19. x:=$78;
  20. {$endif cpui386}
  21. end;
  22. begin
  23. x:=34;
  24. test(x);
  25. if x<>78 then
  26. begin
  27. Writeln('Problem !!');
  28. Halt(1);
  29. end;
  30. end.