Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
hi, im a teenager programmer.
i'm interested to learm os programming.
i know c++ and java(J2SE), and in a next future i will learn asm x86.
but i think my knowdlege insufficient for osdev.
could you tell me where i must start to start coding an OS?
i'm waiting for your answers.
Of course, if you have trouble figuring out the subjects mentioned, you are free to ask here.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
If you take programming languages as tools suitable for a task, then you should refrain yourself from writing a kernel in c++. the language is not suitable for that. Of course you can do it in c++ if you want. and you can also do it in pascal, basic cobol or fortran.
I believe, that, those who prefer to do their OS in c++ instead of C want to do it because, principaly because they are more comfortable with the language, they find operator overloading, and object orientation more expressive than C's simplicity. However, making an operating system in C++ is more difficult than making it in plain C, because C++ is not a simple language to begin with.
Misguided programmers often thinks otherwise, they choose programming language like I chose bubble gum when I was 9.
But at the same time C++ doesn't deprive you of the system programming capabilites of C, it just has a few more runtime requirements in order to get the funkier features. Quite a few C++ features are 'free' in terms of runtime requirement and therefore are perfectly suitable to system programming.
If you take programming languages as tools suitable for a task, then you should refrain yourself from writing a kernel in c++. the language is not suitable for that.
I wholeheartedly disagree. C++ is entirely suitable for operating system development. I wrote my tutorials and my first kernel in C, and all my other kernels in C++. Each worked fine. C++ is (almost) a superset of C - C code should pretty much compile and run with a c++ compiler, but you get extra things for free, like classes with nonvirtual member functions, operator overloading etc.
Same sentiment here - C++ is certainly suitable for OSDev. If you are more comfortable with C++-style than C-style, why would you not use C++? In the same way, it would be pretty daft to attempt an OS in C++ if you are more comfortable with the C way of doing things.
OK - there's a bit more support code to add, but once that's in place, you get inheritance, polymorphism, template classes overloading et. al. The best language to use is the language you are more comfortable with (within reason).
yeah, there are some things you CANT do in C++ for osdev.
you should be comfortable reading and writing ASM. As snake says, order the intel manuals and read them. I mean actually read them, don't just flick through them. it wil really help