I am currently writing a bootloader, and when attempting to read more than exactly 65 sectors, QEMU will restart and refuse to run my code. I assume that I have done something incorrectly with my assembly code.
My current disk reading code is this:
KERNEL_SIZE_SECTORS equ 65 ;Kernel size in sectors
CYLINDER_IDX equ 0
HEAD_IDX equ 0
SECTOR_IDX equ 2
boot:
mov ah, 0x2 ;Tell BIOS that we want to read disk
mov al, KERNEL_SIZE_SECTORS ;Load the kernel sector amount
mov ch, CYLINDER_IDX ;Load the cylinder IDX
mov dh, HEAD_IDX ;Load the head IDX
mov cl, SECTOR_IDX ;Load the sector IDX
mov dl, [disk] ;Load the disk IDX
mov bx, copy_target ;Point to the copy target
int 0x13 ;Load the bootloader+kernel into memory
cli ;Clear the interrupts