I have several questions regarding OS programming.
1 - How do they write Operating systems?
2 - Do you know what compilers is used to do that (or library)?
3 - Do they have to burn it to a CD and reboot the computer every time they test it?
4 - I heard that most of the operating systems are written in C and some of them are in assembler. If so then why do you need assembly if you can just compile the C program to assembly. Is it something like this
#include <OSSTUFF>
int OSmain {
int prints(char toprint) {
_ASM {
//asm to print screen
asmint cdf = topring;
push eax;
pop cdf;
.dada
disp cdf;
}
prints(gdf);
} //normal C
Also the assembly can be used in Windows. But I heard windows does not allow direct access to hardware and assembly is a machine code. Then how is assembly used in windows or unix stuff? How does windows allow that?
Also do you know any good books about OS programming. I just ordered a book about asm. I don't like internet tutorials, just books. Also is assembly different for Intel and AMD and 32 and 64 bit systems? I got 64 bit AMD and the book is for 34 bit Intel and if it will not work I will have to use my mom's Intel 32 bit netbook for that and she will not like it lol. Sorry if my questions seem a bit silly for you, I am just 13 years old :)