DATAS SEGMENT
TAB DB 12H,83H,00H,0ABH,3AH,2CH,98H,0BEH,0B1H,0B2H,45H,65H,0DCH,88H,0DCH,88H,0DCH,88H
RESULT DB 100 DUP(?)
COUNT =RESULT-TAB
DATAS ENDS
STACKS SEGMENT
DB 200 DUP(?)
STACKS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS,SS:STACKS
START:
MOV AX,DATAS
MOV DS,AX
MOV AL,0
MOV CX,COUNT
LEA SI,TAB
LEA DI,RESULT
AGAIN: TEST BYTE PTR[SI],80H
JNZ A
MOV DL,BYTE PTR[SI]
MOV [DI],DL
INC SI
INC DI
LOOP AGAIN
JMP OUTA
A: INC AL
NEG BYTE PTR[SI]
MOV DL,BYTE PTR[SI]
MOV [DI],DL
INC SI
INC DI
LOOP AGAIN
OUTA: ADD AL,30H
CMP AL,39H
JA B
MOV AH,2
MOV DL,AL
INT 21H
JMP EXIT
B: ADD AL,07H
MOV DL,'0'
MOV AH,2
INT 21H
MOV AH,0
MOV DL,0
MOV AH,2
MOV DL,AL
INT 21H
MOV AH,2
MOV DL,'H'
INT 21H
EXIT: MOV AH,4CH
INT 21H
CODES ENDS
END START
为什么输出结果是00H,而不是0CH ?
如果改成:
B: ADD AL,07H
MOV BL,AL
MOV DL,'0'
MOV AH,2
INT 21H
MOV AH,0
MOV DL,0
MOV AH,2
MOV DL,BL
INT 21H
MOV AH,2
MOV DL,'H'
INT 21H
就能输出0CH
这里的AL的值怎么受到
MOV DL,'0'
MOV AH,2
INT 21H
影响而变为30H的?