p(re).s. This post has also been posted on osdcom.info
Hello,
I decided that i want to dive into OS dev. One of the main parts is to write a bootsector (<- Root told me this). So i decide to go out and learn ASM . because i don't want to make the classic mistake by reading a shitty tutorial i ask for help to find the best ASM tutorial out there that will prepare me to write a boot sector.
ice-o
p(ost).s. I like a challenge
ASM tutorial <- reall classic question!
Re:ASM tutorial <- reall classic question!
Two things:
First, you say "c++ for over the last week" so I hope you have more (say a few years) experience with other languages, because writing an OS isn't really a small project.
Second, if I was you, I'd forget about the bootsector, and just use GRUB instead. Bootloaders and operating systems are actually two different things, and there really isn't much advantage in writing your own bootloader.
Finally, even if you used GRUB, you still need to learn a bit of assembler, and the evil part is that while you need to understand what your compiled C (or C++ or whatever) code does on assembler level, much of the traditional assembler programming isn't interesting. Mostly you probably want to use assembler for things that can't be done in C (or C++ or whatever) and most of the stuff isn't what normal application programs (assembler or not) do.
Now, take some assembler programming tutorial. Linux assembler is forexample a good idea, because those talk about C calling conventions that GCC uses, and you most likely will be using GCC for your C++ OS development. Once you understand the basic ideas, then get IA-32 Intel Architecture (volumes 2 and 3 are a must but the first one might be useful as well). That'll tell you all the system-level details that normal tutorials usually won't.
Finally, GCC inline assembler, even if slightly strange at first, is a Good Thing to know, because it allows you to write exactly what you need in assembler and nothing more.
Hope that helps a bit.
First, you say "c++ for over the last week" so I hope you have more (say a few years) experience with other languages, because writing an OS isn't really a small project.
Second, if I was you, I'd forget about the bootsector, and just use GRUB instead. Bootloaders and operating systems are actually two different things, and there really isn't much advantage in writing your own bootloader.
Finally, even if you used GRUB, you still need to learn a bit of assembler, and the evil part is that while you need to understand what your compiled C (or C++ or whatever) code does on assembler level, much of the traditional assembler programming isn't interesting. Mostly you probably want to use assembler for things that can't be done in C (or C++ or whatever) and most of the stuff isn't what normal application programs (assembler or not) do.
Now, take some assembler programming tutorial. Linux assembler is forexample a good idea, because those talk about C calling conventions that GCC uses, and you most likely will be using GCC for your C++ OS development. Once you understand the basic ideas, then get IA-32 Intel Architecture (volumes 2 and 3 are a must but the first one might be useful as well). That'll tell you all the system-level details that normal tutorials usually won't.
Finally, GCC inline assembler, even if slightly strange at first, is a Good Thing to know, because it allows you to write exactly what you need in assembler and nothing more.
Hope that helps a bit.
Re:ASM tutorial <- reall classic question!
Thank you! i'm allready reading the intel manuals. And i have strong belives never ever to use someone elses code. So no GRUB for me! thnks for the refrences u made.
Ice-o
Ice-o