assembly - Strange symbols appear when I print memory with 'Int 21h/AH=09h" -
i'm using tasm, tlink , td (debugger) in dosbox.
i've tried programming simple asm 8086 program suppose print value @ address 0100h. when print result output resembles:
my code is:
.model small .stack .data .code .startup mov si,0100h mov word ptr[si],31 mov dx,0 mov ah,09h mov dx,[si] int 21h mov ah,4ch int 21h end
invoking 21h interrupt ah set 09h, print $ terminated string in register dx. in case dx contains 31h, point (i assume) garbage, that's why you're getting random symbols printed.
create string want print inside data section, , make dx register point it, before invoking print syscall.

Comments
Post a Comment