;This program adds the following two multiword numbers and saves the result: ;DATA1 = 548FB9963CE7H and DATA2 = 3FCD4FA23B8DH. TITLE PROG3-2 (EXE) MULTIWORD ADDITION PAGE 60,132 .MODEL SMALL .STACK 64 ;-------------- .DATA DATA1 DQ 548FB9963CE7H ORG 0010H DATA2 DQ 3FCD4FA23B8DH ORG 0020H DATA3 DQ ? ;-------------- .CODE MAIN PROC FAR MOV AX,@DATA MOV DS,AX CLC ;clear carry before first addition MOV SI,OFFSET DATA1 ;SI is pointer for operand1 MOV DI,OFFSET DATA2 ;DI is pointer for operand2 MOV BX,OFFSET DATA3 ;BX is pointer for the sum MOV CX,04 ;CX is the loop counter BACK: MOV AX,[SI] ;move the first operand to AX ADC AX,[DI] ;add the second operand to AX MOV [BX],AX ;store the sum INC SI ;point to next word of operand1 INC SI INC DI ;point to next word of operand2 INC DI INC BX ;point to next word of sum INC BX LOOP BACK ;if not finished, continue adding MOV AH,4CH INT 21H ;go back to DOS MAIN ENDP END MAIN