Could someone guide me on what path/steps to take to create a simple bootable hello world program? I have the basic knowledge of C/C++.
My aim is to create a very simple OS.
I would like as much relevant links to references and samples as possible.
As far as I know, you cannot write bootloader in C. That is because, C needs you to work in a 32-bit protected mode while in bootloader some portions are in 16-bit mode. There are C compilers that will generate 16-bit code. Openwatcom, SmallerC, Bruce's C compiler.
See this. It's a tutorial for a very basic boot loader. It doesn't have much to do with C/C++, but it has some really good information on the basic building blocks of a bootloader.
If you're really curious about the building blocks, there are more in-depth resources in the form of textbooks. This tutorial, for instance, doesn't explain why the boot loader must end with 55 AA
. In addition, it's relatively narrow.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With