Writing OS code

jj1984

Member
Hello,

When writing kernels and OSes in general, whether it be in assembly or something higher level, you need to assemble or compile your code in flat binary, right?

You can't assemble it or compile it to anything like ELF format or anything like that, right?

If you did, the processor would misinterpret the formatting as code and start executing unintended instructions.

After all, you format executable binaries so that the OS knows where code and date segments start and stop and then can load them into the GDT and add them to the paging structures.

But if the program you're writing actually is an OS, then it won't running over an OS like a user app will as it IS the OS, right?

That is, the OS runs on the metal, not over any other software.

Am I correct here?
 
Top