从键盘输入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

*从键盘输入10个字符,在第二行倒序显示输入内容。

汇编连接

从键盘输入10个字符,在第二行倒序显示输入内容。

实验结果

从键盘输入10个字符,在第二行倒序显示输入内容。

相关文章:

  • 2021-10-23
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
  • 2022-02-10
  • 2021-09-29
  • 2021-10-03
猜你喜欢
  • 2021-09-02
  • 2021-04-04
  • 2021-09-26
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
  • 2021-08-08
相关资源
相似解决方案