Fat12 bootloader problem
Posted: Thu Jun 17, 2004 6:59 pm
Hi there,
I used daniel faulkner's tutorials to build my own bootloader which loads the kernel file out of the fat partition. Now is daniels' loader split into two loaders, with the second one in a few reserved sectors. Yuk
So i decided to fiddle it all into the first sector. That worked, i only completely forgot the segment registers. After doodling around a bit for an hour or three, i now have the situation that i have a fat table in my memory at 1000h:0000h, my code still runs from 0000:7C00, and i'm trying to get my kernel to 3000h:0000h. It even loads the first sector of the kernel, but after that something screws up, and my read sector function borks because of a faulty provided lba. So, apparantly i'm updating my KernelClusterAddress in a faulty way, or it's faulty in the first place but i'm getting away with it for the first time
Can anyone take a look at my code? It's a pretty sweet loader, if it works... Just rename your kernel file to perseus.bin and paste it on a floppy with this loader in the first sector, and it will get loaded to 3000h:0000h (and jumped to off course).
It's over here: http://oege.ie.hva.nl/~meeuwi10/bootfat.asm
If you want a quick hello world (actually it's something i copied from another file of mine, hence the sloppy function) to test the whole kernel loading thing, here's one: http://oege.ie.hva.nl/~meeuwi10/helloworld.asm
I used daniel faulkner's tutorials to build my own bootloader which loads the kernel file out of the fat partition. Now is daniels' loader split into two loaders, with the second one in a few reserved sectors. Yuk
So i decided to fiddle it all into the first sector. That worked, i only completely forgot the segment registers. After doodling around a bit for an hour or three, i now have the situation that i have a fat table in my memory at 1000h:0000h, my code still runs from 0000:7C00, and i'm trying to get my kernel to 3000h:0000h. It even loads the first sector of the kernel, but after that something screws up, and my read sector function borks because of a faulty provided lba. So, apparantly i'm updating my KernelClusterAddress in a faulty way, or it's faulty in the first place but i'm getting away with it for the first time
Can anyone take a look at my code? It's a pretty sweet loader, if it works... Just rename your kernel file to perseus.bin and paste it on a floppy with this loader in the first sector, and it will get loaded to 3000h:0000h (and jumped to off course).
It's over here: http://oege.ie.hva.nl/~meeuwi10/bootfat.asm
If you want a quick hello world (actually it's something i copied from another file of mine, hence the sloppy function) to test the whole kernel loading thing, here's one: http://oege.ie.hva.nl/~meeuwi10/helloworld.asm