Date: Mon, 21 Aug 2000 14:41:28 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp AT delorie DOT com Message-Id: <4331-Mon21Aug2000144127+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.2.emacs20_6 I) and Blat ver 1.8.5b In-reply-to: <8nqvcn$9a10a$1@ID-33463.news.cis.dfn.de> (marksmanANTISPAM AT adr DOT dk) Subject: Re: How do I customize libc for custom OS? References: <8nqvcn$9a10a$1 AT ID-33463 DOT news DOT cis DOT dfn DOT de> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "Tobias Skytte" > 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.