mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-28 15:27:47 +02:00
23 lines
439 B
ObjectPascal
23 lines
439 B
ObjectPascal
{ Old file: tbs0227.pp }
|
|
{ external var does strange things when declared in localsymtable OK 0.99.11 (PFV) }
|
|
|
|
function getheapsize:longint;assembler;
|
|
var
|
|
heapsize : longint;external name 'HEAPSIZE';
|
|
// sbrk : longint;external name '___sbrk';
|
|
asm
|
|
{$ifdef CPUI386}
|
|
movl HEAPSIZE,%eax
|
|
end ['EAX'];
|
|
{$endif CPUI386}
|
|
{$ifdef CPU68K}
|
|
move.l HEAPSIZE,d0
|
|
end ['D0'];
|
|
{$endif CPU68K}
|
|
|
|
|
|
begin
|
|
writeln(getheapsize);
|
|
end.
|
|
|