-2

I am trying to make an my own OS. This is for educational purpose only, so that I get to understand the internals as well as get a good idea of low level programming. I have some prior application development experience in C#/python/C++/C. I am a noob in assembly language(very less experience and knowledge). I understand that in writing an operating system,we can't go without assembly language.

Currently, I have just printed a string in assembly language in the boot sector using qemu and BIOS interrupts.
What I want is that, can someone specifically point out the steps that I need to follow to make my operating systems run C programs. So that, I can start writing my OS in C.
Any other piece of advice to help a newbie, regarding the same is also welcome.

Although, I have looked into many os development related tutorials/websites, I can't seem to find this information anywhere.

3

1 Answer 1

2

First, you cannot write entirely an operating system kernel in C, because by definition an OS is managing physical hardware resources, and some of them (at least on common hardware like x86) are not accessible in C (e.g. MMU, I/O ports, ...). So you'll need a little assembly. (perhaps most of them can be asm instructions inside C functions).

Then, look at OsDev, it gives you a lot of information about how to start.

You'll also learn a lot by extending existing free software OS: in particular, understanding how to write your own Linux kernel modules and drivers will teach you a lot. See http://kernelnewbies.org/

Not the answer you're looking for? Browse other questions tagged or ask your own question.