问题:输入十六进制数以二进制输出
DATAS SEGMENT
T1 DB '2234H=$'
T2 DW ?
;此处输入数据段代码
DATAS ENDS
STACKS SEGMENT
;此处输入堆栈段代码
STACKS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS,SS:STACKS
START:
MOV AX,DATAS
MOV DS,AX
MOV AH,9
LEA DX,T1
MOV AH,9
INT 21H
MOV CX,16
MOV BX,4
Y1:
SHL AX,1
PUSH AX
MOV DL,0
ADC DL,30H;DL+30H+CF
MOV AH,2
INT 21H
DEC BX
CMP BX,0
JNE Y2
MOV BX,4
MOV AH,2
MOV DL,' '
INT 21H
Y2:
DEC CX
CMP CX,0
POP AX
JNZ Y1
MOV AH,2
MOV DL,'B'
INT 21H
;此处输入代码段代码
MOV AH,4CH
INT 21H
CODES ENDS
END START