tb0193.pp 439 B

12345678910111213141516171819202122
  1. { Old file: tbs0227.pp }
  2. { external var does strange things when declared in localsymtable OK 0.99.11 (PFV) }
  3. function getheapsize:longint;assembler;
  4. var
  5. heapsize : longint;external name 'HEAPSIZE';
  6. // sbrk : longint;external name '___sbrk';
  7. asm
  8. {$ifdef CPUI386}
  9. movl HEAPSIZE,%eax
  10. end ['EAX'];
  11. {$endif CPUI386}
  12. {$ifdef CPU68K}
  13. move.l HEAPSIZE,d0
  14. end ['D0'];
  15. {$endif CPU68K}
  16. begin
  17. writeln(getheapsize);
  18. end.