From bfb5b227b6bb7e245d7ea43e7ecf935ad9f09030 Mon Sep 17 00:00:00 2001 From: Ain <41307858+nero@users.noreply.github.com> Date: Sun, 15 Sep 2019 17:51:44 +0000 Subject: [PATCH] Fix cmdline setup in fatvbr --- boot/fatvbr.asm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/boot/fatvbr.asm b/boot/fatvbr.asm index 3005cba..4858eba 100644 --- a/boot/fatvbr.asm +++ b/boot/fatvbr.asm @@ -273,9 +273,18 @@ parse_cmdline: .args_start: mov di, (psp + 0x81) .args_loop: - call .read + lodsb + test al, al + jz .args_end stosb jmp .args_loop +.args_end: + mov ax, di + sub ax, (psp + 0x81) + mov [psp+0x80], al + mov al, 0x0D + stosb + ret .read: lodsb test al, al @@ -285,7 +294,7 @@ parse_cmdline: ret cmdline: - db "KERNEL.COM /?", 0 + db CMDLINE, 0 times (0x1FE - ($-$$)) db 0