DATA SEGMENT
S DW (?)
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
【编程实现( S=1+2+3+……+100 ,要求计算后的结果存放在变量S里)】MOV CX,100
MOV AX,0H
MOV BX,1H
LOOP1:
ADD AX,BX
INC BX
LOOP LOOP1
MOV S,AX
MOV AH,4CH
INT 21H
CODE ENDS
END START