So I am trying to make a printf process in assembly 86x (using emu8060) to make it easier to display stuff to the screen, I am using the register bx as a parameter, so I pass a variable inside, and then in1 printf1 process, I am moving the value bx into another variable called ln, then displaying it. the problem is, it just displays llo world
Here is my code:
.model tiny
.code
org 100h
printf proc
mov ln, bx ; SHOULD give me the value of var bye (a dw)
mov ah, 09h
mov dx, offset ln
int 21h
mov ah, 4ch
mov al, 00
int 21h
ret
printf endp
main proc near
mov bx, bye
call printf
endp
ln dw "Hello world $"
bye dw "Bye WORLD $"
end main
; output: llo world