Mail Archives: djgpp/2000/08/21/09:13:59
> From: "Tobias Skytte" <marksmanANTISPAM AT adr DOT dk>
> Newsgroups: comp.os.msdos.djgpp
> Date: Mon, 21 Aug 2000 11:38:45 +0200
>
> I have just downloaded DJGPP, read the FAQ and some of the docs, I am new to
> C but experienced in Pascal (is that a bad word in this group? :-) )
> Basically I am writing a custom OS for i386+ in pmode, and I currently can't
> decide wether to use DJGPP or FreePascal (FPK). Now, one of the deciding
> factors is going to be: how easy is it to customise the compiler (libc in
> DJGPP, RTL in FPK) to work with a currently non-existing os (mine).?
I don't know anything about FPK; what's below relates to DJGPP only.
You need to replace the low-level library functions which interface
with the OS. Basically, search for all the occurences of __dpmi_int
and int86, and you will find these functions.
The library startup code (crt0.S) will have to be rewritten as well,
since it is tailored to the DPMI environment. Exception-handling
code, which is also the basis for signal support, will also need to be
reviewed.
If you want debug support, the functions in src/debug/common will also
have to be rewritten.
> Also: If someone could show me the compiler switches to compile a MZ EXE (my
> kernel will be in this format) without having the stub program
There are no switches for that; GCC and GNU Binutils don't support DOS
EXE format directly. You might want to consider using the Windows PE
format, which *is* supported by GNU Binutils.
> Or how to make a straight binary (i.e. non-relicateable) which is
> another option for my kernel to be in.
You might try the binary format supported by Binutils.
- Raw text -