FreePascal Aros

Posted by ALB42 on 7. Mai 2011No Comments

I ported Freepascal 2.5.1 to Aros, already working rather nicely. But today i noticed that EVERYTHING crash if the AROS memory area is above the LongInt limit. In the beginning I thought it is a casting problem (Pointer to Longint and Calculation with this Values, but who do such stupid things).

But then i noticed there is a rather strange thing in Amiga style OS , BPTR and BSTR, pointer which doesn’t keep the address, but the address divided by eight :O. So far ok… if we use this BPTR as a THandle (Which is a LongInt) then there is no problem (Address can never be too large ;)) Now follows the Problem: At AROS in non-binary-compatible mode the BTR are just simple Pointers!!! so they can be negative (when casted to LongInt/THandle)…. and there were some places in the Code checking for negative Handle (=Error) … What a strange bug.

Today i also updated to last SVN again.. some conflicts but nothing really bad, everything still works, now i will try to submit this as a patch to the freepascal developer, i hope its ok as it is 🙂

With help of ‘mazze’ of Aros forum I was able to write my first own program with a working MUI gui.

I think its the better choice for LCL/Lazarus, I started with Gadtools, but the numbers of available components is VERY limited.  I would have to program most things by myself. So next week/weekend i will try to implement a little bit MUI to LCL

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.