Writing A Kernel In C++
Writing A Kernel In C++
Hey, could someone please give me a hand? I'm trying to work on a Kernel / Operating System completely built in C++. Apparently this isn't something people seem to want to do so there are very little resources I have found on this. So far, I've been working on just converting C to C++ ( I know both pretty well ), but I have to have C++ for the my operating system ( the objects ).
Re: Writing A Kernel In C++
Well, you can't write an entire OS in C++ because the bootsector(the part that loads your OS into memory) has to be written in assembly to work.
K.J.
K.J.
Re: Writing A Kernel In C++
Yes, I am aware of that fact.
I was just meaning that rather than using C or JAVA, I'm writing it all in C++ ( where I can ). I know I need ASM and I have what i need there I think. Also, I just use GRUB, which handles everything I need quite nicely with very little editing of any kind
I was just meaning that rather than using C or JAVA, I'm writing it all in C++ ( where I can ). I know I need ASM and I have what i need there I think. Also, I just use GRUB, which handles everything I need quite nicely with very little editing of any kind
Re: Writing A Kernel In C++
When you need asm you8 can use inline asm(this is for the kernel). And now what do you want to know techniques for kernels and kernel algorythms or just an example?
Re: Writing A Kernel In C++
Actually, I was REALLY wanting like techniques and what-not, but I'll take an example if that's all I can get -- but the example has to WORK in the first place though. It's hard to learn something when the example doesn't even work ( By work, I mean if I compiled it the way they want me to or whatever it boots without problem ).
Thanks!
Thanks!
Re: Writing A Kernel In C++
You should check out df's FAQ for some info on making kernels in C++ if you haven't yet:
http://www.mega-tokyo.com/os/os-faq-cpp.html#start
K.J.
http://www.mega-tokyo.com/os/os-faq-cpp.html#start
K.J.
Re: Writing A Kernel In C++
It would help you, if you know how the C++ run time library works, look up, for example, the implementation of new and delete!
Re: Writing A Kernel In C++
Ok, but what about techniques & stuff from other sites than this? I've already seen that OSFAQ and it did somewhat help -- but I'm unsure as to the way to actually PROGRAM the OS in C++. C++ uses a lot of objects & object-oriented commands, so I'm wondering what way is the best to go about creating the necessary objects & the OS as an object + the Filesystem in a secure & fast manner.
Please, just post up links & suggestions, I'm aware that I have to use ASM and I'm learning NASM for that. I'm also in the processes of learning development library creation & streaming in C++, so I'll be able to impliment those things.
Thanks
Please, just post up links & suggestions, I'm aware that I have to use ASM and I'm learning NASM for that. I'm also in the processes of learning development library creation & streaming in C++, so I'll be able to impliment those things.
Thanks