This my answer to quora query. I thought it is good to archive it here.
I want to know how do I actually start writing code which can be executed independently of any Operating System. How do I write the assembly code which will enable my machine to execute it directly? What all do I need to learn for that? Also, what are the prerequisites and what are the tools needed for writing an Operating System?
I have read the theoretical concepts of Operating Systems and I have also gone through the Linux source code but I couldn’t understand much..
Yes you should have a moderate knowledge of x86 assembly to write an os .
Resoures for Learning x86 Assembly
EMU8086 is one of the easiest way to get started with x86 assembly it comes with an os development tutorial too.
1) IBM PC assembly langage programming Peter Abel:
2) Assembly language step by step :
3) Assembly Language Master Book :
4)Art of Assembly :
5) emu8086 :
6) ketmans assembly tutorial :
7) Buch of tutorials from programmers
8 ) Knuths book – Art of computer programming – volume 1 Fundamental Algorithms — Excellent
9) PC Assembly Language Programming :
10 ) Programming from the ground up :
11) Advanced 386 programming Techniques – James Turley
Interesting Projects and Pages
Mike os is a good starting place.
I am compiling a set of resources that might help you on the way.
Learning the linux kernel is another matter, it might be easier to read historic linux kernels for a newbie than the latest one. You might find this interesting
Hope something in my rambling is of some use to you 🙂