Q:

Writing an operating system in C++

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. 

A:

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

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 jumping through hoops (Pimpl, private constructor, virtual functions) when APIs are 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

A:

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

