tags:

views:

394

answers:

8

what is a way to create a my own operating system using c++. I have been created boot loader (using nasm,qemu) but I haven't knowledge to add an kernel to this boot loader.

+7  A: 

Here's a ton of information that you'll eventually need, the dreaded OS programming FAQ.

Kornel Kisielewicz
+3  A: 

You may consider looking at MINIX which is a small operating system for x86 systems. It was originally designed as a teaching project and has evolved into something that's intended to be useful in the real world.

Greg Hewgill
+1  A: 

you can take a look at minix 3 source code. it's a very simple os, created with the purpose of understand how operative sistem works.

you can also study all the tanenbaum book about os. they are all very complete and I remember that one book has the complete source of minix attached and commented

Alex
+5  A: 

Also to add, This book by tenenbaum, where he explains the implementation details of minix.

Neeraj
+1: I have that book, and was going to suggest the same. Even if you don't end up using the same concepts as Tanenbaum, at least you'll know what those concepts are!
Kaz Dragon
Excellent book...enjoyable read ;)
tommieb75
+2  A: 

I am not familiar with details, but by my knowledge BeOS was written in C++. Sources should be freeley available as well as the documentation.

RED SOFT ADAIR
For the kernel you can look at http://newos.org/ (written an ex-Be employee *and* being used by http://haiku-os.org/ for their Be clone).
Max Lybbert
+1  A: 

Tutorials and Articles for OS developers.

Vijay Mathew
+1  A: 

Be careful, C++ is pretty heavyweight for an OS kernel.

  • There are services like exceptions that you'll have to support with a runtime library.
  • It won't feel like C++ until you add a heap.
  • Kernels are very sensitive to where objects are allocated; the one-heap model usually used in C++ isn't really suitable.
  • Coupling APIs to data structures is a bad idea. BeOS had problems with this. You need to hide the size of your internal structures from users, and that means APIs can't be member functions.

It sounds like you're already further along than most, so keep asking questions and you'll probably end up somewhere nice! :vD

Potatoswatter
A: 

For a C++ operating system, you may want to look at NewOS or UnixLite.

Max Lybbert