From ff3a59c71e7d01234c99324363108ec70b57c6d3 Mon Sep 17 00:00:00 2001 From: Nero <41307858+nero@users.noreply.github.com> Date: Sat, 22 Aug 2020 23:36:09 +0000 Subject: [PATCH] kernel: properly loop over floppies --- kernel/drive.asm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kernel/drive.asm b/kernel/drive.asm index 3712f51..d7beb84 100644 --- a/kernel/drive.asm +++ b/kernel/drive.asm @@ -28,6 +28,8 @@ drives_init: int 0x11 mov bx, drive_table xor dx, dx +.loop: push cx + push dx mov [bx+drive.biosnum], dl ; defaults if 13h,AH=8 fails (XT 360kb) les di, [0x1e * 4] @@ -68,4 +70,9 @@ drives_init: int 0x11 inc dh mul dh ; ax = al * dh mov [bx+drive.spc], ax + ; advance loop + pop dx + pop cx + inc dl + loop .loop ret