Nwaiwu Gilbert
Nwaiwu Gilbert

Reputation: 163

using "mixed code" for bootloaders

I have a question concerning the use of something I came across when reading on bootloadels. Someone mentioned the use of "mixed code" when writing bootloaders. I've looked around the net but couldn't find any concrete info on how to implement the concept. I'm trying to make a simple(as simple as it can be) os that just allows me to access and modify data on a hard disk. Just a filesystem is all I need. I would like someone to tell me what I need to know in order to make this os and also if the "mixed code" concept relevant in this case. Thank you. NOTE: this is not a question of opinion. I'm not looking for the best way just any approach to solving this problem.

Upvotes: 0

Views: 125

Answers (1)

maxdev
maxdev

Reputation: 2566

"Mixed code" in this context means for example using inline assembler code inside your C++ code. To use this, your compiler must support the inline usage of the desired language, it is not a question of your implementation.

There is some required knowledge before developing your own kernel. Once you are familiar with the basic concepts, you could either start (as TheCodeArtist mentioned) writing your own bootloader or using an existing bootloader like GRUB. The OsDev forums and wiki are a great starting point and provide lots of information. Extensive knowledge about how the x86 CPU works, what compilers do, calling conventions etc. is recommended.

If you want to write a "simple OS" and expect it to be done in just a few hours, you should rather consider using an existing kernel and modify it the way you want.

Upvotes: 1

Related Questions