Page 1 of 1

Compiler

Posted: Sat Jan 05, 2013 1:14 pm
by emfader
Hey guys, I am set to start on OS project from scratch.
My question is should I build a compiler or I can use an existing one?
I mean the OS will be in assembly language form when compiled, so why should I build a compiler.
Hope I explained my concern correctly.

Re: Compiler

Posted: Sat Jan 05, 2013 3:00 pm
by NickJohnson
A compiler for a new language (or an old one) is a pretty big project; probably equal or greater in magnitude than a whole OS. If you're just starting out, I'd highly recommend writing your OS using an existing language toolchain like C/GCC. Once you're more experienced, you can try doing language development and OS development at the same time.

Re: Compiler

Posted: Sat Jan 05, 2013 3:25 pm
by iansjack
I wouldn't recommend trying to write a compiler (one thing at a time, please), but you almost certainly want to build a cross-compiler. See the Wiki for details.

Re: Compiler

Posted: Sat Jan 05, 2013 8:50 pm
by Love4Boobies
emfader wrote:I mean the OS will be in assembly language form when compiled, so why should I build a compiler.
This is an illogical sentence, like "If soup is good for you, why use toilet paper?" How does it follow that you should or shouldn't build a compiler from the target language (i.e., assembly) of the compiler(s) you will use?