Page 1 of 1

Real-mode assembly kernel barebones

Posted: Sat Feb 20, 2016 7:59 pm
by mac
(AKA something I was probably not supposed to do yet but followed it anyway for kicks, anyway it works)

I did this real-mode barebones assembly part I tutorial on the wiki, just to see how far I can go. I used PARTCOPY, Nasm and Virtualbox. I'm impressed by what I have done. Can't say I fully get the picture of the order and executions of the instructions do yet, which is what I fear that might make me a fake around here.

If I made my own suggestion, I would probably take a long(?) detour trying to learn C. What do you think?

Re: Real-mode assembly kernel barebones

Posted: Sat Feb 20, 2016 9:04 pm
by BASICFreak
SeanMc wrote:If I made my own suggestion, I would probably take a long(?) detour trying to learn C. What do you think?
That would probably be a good road for you to go down. C is a lot easier to read (and write) than ASM (Not as much micromanagement as the compiler does a-lot for you).

If you plan on learning C on the OSDev route I would highly recommend installing GRUB onto a disk image and creating your first "Hello World" Protected Mode Multi-boot complaint kernel. From there you can add any drivers or features you would want.

In the world of OSDev you only *NEED* a few lines of ASM, and most of the time it is just the privileged instructions (e.g. invlpg, lgdt, lidt, etc...) and/or boot code.


NOTE: I know many people would say to write simple applications first, which may be good advice - but I shall leave that decision with you.


Good Luck :),

B!

Re: Real-mode assembly kernel barebones

Posted: Sat Feb 20, 2016 9:18 pm
by mac
Well it wouldn't hurt me if I did a bit of user application programming.

Still, I'm glad I did this, even if I don't ever want to code in ASM much again.