; 写了个小程序
DATAS SEGMENT
A DB ?
B DB ?
DATAS ENDS
STACKS SEGMENT
;此处输入堆栈段代码
STACKS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS,SS:STACKS
START:
MOV AX,DATAS
MOV DS,AX
MOV AH,01H
INT 21H
MOV A,AL ;从键盘输入一个字符,并存于A中
MOV AH,01H
INT 21H
MOV B,AL ;从键盘输入一个字符,并存于B中
CMP AL,A
JA GOTO1 ;如果B>A 跳转
MOV DL,'A' ;显示A大于B
MOV AH,02
INT 21H
MOV DL,'>'
MOV AH,02H
INT 21H
MOV DL,'B'
MOV AH,02
INT 21H
JMP EXIT
GOTO1:
MOV DL,'B' ;显示B大于A
MOV AH,02
INT 21H
MOV DL,'>'
MOV AH,02H
INT 21H
MOV DL,'A'
MOV AH,02
INT 21H
EXIT:
MOV AH,4CH
INT 21H
CODES ENDS
END START