code segment
assume cs:code
start:
push cs
pop ds
mov dx,offset tips
mov ah,9
int 21h
mov si,3500h;十进制ASCII存于3500H起单元
mov di,350ah;BCD后再存于350AH起内存
mov cx,10;只够输入10个字符
Q0:mov ah,1
int 21h
cmp al,'0'
jb Q1
cmp al,'9'
ja Q1
mov [si],al
sub al,30h
mov [di],al
jmp Q2
Q1:mov al,0ffh
mov [si],al
mov [di],al
Q2:inc si
inc di
Q3:loop Q0
mov ah,0
int 16h
mov ah,4ch
int 21h
tips db 'Press any key...',0dh,0ah,'$'
code ends
end start
不懂,。。