编写汇编语言程序,将字符串'Assembly language Programming'全部转换...
发布网友
发布时间:2023-11-29 01:09
我来回答
共1个回答
热心网友
时间:2024-03-13 18:22
DATA SEGMENT
BUF DB 'Assembly language Programming',13,10,'$'
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:MOV AX,DATA
MOV DS,AX
LEA DX,BUF
MOV AH,9
INT 21H
LEA SI,BUF
L_START:CMP BYTE PTR[SI],13
JZ L_END
CMP BYTE PTR [SI],'a'
JB L_EXIT
CMP BYTE PTR [SI],'z'
JA L_EXIT
SUB BYTE PTR [SI],20H
L_EXIT: INC SI
JMP L_START
L_END: MOV AH,9
LEA DX,BUF
INT 21H
MOV AH,4CH
INT 21H
CODE ENDS
END START