From 05c7e905d0dbf96c49138960162a0d7ab635de40 Mon Sep 17 00:00:00 2001 From: Ain <41307858+nero@users.noreply.github.com> Date: Sun, 8 Sep 2019 11:00:19 +0000 Subject: [PATCH] Fix copying of kernel arguments --- boot/floppy.asm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/boot/floppy.asm b/boot/floppy.asm index c72fa21..5ea7a72 100644 --- a/boot/floppy.asm +++ b/boot/floppy.asm @@ -207,15 +207,17 @@ main: mov cx, 0x007F mov di, arguments xor ax, ax - repe scasb + repne scasb + dec di sub di, arguments mov cx, di ; setup arguments field mov [0x080], cl - mov di, [0x081] + mov di, 0x081 mov si, arguments rep movsb + mov BYTE [di], 0x0D ; setup int 19h call at 0000, and push its address to stack mov WORD [0000], 0x19CD @@ -249,7 +251,7 @@ filename: db "KERNEL COM" arguments: - db " ", 0 + db "", 0 times (0x1FE - ($-$$)) db 0