DATA SEGMENT
A DB 10H
B DB 20H
MSG1 DB 10,13,"BOTH A AND B ARE EQUAL$"
MSG2 DB 10,13,"A IS GREATER THAN B$"
MSG3 DB 10,13,"B IS GREATER THAN A$"
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
MOV AL,A
CMP AL,B
JZ LAB1
JA LAB2
MOV AH,09H
LEA DX,MSG3
INT 21H
JMP END1
LAB1:
MOV AH,09H
LEA DX,MSG1
INT 21H
JMP END1
LAB2:
MOV AH,09H
LEA DX,MSG2
INT 21H
JMP END1
END1: MOV AX,4C00H
INT 21H
CODE ENDS
END START
OUTPUT
***********
D:\tasm\tasm1>K
B IS GREATER THAN A