从键盘输入10个字符,在第二行倒序显示输入内容。
一、实验目的及要求
1.熟练掌握顺序、分支程序的设计方法
2.熟练掌握程序的编写与调试
二、实验内容
.从键盘输入10个字符,在第二行倒序显示输入内容。
1.编写源程序
*data segment
crlf db 0ah,0dh,’$’
data ends
code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
mov cl,0
a:
mov ah,1
int 21h
cmp al,0dh
jz b
inc cl
push ax
jmp a
mov al,crlf
mov ah,9
int 21h
b:
pop dx
mov ah,2
int 21h
loop b
mov ah,4ch
int 21h
code ends
end start
*