;第1题
MOV DI,AX
SUB BL,CL
MOV AL,BL
CBW ;符号扩展
CMP AX,DI
JZ DH_0
MOV DH,1
JMP NEXT
DH_0:
MOV DH,0
NEXT:
...
;第2题
CODE SEGMENT
ASSUME CS:CODE
MOV AL,84H
MOV BL,95H
MOV CL,76H
MOV DL,AL
XOR DL,BL ;异或指令可以测出对应位是否相同
TEST DL,80H ;最高位相同则为○,否则为1
JZ NEXT
MOV AH,1
JMP FINISH
NEXT:
MOV DL,AL
XOR DL,CL
TEST DL,80H
JZ SF0
MOV AH,3
JMP FINISH
SF0:
MOV AH,0
FINISH:
HLT
CODE ENDS
END