Files
2026-06-25 00:09:09 +08:00

24 lines
372 B
NASM
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
; 实验三-2分支程序示例1 - 求两个数中的较大值
; 功能求X和Y中的较大值存入Z
DATA SEGMENT
X DB 10
Y DB 20
Z DB ?
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE, DS:DATA
START:
MOV AX, DATA
MOV DS, AX
MOV AL, X
CMP AL, Y
JA NEXT
MOV AL, Y
NEXT:
MOV Z, AL
MOV AH, 4CH
INT 21H
CODE ENDS
END START