数制与码制转换及子程序设计-汇编实验三
作者:互联网
DATA SEGMENT
NUM DW 1010111101101001B;AF69H
DATA ENDS
SSEG SEGMENT STACK
SSEG ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
MAIN PROC FAR
START: MOV AX,DATA
MOV DS,AX
MOV DX,NUM
PUSH DX
MOV CL,4
MOV DL,DH
SHR DL,CL
CMP DL,9
JBE NEXT1
ADD DL,7
NEXT1: CALL DISP
MOV DL,DH
AND DL,0FH
CMP DL,9
JBE NEXT2
ADD DL,7
NEXT2: CALL DISP
POP DX
MOV DH,DL
MOV CL,4
SHR DL,CL
CMP DL,9
JBE NEXT3
ADD DL,7
NEXT3: CALL DISP
MOV DL,DH
AND DL,0FH
CMP DL,9
JBE NEXT4
ADD DL,9
NEXT4: CALL DISP
MOV DL,'H'
MOV AH,2
INT 21H
MOV AX,4C00H
INT 21H
MAIN ENDP
DISP PROC
ADD DL,30H
MOV AH,2
INT 21H
RET
DISP ENDP
CODE ENDS
END START
标签:DISP,DL,数制,DH,及子,MOV,ADD,码制,JBE 来源: https://blog.csdn.net/weixin_53051556/article/details/121651617