From 39da2f46a063adf0f35c23542b5999082736ef9d Mon Sep 17 00:00:00 2001 From: Jeremy Soller <jackpot51@gmail.com> Date: Wed, 19 Oct 2016 12:07:31 -0600 Subject: [PATCH] Fix for bootloader on new BIOS (don't know exactly why though) --- x86_64/bootsector.asm | 9 +++++++-- x86_64/print16.asm | 10 ++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/x86_64/bootsector.asm b/x86_64/bootsector.asm index 11ea087..b66184e 100644 --- a/x86_64/bootsector.asm +++ b/x86_64/bootsector.asm @@ -26,8 +26,13 @@ boot: ; dl comes with disk call print call print_line - mov bh, 0 - mov bl, [disk] + mov bx, (startup_start - boot) / 512 + call print_num + call print_line + + mov bx, startup_start + call print_num + call print_line mov eax, (startup_start - boot) / 512 mov bx, startup_start diff --git a/x86_64/print16.asm b/x86_64/print16.asm index c4a04e1..dada0fd 100644 --- a/x86_64/print16.asm +++ b/x86_64/print16.asm @@ -2,18 +2,16 @@ SECTION .text USE16 ; provide function for printing in x86 real mode - -; a newline -newline: db 13,10,0 - ; print a string and a newline ; IN ; si: points at zero-terminated String ; CLOBBER ; ax print_line: - mov si, newline - jmp print + mov al, 13 + call print_char + mov al, 10 + jmp print_char ; print a string ; IN -- GitLab