assume cs:code data segment db 10 dup (0) code segment start: mov ax,12666 mov bx,data mov ds,bx mov si,0 call dtoc mov dh,8 mov dl,3 mov cl,2 call show_str mov ax,4c00h int 21h dtoc: push ax push bx push cx push dx push si push di mov bx,10 mov dx,0 mov di,0 change: div bx add dx,30h push dx inc di mov cx,ax jcxz ok mov dx,0 jmp short change ok:mov cx,di s:pop [si] inc si loop s pop di pop si pop dx pop cx pop bx pop ax ret show_str: push ax push cx push es push si push di mov di,0 mov ah,0 mov al,160 mul dh add di,ax mov ah,0 mov al,2 mul dl add di,ax mov ax,0b800h mov es,ax mov ah,cl chang:mov cl,[si] jcxz ol mov al,[si] mov es:[di],ax inc si add di,2 jmp short chang ol:pop di pop si pop es pop cx pop ax ret code ends end start
标签:10.3,di,汇编语言,mov,pop,si,push,ax,王爽 From: https://www.cnblogs.com/hellomydaughter/p/17527363.html