another int 13 thing...

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
stonedzealot

another int 13 thing...

Post by stonedzealot »

Well, after my initial problems getting a working bootsector to load an ext2 file failed, I wrote a simple boot loader just so I could progress through to interrupts and mm and the such. Now that the kernel is getting larger, I need to rewrite the bootsector and I'd like to do so in a manner that I won't ever have to touch its foundation again. Basically this means that it will load and infinitely large kernel if it needs to (ahem...yeah...an infinite kernel on one of those quantum or extra-dimensional hard drives I've got sitting around).

Anyway, I'd like to keep loading the kernel to 0xFFFF:0x0010 (1 MB), the question I have though is how do I progress past 0xFFFF:0xFFFF using interrupt 13? Or how would I have to use movsb to move the code after reading it?

I've looked at several bootsector examples for FAT12 that will load a kernel.bin that can be as large as I want, but I just found that ultra-confusing (mainly because I don't know a thing about FAT12)

So what does anyone think...is there a way or must I just move the code...?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:another int 13 thing...

Post by Pype.Clicker »

basically, INT13 will not work beyond 0xfff:0xffff, whatever you could try to do =), and even using it at 0xffff:0x0010 seems dangerous to me. The solution is in unreal mode (see baby steps), which will allow you to read sectors into conventionnal memory buffer and then copy them at their definitive location.

Note that if you don't think your kernel will ever get bigger than 640Kb (which is my case as it's a *micro*kernel, or could be the case if your kernel is very modular), loading it directly in conventionnal memory may be the easiest option...
Post Reply