Author Topic: FPC 3.2.2 OS/2 RTL Tests  (Read 4375 times)


  • New member
  • *
  • Posts: 5
FPC 3.2.2 OS/2 RTL Tests
« on: November 01, 2021, 07:21:41 pm »
Went over the tests under pp\source\rtl\os2\tests... Here are my findings, anyone interested ? Could fix most of them (but not everything is very useful IMHO).

basicpm.pas: insert {$APPTYPE GUI}

calc_e.pas: FAILS a.o. on "fixed" => change 1st fixed into real, 2nd one into nothing and OK.

heapsize.pas: breaks on ___SYSCAL and _A and gives warnings
remove the _ in front of A so _A > A
only syscall errors left and 2 warnings
change movl: movl: 2 times: %ax > %eax }; this removes two warnings
Finally: after finding ports.pas in rtl os2: can add syscall as follows:
procedure syscall; external name '___SYSCALL';
and in asm:
call syscall
now it runs again with different numbers as output:

helloos2.pas: Fix: comment out all lines with:
  • MemAvail
  • MaxAvail
  • Heaporg
  • Heapend
so uncommenting these makes the program work....

modeinfo.pas: I only need this to get started: note the T after var mode:
program modeinfo;
uses viocalls;
var mode:Tviomodeinfo;

o2rtlb1.pas: OK but don’t use unit crt!!!! If you do: program hangs on readln(number)

pmdemo1.pp: Issues; insert {$APPTYPE GUI}
pmdemo1.rc file: add: C-comment end delimiter at end
rc -r pmdemo1.rc
fpc pmdemo1
Note that I had to use rc, not wrc, a bit strange.

Now with zip file attached..
« Last Edit: November 02, 2021, 09:27:50 am by ghr »


  • Hero Member
  • *****
  • Posts: 4765
  • Compiler Developer
Re: FPC 3.2.2 OS/2 RTL Tests
« Reply #1 on: November 02, 2021, 01:40:46 pm »
Best to report them on GitLab with patches or a merge request.


TinyPortal © 2005-2018