Viking
Joined: 29 Sep 2006
Posts: 42
Location: Sweden
Posted: Fri May 04, 2007 9:10 pm
Aha, only from ramdisk first. That's ok.
My work with the lx loader has finally been able to run a very small lx exe file.
It works as this: it's given an filename which it loads in the virtual memory (allocated with mmap). Makes fixups
to the code (only one supported now, a fixup called 32-bit self relative pointer) and runs it in the same function
as main(some assembler used, save registers and call the lx exe main). No threads is used.
The exe file calls one Doscall and the only supported is "DosPutMessage". I have put the DosPutMessage in a shared
library "libmsg.so", that was the only way to get it to work.
I am going to clean up the code a bit and add some comments to make it easier to follow.
Some links which have been of help is:
http://pages.prodigy.net/michaln/os2/os2mini.html
http://lafaix.online.fr/os2/contest.html
/Viking