Question: 4 . Bug in equality check The following code checks if the value in memory address x 3 0 2 5 is equal to 2
Bug in equality check
The following code checks if the value in memory address x is equal to and if so it prints a message to the screen. However, it has a bug.
ORIG x
LDI R ADDRESS
ADD R R #
BRnp FINISH
LEA RO MESSAGE
PUTS
FINISH
HALT
MESSAGE
STRINGZ Mx is equal to twenty"
ADDRESS
FILL x
END
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
