INT 0x13 AH=0x42 returns error
Posted: Sat Sep 08, 2018 5:03 pm
I have been working on a simple bootloader for my OS, and I have encountered a problem.
I'm trying to use INT 0x13 AH=0x42 to load 8 sectors of code from the disk, but for some reason it always returns with AH=0x01 ("invalid function in AH or invalid parameter")
I think there is something wrong with this function, though I haven't been able to pinpoint anything:
My code does check whether BIOS extensions are available, so I don't think that is the problem.
I'm trying to use INT 0x13 AH=0x42 to load 8 sectors of code from the disk, but for some reason it always returns with AH=0x01 ("invalid function in AH or invalid parameter")
I think there is something wrong with this function, though I haven't been able to pinpoint anything:
Code: Select all
loadstage2:
mov ah, 0x42
mov si, dap
mov dl, byte [drivenum]
int 0x13
jc .errloading
ret
.errloading:
jmp hang
dap:
size db 0x10
zero db 0
sectors db 8
load_address dd 0x00007E00
start_sec dq 1