Question: Identify all control transfers (branches) in this code, places where we will (or might) go to a line of code other than the next one,

-
Identify all control transfers (branches) in this code, places where we will (or might) go to a line of code other than the next one, and fill in a table like below.
From line To line Under what condition (if any) -
Write and test ARM code in VisUAL equivalent to the code shown above. Some test cases:
- R1 = 1: at the end, R0 should be 0
- R1 = 2: at the end, R0 should be 1
- R1 = 4: at the end, R0 should be 2
- R1 = 3: at the end, R0 should be 7
- R1 = 27: at the end, R0 should be 111
RO O VOU AWNA 0 R1 = something while (R1 + 1): if R1 is even: R1 / 2 else: R1 = 3 x R1 + 1 RO = RO + 1 R1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
