Files
Operating-System/Experiment/asm-exp/实验二/基础性实验2_多字节加法.asm
2026-06-25 00:09:09 +08:00

22 lines
552 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.
; 实验二基础性实验二:多字节加法运算
; 程序功能实现32位数据加法
; 被加数12345678H加数87654321H结果存入指定内存
CODE SEGMENT
ASSUME CS:CODE
ORG 100H
START:
MOV AX, 5678H ; 被加数低16位
MOV DX, 1234H ; 被加数高16位
MOV CX, 4321H ; 加数低16位
MOV BX, 8765H ; 加数高16位
ADD AX, CX ; 低16位相加
ADC DX, BX ; 高16位带进位相加
; 结果DX:AX = 99999999H
INT 20
CODE ENDS
END START