From 75c046f9cd8ae207ff34e7929f774af6809726b4 Mon Sep 17 00:00:00 2001 From: Elaina Claus Date: Tue, 8 Oct 2024 20:23:16 -0400 Subject: [PATCH] use gs for vesa framebuffer (was fs) --- include/util/error_func.nasm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/util/error_func.nasm b/include/util/error_func.nasm index 1f9281d..6c2aa92 100644 --- a/include/util/error_func.nasm +++ b/include/util/error_func.nasm @@ -30,10 +30,6 @@ ; pass error as ascii character in al, errors a-zA-Z or 0-9 ALIGN 4, db 0x90 error: - ; fs = 0xb800 => fs:0x0000 = 0xb8000 - mov dx, 0xB800 - mov fs, dx ; F segment to 0xB800 = video memory - cmp al, STEVIA_DEBUG_OK jge short .debug ; the 'letter >= W' (W, X, Y, Z) are used as special debug codes mov ah, 0x4F ; color 0x4F is white text/red background @@ -41,8 +37,11 @@ error: .debug: mov ah, 0x5F ; debug case is white text/purple background .print: - mov word [fs:0x0000], ax + mov dx, 0xB800 + mov gs, dx + mov word [gs:0x0000], ax ; 0xB8000 = video memory .halt: + cli hlt jmp short .halt