how to write a bootable program?

i want to write a bootable c/c++ Hello World.
how can i do that?
As far as I know, you would need to write it in assembly. Google "Bootloader" and visit sites like OSDev.
There is no such thing as a bootable program. You'll have to create a small OS that boots, and then writes "Hello World" to the screen. At that point it's not really C or C++, it's in assembly since that's all the hardware can understand until you have a MUCH more complicated OS loaded.

You can check this out: http://mikeos.berlios.de/write-your-own-os.html

Keep in mind that you'll also have to store your mini OS/program on the MBR of the PCs main drive since that's where most PC BIOS's are hardwired to look for an OS unless it's specifically configured.

And I have to ask. What the heck do you want something like this for???
Topic archived. No new replies allowed.