INT 21h does not print

2020-05-01 06:50发布

问题:

I wonder why this procedure does not print:

print:
push ax
push bx
push dx
mov ah, 02h      

ciclo:
mov al, [si]   
int 21h
inc si
loop ciclo

pop dx
pop bx
pop ax 
ret

According to here, calling INT 21h while AH is 2, prints on stdout the ASCII code contained in AL. While debugging I found nothing...

回答1:

It will print the character in DL (see this reference).

For example, if DL contains the decimal value 65, it will print the character A (since 65 is the ASCII code for 'A')