微机原理与汇编语言 求高手正确解答

2024-12-12 22:03:20
推荐回答(1个)
回答1:

DATA SEGMENT
BUF DB 'AFDEUFF'
COUNT EQU $-BUF
DATA ENDS
STACK SEGMENT
BUF1 DB 'AFDESFI'
COUN EQU $-BUF1
STACK ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA,SS:STACK
START:MOV AX,DATA
MOV DS,AX
MOV AX,STACK
MOV SS,AX
MOV AX,1
CALL L_CMP
MOV AH,4CH
INT 21H
L_CMP PROC
MOV CX,COUNT
CMP CX,COUN
JB L2
JMP L3
L2: MOV CX,COUN
L3: LEA SI,BUF
LEA DI,BUF1
REPE CMPSB
CMP CX,0
JNE L_EXIT
JMP L_END
L_END:SUB AX,0
JMP EXIT
L_EXIT:
CMP AX,AX

EXIT:
RET
L_CMP ENDP
CODE ENDS
END START
最后一句话什么意思,你说清楚点,等下我帮你再改下