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.
Compiler
- NickJohnson
- Member
- Posts: 1249
- Joined: Tue Mar 24, 2009 8:11 pm
- Location: Sunnyvale, California
Re: Compiler
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
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.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: 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?emfader wrote:I mean the OS will be in assembly language form when compiled, so why should I build a compiler.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]