new in osdev

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.
wrproject
Posts: 1
Joined: Tue Mar 11, 2008 9:02 am

new in osdev

Post 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.
:o

p.s: sorry for the bad english. :?
User avatar
devel
Member
Member
Posts: 62
Joined: Wed Nov 28, 2007 4:15 am
Contact:

Post by devel »

eddyb

Post by eddyb »

C should be necessary
For u, is good to take a tutorial like Bran's Kernel Development tutorial
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post 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.
"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 ]
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Post by xyzzy »

eddyb wrote:C should be necessary
For u, is good to take a tutorial like Bran's Kernel Development tutorial
Why C? C++ is perfectly OK for OSDev.

Also, JamesM's tutorials are a good starting point.
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Post by piranha »

Why C? Because most tutorials are written in C.
Easier to deal with...

-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
StephanvanSchaik
Member
Member
Posts: 127
Joined: Sat Sep 29, 2007 5:43 pm
Location: Amsterdam, The Netherlands

Post by StephanvanSchaik »

If you know C++ then understanding C is easy.
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Post by piranha »

StephanVanSchaik wrote:If you know C++ then understanding C is easy.
Yeah, ok, cool.... =D>

I'd suggest learning ASM to a point of understanding.

And, have fun.

-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
User avatar
jerryleecooper
Member
Member
Posts: 233
Joined: Mon Aug 06, 2007 6:32 pm
Location: Canada

Post 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.
User avatar
ucosty
Member
Member
Posts: 271
Joined: Tue Aug 08, 2006 7:43 am
Location: Sydney, Australia

Post 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.
The cake is a lie | rackbits.com
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post 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.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post 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
User avatar
codemastersnake
Member
Member
Posts: 148
Joined: Sun Nov 07, 2004 12:00 am
Contact:

Re: new in osdev

Post 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.
User avatar
lukem95
Member
Member
Posts: 536
Joined: Fri Aug 03, 2007 6:03 am
Location: Cambridge, UK

Post 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 :)
~ Lukem95 [ Cake ]
Release: 0.08b
Image
User avatar
nekros
Member
Member
Posts: 391
Joined: Wed Mar 05, 2008 9:10 pm
Contact:

Post by nekros »

I read them at school
Working On:Bootloader, RWFS Image Program
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Post Reply