给定一个数(0~9),求次数的平方值,并存放到内存中
结果输出来是3,请问是哪里出问题了呢?
DATAS SEGMENT
RS1 DB 00H,01H,02H,03H,04H,05H,06H,07H,08H,09H;
RS2 DB 3
RS3 DB ?
DATAS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS
START:
MOV AX,DATAS
MOV DS,AX
LEA BX,RS1
LEA SI,RS2
MOV AL,[SI]
MOV AH,00H
ADD BX,AX
MOV AL,[BX]
MOV RS3,AL;
ADD AL,30H
MOV DL,AL
MOV AH,2
INT 21H
MOV AH,4CH
INT 21H
CODES ENDS
END START