use movzx instead of goofy mov word and and mask the upper bits

This commit is contained in:
2024-10-18 07:58:40 -04:00
parent b7e2a8e886
commit d98786072c

View File

@@ -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