heapsize.pas 339 B

12345678910111213141516171819202122232425
  1. program heapsize;
  2. var a:longint;
  3. procedure writeheapsize;
  4. begin
  5. asm
  6. movl $0x7f00,%ax
  7. xorl %edx,%edx
  8. call ___syscall
  9. mov %eax,_A
  10. end;
  11. writeln(a);
  12. end;
  13. begin
  14. writeheapsize;
  15. asm
  16. movl $0x7f00,%ax
  17. movl $327680,%edx
  18. call ___syscall
  19. end;
  20. writeheapsize;
  21. end.