我正在尝试编写一个基本的OS,以了解基本知识。我遇到的问题是扇区数大于72时从软盘读取。
当前工作代码:
KERNEL_SECTORS equ 72
mov ax, 0x1000 ; to avoid DMA access across 64k boundary
mov es, ax
mov ah, 02h ; parameters for calling int13 (ReadSectors) - read the Kernel
mov al, KERNEL_SECTORS ; read KERNEL_SECTORS sectors (hardcoded space for Kernel)
mov ch, 00h
mov cl, 0Bh ; starting from sector 11 - skip first 10 sectors (the MBR + SSL)
mov dh, 00h
mov bx, 0 ; memory from 0x7E00 - 0x9200 used by SLL; 0x9200 - 0x9FFFF is unused
int 13h
如果KERNEL_SECTORS
为73
,则AH为1,表示bad command passed to driver
。根据{{3}},我应该可以转到128。知道我做错了吗?