Making a Simple C kernel with Basic printf and clearscreen F

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Mark

Making a Simple C kernel with Basic printf and clearscreen F

Post by Mark »

Making a Simple C kernel with Basic printf and clearscreen Functions is a tutorial on http://osdev.neopages.net/tutorials/basickernel.php . I recently read it and tried to follow along and make the kernel (under Linux - gcc, ld, and nasm). But when I tried to execute my kernel with GRUB it didn't display any text like it was supposed to it just sat there with a cursor in the top left hand corner of the screen. I am not the only person that has had this problem. But I have no idea how to get it to work. If someone could help that would be great thank-you.
gtsphere

Re:Making a Simple C kernel with Basic printf and clearscree

Post by gtsphere »

It could possibly be a problem with grub. I'd try it without grub, and see what happens. Try using ( http://www.execpc.com/~geezer/johnfine/index.htm )

Also, make sure that everything is being compiled and linked correctly:
It is important that ks.o is linked first or the kernel will not work. The kernel is called kernel.bin and is ready to be run by a bootsector/loader that sets up Protected Mode and enables the A20
Hope this helps a bit
-GT
K.J.

Re:Making a Simple C kernel with Basic printf and clearscree

Post by K.J. »

It seems that DJGPP and gcc on *nix are more different than I've been led to believe. So... I'm workin' on getting the tutorial code to compile on *nix.

And for all wondering, it wasn't a GRUB problem, it's some oddity of the *nix ld/gcc that doesn't exist in DJGPP.

K.J.
Post Reply