From d98786072cd74068fd993ef112ab22999f39324a Mon Sep 17 00:00:00 2001 From: Elaina Claus Date: Fri, 18 Oct 2024 07:58:40 -0400 Subject: [PATCH] use movzx instead of goofy mov word and and mask the upper bits --- src/stage2/stage2.nasm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/stage2/stage2.nasm b/src/stage2/stage2.nasm index 7a47fda..dbe80d8 100755 --- a/src/stage2/stage2.nasm +++ b/src/stage2/stage2.nasm @@ -235,10 +235,7 @@ ALIGN 4, db 0x90 PrintCharacter: __CDECL16_ENTRY .func: - mov ax, [bp + 4] ; c - mov dx, 0x00ff - and ax, dx - + movzx ax, byte [bp + 4] ; AL = character c mov ah, 0x0E ; INT 0x10, AH=0x0E call mov bx, 0x0007 ; BH = page no. BL =Text attribute 0x07 is lightgrey font on black background int 0x10 ; call video interrupt