Mail Archives: djgpp/2000/08/22/13:50:22
> From: "Tobias Skytte" <marksmanANTISPAM AT adr DOT dk>
> Newsgroups: comp.os.msdos.djgpp
> Date: Tue, 22 Aug 2000 15:01:53 +0200
>
> ok. whew, looks like alot of work!
You didn't think that porting a large library to a new OS would be a
piece of cake, did you? ;-)
> maybe I could merely change the __dpmi_int and int86 functions?
I doubt that: the functions which call __dpmi_int ``know'' quite a bit
about DOS, its functions, and its idiosyncrasies. Making them work
with another OS will require more than just replacing __dpmi_int.
For example, the values you load into the registers before calling Int
21h, the error codes you anticipate, and the bugs in the OS that you
work around---all these need changing for a different OS.
> the crt0.S scares me, as I am not that good with assembler (especially not
> att syntax). Is there any documentation available that explains what this
> code does? I have no idea what exactly it does...
See http://www.delorie.com/djgpp/doc/eli-m17n99.html#Startup, I think
it provides some overview of what crt0.S does. Beyond that, you have
the comments in the code, and you can ask specific questions here.
> Maybe most of it can just be taken out since its mostly for dpmi?
> what would happen if crt0.S contains nothing?
The DPMI-specific parts should be taken out, but you need to replace
them with the equivalent code for your OS. A program cannot run
unless you set up its data, code, and stack, and build the run-time
environment that a C program expects (the argv[] array, the standard
handles, etc.)
- Raw text -