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

30 lines
458 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.
; 实验三-6求最大值程序
; 功能从10个数中找最大值
DATA SEGMENT
ORG 1000H
ARR DB 10, 25, 3, 47, 15, 38, 92, 6, 71, 20
MAX DB ?
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE, DS:DATA
START:
MOV AX, DATA
MOV DS, AX
LEA SI, ARR
MOV CX, 9
MOV AL, [SI]
INC SI
NEXT:
CMP AL, [SI]
JGE SKIP
MOV AL, [SI]
SKIP:
INC SI
LOOP NEXT
MOV MAX, AL
MOV AH, 4CH
INT 21H
CODE ENDS
END START