I have found out that my bootloader can load a 40KB kernel, but hangs if it tries to load anything over 40KB.
I am using INT 13, AH=42 in real mode to read from a FAT32 partition. I read the kernel to 0000:5500
After the jump to protected mode, the boot loader copies the kernel from 0x5500 to 0x100000
I have found that if the kernel is larger than 40KB, it will not fit into the real mode segment that I am using as the INT 13 buffer.
I have considered using 0550:0000 as the buffer (same physical memory location), which would give me up to 64KB for the Kernel before the segment is full, however, (1) I can't get this to work, and (2) I'll probably hit the limit for this again sometime in the near future.
I figure I can use 0550:0000 as the buffer, and when it gets full, move to the next segment. However, as I've said, I can't get it to work.
This is the DAP I'm using:
Code: Select all
DAP:
.Size DB 0x10
.NULL DB 0x00
.Sectors DW 0x00
.Offset DW 0x00
.Segment DW 0x00
.LBA DD 0x00
.LBA48 DD 0x00
Code: Select all
mov word [DAP.Segment], 0x0000
mov word [DAP.Offset], 0x5500
Code: Select all
mov word [DAP.Segment], 0x0550
mov word [DAP.Offset], 0x0000
Any ideas what I may be doing wrong here?