Files
Operating-System/Experiment/asm-exp/实验三/code/EX3_1_SymbolicCompare.asm
2026-06-25 00:09:09 +08:00

27 lines
414 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.
; 实验三-1符号数比较
; 功能比较X和Y两个符号数的大小
; 说明如果X >= Y则Z = Y否则Z = X
DATA SEGMENT
X DW 1234H
Y DW 5678H
Z DW ?
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE, DS:DATA
START:
MOV AX, DATA
MOV DS, AX
MOV AX, X
CMP AX, Y
JGE NEXT
MOV Z, AX
JMP EXIT
NEXT:
MOV Z, Y
EXIT:
MOV AH, 4CH
INT 21H
CODE ENDS
END START