geos/OST OS/os/x16/disk/disk_load.asm

24 lines
330 B
NASM
Raw Normal View History

2024-03-25 23:00:14 +01:00
disk_load:
push dx
mov ah, 0x02
mov al, dh
mov ch, 0x00
mov dh, 0x00
mov cl, 0x02
int 0x13
jc disk_error
pop dx
cmp dh, al
jne disk_error
ret
disk_error:
mov ebx, DISK_ERROR_MSG
call writeLn
jmp $
DISK_ERROR_MSG: db "Disk read error!", 0