一个程序,高手指点一下
两个二位十进制数相加,以asc码存放在data1,data2 为首的五个内存单元,(低位在前),结果送回data1,以下是我的程序,运行结果很奇怪,请高手指点指点.
DATA SEGMENT
DATA1 DB '???'
DATA2 DB '??'
STRING DB 's is : $'
DATA ENDS
PUBLIC JISUAN
CODE SEGMENT
JISUAN PROC FAR
ASSUME CS:CODE,DS:DATA
START: MOV AX,DATA
MOV DS,AX
MOV SI,1
CLC
MOV AH,1
INT 21H
MOV DATA1[SI],AL
INC SI
INT 21H
MOV DATA1[SI],AL;低位在前我理解为低位地址低
MOV SI,0
INT 21H
MOV DATA2[SI],AL
INC SI
INT 21H
MOV DATA2[SI],AL
MOV SI,0
MOV AL,DATA2[SI]
SUB AL,30H
INC SI
ADD AL,DATA1[SI]
AAA
MOV SI,0
MOV DATA1[SI],AL
;INC SI
;MOV DATA1[SI],AH
MOV SI,2
MOV AL,DATA2[SI]
SUB AL,30H
DEC SI
ADC AL,DATA1[SI]
AAA
MOV DATA1[SI],AL
INC SI
MOV DATA1[SI], AH
MOV AH,09H
MOV DX,OFFSET STRING
INT 21H
MOV SI,2
MOV AH,02H
MOV DL,DATA1[SI]
INT 21H
DEC SI
MOV DL,DATA1[SI]
INT 21H
DEC SI
MOV DL,DATA1[SI]
INT 21H
RET
JISUAN ENDP
CODE ENDS
END START
------解决方案--------------------在JAVA版问汇编?
我汇编不好