Hi everyone,
I have currently written my own bootloader much like the one on the tutorials here. The tutorials on here for writing a bootloader were very helpful for understanding the gdt and enabling of A20. However the tutorials here only explain MSVC++ do not explain how to use gcc (cywin or djgpp) to compile and link to load the image at the 1 meg mark. My current bootloader can load an image at 0x100000 but of course the simple kernel I currently load is written in asm and is assembled in pure binary making it easy to load at the 1 meg. I was trying to figure out how I could load a simple kernel (that just puts text to the monitor) I wrote in c to compile and link so it would run at 0x100000. Any tutorial I have seen says to use grub to load the image. I would like to use my own bootloader to load the image. I guess I am looking for a better explanation on what format I should compile and link in, like pe or elf, and how I would have to load that image.
Thanks,
I hope I have explained what I am looking for good enough.
loading a simple c kernel
Moderator:Moderators
Re: loading a simple c kernel
Sorry, I think you may have to use MSVC++. I looked for GCC but he said he hasn't got around to the tutorial yet. MSVC is much more customizable, but often confusing.
Re: loading a simple c kernel
I suggest you read http://wiki.osdev.org/C_PlusPlus
It contains the relevent setup code to get both GCC and MSCV working.
Hope it helps
~Andrew
It contains the relevent setup code to get both GCC and MSCV working.
Hope it helps
~Andrew

Re: loading a simple c kernel
Andyhhp wrote:I suggest you read http://wiki.osdev.org/C_PlusPlus
It contains the relevent setup code to get both GCC and MSCV working.
Hope it helps
~Andrew
Thank you I will read through that.
Re: loading a simple c kernel
In this tutorial you find own bootloader:I would like to use my own bootloader to load the image.
http://www.henkessoft.de/OS_Dev/OS_Dev1.htm
-
- Posts:1
- Joined:Fri Oct 01, 2010 11:31 pm
Re: loading a simple c kernel
I was wondering could anyone be so kind and translate this article, in English? It is a good resource, but I don't know German. Or maybe some knows anything close to this that is similar? Thanks!