请问用8086汇编语言编写程序计算1+2+……+100 怎么写??求代码,谢谢

2024-12-26 04:31:26
推荐回答(1个)
回答1:

DSEG SEGMENT
RESULT DW 0
DSEG ENDS
CSEG SEGMENT
ASSUME CS:CSEG,DS:DSEG

START:
MOV AX,DSEG

MOV DS,AX

;

XOR AX,AX
MOV CX,100

C1:
ADD AX,CX

LOOP C1

;
MOV RESULT,AX

;

MOV AX,4C00H

INT 21H

CSEG ENDS
END START