hi to all,
i want to write bootloader in c++. can i write ?
Can i write bootloader in C++
- smiddy
- Member
- Posts: 127
- Joined: Sun Oct 24, 2004 11:00 pm
- Location: In my cube, like a good leming. ;-)
Re: Can i write bootloader in C++
It would probably be more difficult to write one in C++ than to learn ASM and write a simple one. I say this because I think you would have to make certain you don't use any libraries that rely on a specific OS as an interface, you would have to tell the compiler to compile the code in a flat manner (i.e. from start to finish without reorganizing things), you may have to write your own libraries for BIOS useage. And lastly, you would probably need to use in-line ASM anyhow which comes back to my first assertion, if you're going to use ASM anyhow, why not just write the plain ASM?
Mileage may very though according to who you ask.
Mileage may very though according to who you ask.
-smiddy
-
- Member
- Posts: 144
- Joined: Tue Oct 26, 2004 11:00 pm
- Location: Australia
Re: Can i write bootloader in C++
It might be possible if you use a 16-bit compiler like Turbo C V1.
This compiler is pretty much a straight compiler..no optimisation or fancy features and I'm pretty sure the linker supports flat output. If you don't use any header files it might be possible...no promises though
This compiler is pretty much a straight compiler..no optimisation or fancy features and I'm pretty sure the linker supports flat output. If you don't use any header files it might be possible...no promises though
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
--- Albert Einstein