Question: Complete the following program that only adds integers that are even negatives. The program considers the NON - ZERO integers at labels N 1 ,

Complete the following program that only adds integers that are even negatives. The program considers the NON-ZERO integers at labels N1, N2, and N3 and stores the sum of the appropriate integers in the memory at label SUM. It uses a subroutine at label CHKN to check each integer. .ORIG \times 3000 LD RO, N1 L1 ADD R 1, R 0, #0 LD R O, N 2 LEA R6, CHKN L2 JMP R6 ADD R1, R1, R LD RO, N3 L3 ADD R1, R1, R ST R1, SUM HALT CHKN ADD R4, RO, #0 ; move in to R4 for testing AND R4, R4, x0001 ; right most bit is always 1 if odd WRONG AND R 0, R 0, # 0; zero out wrong values RETURN RET N1.FILL; value not shown N2.FILL ; value not shown N3.FILL; value not shown SUM .FILL #0. END

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!