Question: Which selections are the correct implementation of the following pseudocode? ( assume values are unsigned ) if ( val 1 > val 2 | |

Which selections are the correct implementation of the following pseudocode? (assume values are unsigned)
if( val1> val2|| val2> val3)
val4= val1;
else
val4= val3;
a.
ADR R0, val1
LDR R1,[R0]
ADR R0, val2
LDR R2,[R0]
ADR R0, val3
LDR R3,[R0]
ADR R0, val4
CMP R1, R2
BGT L1
CMP R2, R3
BGT L1
STR R3,[R0]
B L2
L1 STR R1,[R0]
L2
b.
ADR R0, val1
LDR R1,[R0]
ADR R0, val2
LDR R2,[R0]
ADR R0, val3
LDR R3,[R0]
ADR R0, val4
CMP R1, R2
BLE L1
CMP R2, R3
BLE L1
STR R1,[R0]
B L2
L1 STR R3,[R0]
L2
c.
ADR R0, val1
LDR R1,[R0]
ADR R0, val2
LDR R2,[R0]
ADR R0, val3
LDR R3,[R0]
ADR R0, val4
CMP R1, R2
BGT L1
CMP R2, R3
BGT L1
STR R1,[R0]
B L2
L1 STR R3,[R0]
L2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The question seems to be asking you to identify the correct assembly code implementations for a piec... View full answer

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!