;This program calculates the total sum of five words of data. Each data value represents the yearly ; wages of a worker. This person does not make more than $65,555 (FFFFH) a year TITLE PROG3-1B (EXE) ADDING 5 WORDS PAGE 60,132 .MODEL SMALL .STACK 64 ;-------------- .DATA COUNT EQU 05 DATA DW 27345,28521,29533,30105,32375 ORG 0010H SUM DW 2 DUP(?) ;-------------- .CODE MAIN PROC FAR MOV AX,@DATA MOV DS,AX MOV CX,COUNT ;CX is the loop counter MOV SI,OFFSET DATA ;SI is the data pointer MOV AX,00 ;AX will hold the sum MOV BX,AX ;BX will hold the carries BACK: ADD AX,[SI] ;add the next word to AX ADC BX,0 ;add carry to BX INC SI ;increment data pointer twice INC SI ; to point to next word DEC CX ;decrement loop counter JNZ BACK ;if not finished, continue adding MOV SUM,AX ;store the sum MOV SUM+2,BX ;store the carries MOV AH,4CH INT 21H ;go back to DOS MAIN ENDP END MAIN