<p>
程序如下:<br>
SUMMING MACRO ARRAY,COUNT,RESULT<br>
LOCAL ADDITION<br>
MOV ESI,0<br>
MOV ECX,COUNT<br>
ADDITION:MOV EAX,ARRAY[ESI*4];;双字为4字节<br>
ADD RESULT,EAX<br>
ADC RESULT+4,0;;将进位加到结果的高位双字中<br>
INC ESI<br>
LOOP ADDITION<br>
ENDM<br>
.MODEL SMALL<br>
.386<br>
.DATA<br>
DATADD101246,274365,843250,475536<br>
SUMDQ?<br>
.CODE<br>
START:MOV AX,@DATA<br>
MOV DS,AX<br>
SUMMING DATA,4,SUM<br>
MOV AX,4C00H<br>
INT 21H<br>
END START</p>