I am trying to make the text screen print 'h' which is stored in a variable. I am using NASM. x86 Protected Mode, a from scratch kernel.
DisplayMessage:
;mov byte[Color], 0xF
;mov CFC, EAX;
;mov byte[Color], 104
;push 104
;mov byte[esi], Msg
;lodsb
mov ebx, Msg
add ebx, 4
mov [Msg], eax
mov byte[0xB8000], Msg
;mov byte[eax], Color
;pop byte[0xB8000]
;mov byte[0xB8000], byte Color
;mov byte[0xB8000], 0xB500000;
;Now return
ret
EndCode:
Msg: db 104
The letter it displays is never right. Whats the proper way to do this?