Mail Archives: djgpp/1999/05/04/13:19:40
From: | "Christopher Nelson" <paradox AT gye DOT satnet DOT net>
|
To: | <djgpp AT delorie DOT com>
|
Subject: | Re: Operating System Development
|
Date: | Tue, 4 May 1999 09:09:42 -0600
|
Message-ID: | <01be9640$232ede20$LocalHost@thendren>
|
MIME-Version: | 1.0
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Mailer: | Microsoft Outlook Express 4.71.1712.3
|
X-MimeOLE: | Produced By Microsoft MimeOLE V4.71.1712.3
|
Reply-To: | djgpp AT delorie DOT com
|
>I'm beginning to work on a new operating system for Intel 80386 or higher.
>I had planned to use DJGPP and NASM to do this, but it appears that DJGPP
>outputs DOS dependant code. Is there anyway around this? Is there another
>C compiler to use?
DJGPP doesn't output DOS-dependent code, what it outputs is 32-bit,
protected mode instruction. ld links that code with a stub, thus making the
executable DOS-dependant.
there are two very important things to note here:
#1 if you are writing a bootloader it must be 16-bit. it must also by a
flat image. if you don't know what those two things mean/are you need to do
a bit of research.
#2 the code image is inside the .o files produced from gcc -c -o <output>
<source>. if you wish to get to them you must either write your own program
to do it (it's not hard) or get JLOC from John Fine's page. i forget the
exact URL. you CAN do it with ld, but it's a major pain. it's easier to do
it with JLOC or even write your own.
please remember that you cannot use libc until you port the low-level
functions to your operating system.
-={C}=-
- Raw text -