I am trying to write a rudimentary OS, to understand the basics. The problem that I encountered is the read from floppy when the number of sectors is greater than 72.
The current working code:
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
If the KERNEL_SECTORS
is 73
the AH will be 1, which translates to bad command passed to driver
. According to http://stanislavs.org/helppc/int_13-2.html I should be able to go to 128. Any idea what I do wrong?