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