you're right, I made a mistake in my function, which should read the error code
the right error code is 0x01, he means "invalid function in AH or invalid parameter",
that's strange, the program runs in bochs without problems,
only my old ami-bios makes problems
maybe yousee the mistake:
Code:
readdisk:
push bp
mov bp, sp
sub sp, 0x0006
push ax
push bx
push cx
push dx
push es
mov ax, [bp+0x04]
mov bx, 0x0024
xor dx, dx
div bx
mov [bp-0x02], ax
mov ax, dx
push ax
mov bx, 0x0012
xor dx, dx
div bx
mov [bp-0x04], ax
pop ax
xor dx, dx
div bx
mov ax, dx
inc ax
mov [bp-0x06], ax
mov ax, [bp+0x06]
mov es, ax
xor bx, bx
mov ah, 0x02
mov al, 0x01
mov ch, [bp-0x02]
mov cl, [bp-0x06]
mov dh, [bp-0x04]
mov dl, 0x00
int 0x13
pop es
pop dx
pop cx
pop bx
pop ax
mov sp, bp
pop bp
ret
the first parameter contains the the logical sector and he second one the segment
But it can't be a mathematical problem in the function, in bochs he reads exactly the correct sectors