簡體   English   中英

從軟盤上的扇區讀取

[英]Read from sector on floppy disk

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

扇區號是從1開始的,而磁道號是從0開始的。 Int13就像那樣時髦。

http://stanislavs.org/helppc/int_13-2.html

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM