Browse Source

* fixed test program - bug #40072

Tomas Hajny 2 years ago
parent
commit
c631d86122
1 changed files with 29 additions and 0 deletions
  1. 29 0
      rtl/emx/tests/heapsize.pas

+ 29 - 0
rtl/emx/tests/heapsize.pas

@@ -0,0 +1,29 @@
+program heapsize;
+
+{$AsmMode ATT}
+
+procedure syscall; external name '___SYSCALL';
+
+var a:longint;
+
+procedure writeheapsize;
+
+begin
+    asm
+        movl $0x7f00,%eax
+        xorl %edx,%edx
+        call syscall       
+        mov %eax,A
+    end;
+    writeln(a);
+end;
+
+begin
+    writeheapsize;
+    asm
+        movl $0x7f00,%eax
+        movl $327680,%edx
+        call syscall
+    end;
+    writeheapsize;
+end.