Question: WRITE ARM ASSEMBLY CODE for the equaivelnt c++ code For each of the following C++-like pseudo code segments, write equivalent ARM assembly language instructions. a))
WRITE ARM ASSEMBLY CODE for the equaivelnt c++ code
For each of the following C++-like pseudo code segments, write equivalent ARM assembly language instructions.
a)) if (r1
r2 = r2 + r1; }
r2 = r2 + 4;
b)) if (r1
r3 = r3 + 50;
else
r3 = r3 r2;
c)). if (r1 == r2)
r1 = r1 + 10;
else if (r1 > r2)
r1 = r1 - 10;
else if (r1
r1 = r1 + 20;
else
r1 = 100 r1;
d)). switch (r0) {
case 0: r5=r5+r1;
// Note that there is no break here
case 1: r5=r5+r2;
break
case 2: r5=r5+r3;
break;
default: r5=r5*r4+r6; }
e)) for (r4 = 0; r4
r1 = r1 + r4;
r2 = r2 - 1; }
f)). while (r4
r1 = r1 - 2;
r2 = 40 - r2;
r4 = r4 + 1;
}
g)) do {
r1 = r1 - 2;
r2 = 40 r2;
r4 = r4 + 1;
} while ( r4
Question IL 170 markala For each of the following C++-like pseudo code segments, write equivalent ARM assembly language instructions .. if (r 32) 1 -r1 - 10 else if (r1 13) r1 - rl 20 else r1 = 100 - 11: d. switch () case 0:5 15 + 1 // Note that there is no break here case 1: 5 - 35 22: 15 - 15. 13: break NAME default: break; 5 - 15 r. 26 1 e. for (4 = 04 32) 1 -r1 - 10 else if (r1 13) r1 - rl 20 else r1 = 100 - 11: d. switch () case 0:5 15 + 1 // Note that there is no break here case 1: 5 - 35 22: 15 - 15. 13: break NAME default: break; 5 - 15 r. 26 1 e. for (4 = 04 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
