kernel: properly loop over floppies
This commit is contained in:
parent
c3f22e5aea
commit
ff3a59c71e
@ -28,6 +28,8 @@ drives_init: int 0x11
|
|||||||
mov bx, drive_table
|
mov bx, drive_table
|
||||||
xor dx, dx
|
xor dx, dx
|
||||||
|
|
||||||
|
.loop: push cx
|
||||||
|
push dx
|
||||||
mov [bx+drive.biosnum], dl
|
mov [bx+drive.biosnum], dl
|
||||||
; defaults if 13h,AH=8 fails (XT 360kb)
|
; defaults if 13h,AH=8 fails (XT 360kb)
|
||||||
les di, [0x1e * 4]
|
les di, [0x1e * 4]
|
||||||
@ -68,4 +70,9 @@ drives_init: int 0x11
|
|||||||
inc dh
|
inc dh
|
||||||
mul dh ; ax = al * dh
|
mul dh ; ax = al * dh
|
||||||
mov [bx+drive.spc], ax
|
mov [bx+drive.spc], ax
|
||||||
|
; advance loop
|
||||||
|
pop dx
|
||||||
|
pop cx
|
||||||
|
inc dl
|
||||||
|
loop .loop
|
||||||
ret
|
ret
|
||||||
|
Loading…
Reference in New Issue
Block a user