Page 1 of 1 [ 5 posts ] 

GinBlossoms
Snowy Owl
Snowy Owl

User avatar

Joined: 26 Sep 2013
Age: 34
Gender: Male
Posts: 173

28 Jan 2014, 4:23 pm

If my long-term programming project was to write a bootloader and kernel with the knowledge I gained, what programming language should a semi-beginner to programmer learn to reach this eventual goal. Also, what other practical non-programming steps do I need to know?

Or I might even modify an already-existing OS core.



drh1138
Velociraptor
Velociraptor

User avatar

Joined: 2 Dec 2012
Gender: Male
Posts: 498

28 Jan 2014, 6:20 pm

You're going to want to know C and x86 assembly. Probably wouldn't hurt to study up on Linux, BSD, or some other POSIX-like API that can show you how things like memory management, filesystems, and such are done.

"The Linux Programming Interface" by Michael Kerrisk is a great book that explains everything about how a UNIX system works. For bootloaders, specifically, you can find a few primers on Google on how to code one. You're gonna be writing it in x86 ASM, though.



GinBlossoms
Snowy Owl
Snowy Owl

User avatar

Joined: 26 Sep 2013
Age: 34
Gender: Male
Posts: 173

28 Jan 2014, 6:39 pm

If you didn't hear part of what I said, I will mention it again. This seems like more advanced stuff. Even though I said I had a goal of creating an OS or modifying an existing kernel, I'm a semi-new programmer (never really programmed before except for a few small lines of code). Should I learn C and x86 asm immediately or do I wait until I become more experienced? Also, if I needed to learn about hardware, I'd be interested in that too.



drh1138
Velociraptor
Velociraptor

User avatar

Joined: 2 Dec 2012
Gender: Male
Posts: 498

28 Jan 2014, 7:39 pm

It is indeed advanced, and I'd be doing a disservice by not being frank about its complexity.

If you don't mind the "dive right in" approach, C is where virtually all other modern languages derive, and doesn't shield you from any of its internal workings. I wouldn't tackle x86 ASM at first, though.

http://wiki.osdev.org/Required_Knowledge

A whole wiki dedicated to the subject of OS development.



GinBlossoms
Snowy Owl
Snowy Owl

User avatar

Joined: 26 Sep 2013
Age: 34
Gender: Male
Posts: 173

28 Jan 2014, 8:08 pm

Funny, because I was just on the wiki at that exact same page.

As far as basic computer science goes, what are the more specific topics and concepts I should expect to be able to learn? If it's just self-explained in the proceeding steps on the wiki, I might study those.