Hello Everyone I Have Been Learning C++ For The Past 1 Year :D , So With This Much Experience Can I Make or Modify A Bootloader in C++ Paradon Me For My Bad English
Any Replies Would Be Greatly Appretiated

Recommended Answers

All 3 Replies

Can you write assembly programs? if yes, then you should probably read this. Your understanding of computer architecture will be of help to you, too.

You really can't write a boot-loader in C++, at least not entirely; the first stage, at the very least, would have to be in assembly language, and given that most C++ compilers produce only 32-bit code, you'd probably have to set the system into 32-bit protected mode before you could even run a C++ program. Even with a 16-bit compiler, you'd be limited to the very core of the language, and have to avoid any libraries you hadn't implemented yourself. Even the core C++ has features which require run-time support (e.g., memory management), making it a difficult language to do systems programming in compared to its parent language, C (which has very minimal run-time requirements, having been designed for the purpose of OS implementation).

All in all, one year of C++ with no experience in assembly and C is unlikely to be enough for this purpose. At the very least, you'll need to learn assembly language for the assembler of your choice (even for the same system, every assembler has a different syntax - the three most common x86 assemblers used for this purpose are MASM, NASM and gas), as well as understanding the boot loading process well enough to write the loader.

You may want to review the information and advice at the OS Dev Wiki, as it covers the requirements of a boot loader. You might also consider using an existing bootloader such as GRUB, which will allow you to start directly into an OS which could indeed be written in C++ (with a great deal of effort).

Thank You All For The Reply !!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.