Question: In this case we have two new instructions, complete a trace for the following case. CMP ( compare ) compares two registers and results in

In this case we have two new instructions, complete a trace for the following case.
CMP (compare) compares two registers and results in an EQUAL (EQ) or not equal (NE) outcome.
JMP will jump to another part of the program if the condition (EQ or NE) is true.
\table[[START,LDI,R1,3],[LOOP,LDI,R2,1],[,SUB,R2,R1,R1],[,LDI,R2,0],[,CMP,R1,R2],[,JMP,NE, LOOP],[END,HALT,]]
In this case we have two new instructions,

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 Programming Questions!