tb0319.pp 524 B

1234567891011121314151617181920212223242526272829303132333435
  1. { %CPU=i386 }
  2. {$asmmode att}
  3. const
  4. Count=100;
  5. type
  6. trec=record
  7. a,b,c : longint;
  8. end;
  9. var
  10. r : trec;
  11. begin
  12. asm
  13. leal r,%edi
  14. leal r,%esi
  15. movl %es:46(%edi),%eax
  16. movl 2+trec.b(%esi),%eax
  17. movl $1,%ebx
  18. movl trec.b(%esi,%ebx,(2*4)),%eax
  19. movl r(,%ebx,(2*4)),%eax
  20. xorl %esi,%esi
  21. movl r.c(,%esi,(2*4)),%eax
  22. movl Count,%eax
  23. movl Count*100,%eax
  24. movl trec.b+2,%eax
  25. leal r,%esi
  26. movl trec.b+2(%esi),%eax
  27. {$ifdef go32v2}
  28. movl %fs:(0x46c),%eax
  29. {$endif}
  30. end;
  31. end.