mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-02 20:50:57 +01:00
* fixed test program - bug #40072
This commit is contained in:
parent
c631d86122
commit
092bc17cb2
29
rtl/emx/tests/helloos2.pas
Normal file
29
rtl/emx/tests/helloos2.pas
Normal file
@ -0,0 +1,29 @@
|
||||
program HelloOS2;
|
||||
|
||||
var A,B: ^word;
|
||||
|
||||
begin
|
||||
WriteLn ('Hello World.');
|
||||
case os_mode of
|
||||
osDOS: WriteLn ('Running under DOS.');
|
||||
osDPMI: WriteLn ('Running under DPMI (RSX extender).');
|
||||
else WriteLn ('Running under OS/2.');
|
||||
end;
|
||||
{
|
||||
WriteLn ('Free memory: ', MemAvail);
|
||||
WriteLn ('Largest block: ', MaxAvail);
|
||||
WriteLn ('Heap start: ',longint(heaporg));
|
||||
WriteLn ('Heap end: ',longint(heapend));
|
||||
}
|
||||
WriteLn ('Memory allocation.');
|
||||
GetMem (A, 1000);
|
||||
GetMem (B, 2000);
|
||||
A^ := 2;
|
||||
B^ := 10;
|
||||
{
|
||||
WriteLn ('Free memory: ', MemAvail);
|
||||
WriteLn ('Largest block: ', MaxAvail);
|
||||
}
|
||||
FreeMem (A, 1000);
|
||||
FreeMem (B, 2000);
|
||||
end.
|
||||
Loading…
Reference in New Issue
Block a user