How do you write a operating system in C

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.
Post Reply
nosmaker
Posts: 2
Joined: Mon Jan 21, 2008 3:00 pm

How do you write a operating system in C

Post by nosmaker »

I am writing a operating system called NOS, it is written in Assembly, in emu8086. I was wondering how to write a operating system in C, to speed up coding.
And if possible actually even writing a boot loader in C.

-nosmaker
thanks!
maker of NOS
User avatar
lukem95
Member
Member
Posts: 536
Joined: Fri Aug 03, 2007 6:03 am
Location: Cambridge, UK

Post by lukem95 »

most people use ASM for the bootloader/bootstrap and then C (or another language... or continue using ASM) for the kernel.

using GRUB (GRand Unified Bootloader) will allow you to start with the C coding very quickly.
~ Lukem95 [ Cake ]
Release: 0.08b
Image
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 »

I was wondering how to write a operating system in C
Use an text editor.

Serious reply: Your question strongly suggests that you couldn't be bothered to look for an answer on your own. Everything you need can be found with a google search.
"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 ]
nosmaker
Posts: 2
Joined: Mon Jan 21, 2008 3:00 pm

Post by nosmaker »

No, i searched and i could not find a decent tutorial.
And instead of trying to act like an @$$ to feel good about yourself, why dont you tell me how to do it so i stop bothering you.
maker of NOS
User avatar
Wave
Member
Member
Posts: 50
Joined: Sun Jan 20, 2008 5:51 am

Post by Wave »

You could take a look under "Tutorials" in the wiki or here: http://www.osdever.net/.

If keep Image people you will get Image by the way.
Conway's Law: If you have four groups working on a compiler, you'll get a 4-pass compiler.
Melvin Conway
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

nosmaker wrote:No, i searched and i could not find a decent tutorial.
And instead of trying to act like an @$$ to feel good about yourself, why dont you tell me how to do it so i stop bothering you.
Wtf?! where did you search? No, seriously, I'm really interested. Google?

Google 1

Google 2

The wiki?

Wiki 1

Wiki 2

Wiki 3

Forum?

Forum 1


So, in conclusion

Think before you post, and when someone tells you to STFW, it means that you just made a complete fool of yourself. So instead of flaming back (which, if he doesn't know what he's talking about, is something only a noob does), get up off your fat arse and do some work yourself, you lazy boneheaded noob.
User avatar
Wave
Member
Member
Posts: 50
Joined: Sun Jan 20, 2008 5:51 am

Post by Wave »

I don't think it's a good idea to insult fat people like that. They don't have to be like him.... although I don't know any exceptions personally.
Conway's Law: If you have four groups working on a compiler, you'll get a 4-pass compiler.
Melvin Conway
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 »

No, i searched and i could not find a decent tutorial.
And instead of trying to act like an @$$ to feel good about yourself, why dont you tell me how to do it so i stop bothering you.
Don't come into a (this) forum and ask a question that can be answered by using something called a 'search engine'. Then, when people don't want to answer such a simple question, don't call them an @$$. You show a lack of care and respect by not doing the proper research. Google. All you questions can be answered by looking.

"How can I code an OS in C?": *Sigh*. Typing?

-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
Post Reply