将程序改写为com文件格式,并把数据置于程序的末尾--这样调试最方便 !
CODE SEGMENT
ASSUME CS:CODE
ORG 100H
START:
PUSH CS
POP DS
PUSH CS
POP ES
LEA SI,DAT0
LEA DI,DAT1
LEA BX,RSLT
MOV CX,LENGTH0
XOR AL,AL ;将al置0
NEXT: MOV AL,[SI]
ADC AL,[DI]
MOV [BX],AL
INC SI
INC DI
INC BX
LOOP NEXT
MOV [BX],AL
INT 3
MOV AX,4C00H
INT 21H
DAT0 DB 3BH,77H,0BBH
LENGTH0 EQU $-DAT0
DAT1 DB 17H,4DH,88H
RSLT DB LENGTH0+1 DUP(?)
CODE ENDS
END START