About the bootsector...
Posted: Wed Nov 13, 2002 6:04 pm
Hi, I'm the new guy
Okay, so before I start let me tell you that I have 5 yesrs of experience in C/C++ and 3 months in ASM ( But I'm a fast learner - I know that [ax] is a pointer to ax !; acually I leanrd it while looking at MS Vc++ disasembly ). But I fell quite at home with the intel-like syntax of NASM.
Soooo... I worte a small bootsector that prints "Hello world" and detects what kind of CPU you have (8086, 286, 386+). But now I want to do more.
I'll limit my post to a few questions beacuse I really want to understand this before going and writting other parts of my os...
So I would like to know if it's best to do a much as possible in the bootsector or a little as possible. I would also like to know where should I enable pMode ? In the bootsector (I don't want my OS to switch modes in run-time; it will always be in pMode). And how do I enable pMode and, from ASM, how do I call a 'C' function. I understant I must go a global _myCFoo and that the params are in revers order but how is it done in real-life ?
Thanks for all your comments/answers/links.
Oh, btw, if you must know; I'm 17 and I come form Canada, Quebec.
Okay, so before I start let me tell you that I have 5 yesrs of experience in C/C++ and 3 months in ASM ( But I'm a fast learner - I know that [ax] is a pointer to ax !; acually I leanrd it while looking at MS Vc++ disasembly ). But I fell quite at home with the intel-like syntax of NASM.
Soooo... I worte a small bootsector that prints "Hello world" and detects what kind of CPU you have (8086, 286, 386+). But now I want to do more.
I'll limit my post to a few questions beacuse I really want to understand this before going and writting other parts of my os...
So I would like to know if it's best to do a much as possible in the bootsector or a little as possible. I would also like to know where should I enable pMode ? In the bootsector (I don't want my OS to switch modes in run-time; it will always be in pMode). And how do I enable pMode and, from ASM, how do I call a 'C' function. I understant I must go a global _myCFoo and that the params are in revers order but how is it done in real-life ?
Thanks for all your comments/answers/links.
Oh, btw, if you must know; I'm 17 and I come form Canada, Quebec.