lab6_2.asm

来自「从键盘输入一个字符串, 1.先把它原样显示一遍 2.将其中的小写字母转换为」· 汇编 代码 · 共 58 行

ASM
58
字号
show macro string

	mov dx,0ah	;回車換行
	mov ah,02h
	int 21h

	mov dx,0dh
	mov ah,02h
	int 21h

	mov dx,offset string	;顯示字符串
	add dx,2
	mov ah,09h
	int 21h

endm
data segment
	s db 'INPUT THE STRING:',0ah,0dh,'$'
	user db 100 dup('$')
data ends

code segment
	assume cs:code,ds:data
start:
	mov ax,data
	mov ds,ax

	mov dx,offset s		;提示輸入
	mov ah,09h
	int 21h

	mov dx,offset user	;輸入字符串
	mov ah,0ah
	int 21h

	mov dx,0ah	;回車換行
	mov ah,02h
	int 21h

	mov dx,0dh
	mov ah,02h
	int 21h

	show user
	call change
	show user
	call up
	show user
	call down
	show user

	mov ax,4c00h
	int 21h
code ends
	include up.asm
	include down.asm
	include change.asm
end start

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?