Page 1 of 2
new in osdev
Posted: Tue Mar 11, 2008 12:14 pm
by wrproject
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.
p.s: sorry for the bad english.
Posted: Tue Mar 11, 2008 12:19 pm
by devel
Posted: Tue Mar 11, 2008 12:22 pm
by eddyb
C should be necessary
For u, is good to take a tutorial like
Bran's Kernel Development tutorial
Posted: Tue Mar 11, 2008 1:58 pm
by Combuster
If you have read the forum rules, you'd notice there's an official
list of required knowledge.
Of course, if you have trouble figuring out the subjects mentioned, you are free to ask here.
Posted: Tue Mar 11, 2008 3:03 pm
by xyzzy
Why C? C++ is perfectly OK for OSDev.
Also,
JamesM's tutorials are a good starting point.
Posted: Tue Mar 11, 2008 7:26 pm
by piranha
Why C? Because most tutorials are written in C.
Easier to deal with...
-JL
Posted: Tue Mar 11, 2008 7:36 pm
by StephanvanSchaik
If you know C++ then understanding C is easy.
Posted: Tue Mar 11, 2008 8:48 pm
by piranha
StephanVanSchaik wrote:If you know C++ then understanding C is easy.
Yeah, ok, cool....
I'd suggest learning ASM to a point of understanding.
And, have fun.
-JL
Posted: Tue Mar 11, 2008 10:04 pm
by jerryleecooper
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.
Posted: Wed Mar 12, 2008 12:01 am
by ucosty
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.
Posted: Wed Mar 12, 2008 2:27 am
by JamesM
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.
Posted: Wed Mar 12, 2008 3:02 am
by AJ
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).
Cheers,
Adam
Re: new in osdev
Posted: Wed Mar 12, 2008 5:05 am
by codemastersnake
wrproject wrote:and in a next future i will learn asm x86.
I think it's time for you to learn it and do learn about x86 processor architechture. It will help.
Posted: Wed Mar 12, 2008 5:07 am
by lukem95
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
Posted: Wed Mar 12, 2008 5:11 am
by nekros
I read them at school