mov ah, 0x02 ; read floppy sector function
mov al, 1 ; read 1 sector
mov ch, 1 ; we are reading the second sector past us, so its still on track 1
mov cl, 2 ; sector to read (The second sector)
mov dh, 0 ; head number
mov dl, 0 ; drive number. Remember Drive 0 is floppy drive.
int 0x13 ; call BIOS - Read the sector
这是来自http://www.brokenthorn.com/Resources/OSDev5.html
的示例代码我真的不明白这一部分:
mov ch, 1 ; we are reading the second sector past us, so its still on track 1
mov cl, 2 ; sector to read (The second sector)
好的,所以第一个扇区是引导扇区(扇区0)。因此,此后的行业是第1部门。
那不应该吗?:
mov ch, 0 ;First track
mov cl, 1 ;second sector on first track