ORG 0100H
NUMBER1 EQU 78
NUMBER2 EQU 25
MOV AL,NUMBER1 ; STORE NUMBER1 VALUE IN (AL)
MOV BL,NUMBER2 ; STORE NUMBER2 VALUE IN (BL)
CMP AL,BL ; COMPARE (AL) REGISTER AND (BL) REGISTER
JB STOP ; IF (AL) IS LESS THAN (BL) EXIT FROM PROGRAM
XCHG AL,BL ; OTHERWISE EXCHANGE VALUES OF TWO REGISTERS
STOP:
RET
1条答案
按热度按时间sg3maiej1#
试试这个代码。