• 0

Help to write Micro Kernel using C


Question

Hi,
Is this possible to write a Micro kernel using c, Yeah we can write it using assembly but just curious.
Also please refer me to some micro kernel programming tutorials and guides. Thank You :)

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Sure it's possible. C is essentially just a portable assembler?

 

You may need a few lines of code to initialize your C code (aka the stuff that happens before main gets called), but that's it.

Link to comment
Share on other sites

  • 0

Yup this is basically what C was invented for originally. It is a systems programming language after all :)

 

You will need a little (inline) asm for a couple of things but over 99% can be done in C. The Linux kernel is mostly C for example (although the Linux kernel is monolithic not micro, perhaps a better example is the GNU Hurd kernel as it is a micro kernel written in asm/C http://en.wikipedia.org/wiki/Hurd )

Link to comment
Share on other sites

  • 0

Another existing OS kernel you could consider looking at is ReactOS. Unlike Hurd or Minix, it is not a true microkernel. ReactOS shares the same architecture as Windows NT, so it is a hybrid kernel. However, unlike virtually every other open-source operating system, ReactOS can be compiled on Windows - a huge advantage considering the primary focus of the Neowin community. In fact, the project has a full development/debug environment, ROSBE, which they built specifically for that purpose. Take a look at the ReactOS Development Guide and Development Wiki before checking out a copy of the source code to look at the kernel. Although their kernel still has some hacks in place, particularly in the memory manager, it is fairly stable and very well documented.

Link to comment
Share on other sites

This topic is now closed to further replies.