汇编:把X,Y中较大者置入Z
代码
1 DATAS SEGMENT
2 X DB 0AH
3 Y DB 0CH
4 Z DB ?
5 DATAS ENDS
6
7 CODES SEGMENT
8 ASSUME CS:CODES,DS:DATAS
9 START:
10 MOV AX,DATAS
11 MOV DS,AX
12 MOV AL,X
13 CMP AL,Y
14 JGE NEXT
15 MOV AL,Y
16 NEXT:MOV Z,AL
17 ADD Z,37H
18 MOV DL,Z
19 MOV AH,2
20 INT 21H
21
22 MOV AH,4CH
23 INT 21H
24 CODES ENDS
25 END START