Question: Q5. The following program contain some errors. Specify and then fix the errors. This program adds four words and saves the result. TITLE PROBLEM (EXE)
Q5. The following program contain some errors. Specify and then fix the errors. This program adds four words and saves the result. TITLE PROBLEM (EXE) PROBLEM 16 PROGRAM PAGE 60,132 .MODEL SMALL STACK 32 .DATA DATA DW 234DH,DE6H,3BC7H,566AH ORG 10H SUM DW ? .CODE START: PROC FAR MOV AX,DATA MOV DS, AX MOV CX,04 SET UP LOOP COUNTER CX=4 MOV BX,0 INITIALIZE BX TO ZERO MOV DI,OFFSET DATA SET UP DATA POINTER BX LOOP1: ADD BX,(DI) ADD CONTENTS POINTED AT BY (DIJ TO BX INC DI INCREMENT DI JNZ LOOP1 JUMP IF COUNTER NOT ZERO MOV SI,OFFSET RESULT ;LOAD POINTER FOR RESULT MOV (SI),BX STORE THE SUM MOV AH,4CH INT 21H START ENDP END STRT
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
