Page 1 of 1

Problem with loading kernel...

Posted: Mon Oct 25, 2010 9:24 am
by kompustelnik
Hi all! I'm new here ; )

I have problem with my boot loader. The problem is completly ununderstandable for me. I'm using FAT12 fs (I'm using floppy disk :P)

Here is simple scheme what the BL is doing:

1) Setting Up segment registers.
2) Setting Up stack.
3) Loading Root Directory Table.
4) Looking for kernel file.
5) Loading kernel file (loading FAT and calculating file's clusters).
6) Jumping at kernel address.

Problem is in 5th step. FAT is loaded without any problems. Code of file loading is imo correctly and I've no ideas
where the problem is. :?

Here is the source code (pretty simple and well commented):
BOOT.asm
IncFiles.inc
StdIO.inc
Floppy.inc
FAT12.inc

Please help me, cuz without correctly working BL I can't did anything.

Sorry for my english.

PS: If u want, I can put RAR with all sources + my program for BL installing on the floppy.

Re: Problem with loading kernel...

Posted: Mon Oct 25, 2010 2:49 pm
by Combuster
Problem is in 5th step. FAT is loaded without any problems. Code of file loading is imo correctly and I've no ideas
where the problem is.
The key to debugging is to know and not to guess.

Grab bochs' debugger, step through the code, and write down all the sectors of the supposed file that are loaded. Then you can check if you are loading the right sectors, and if you did, if they are in memory where you expect them to be.