2. a) (10 points) What C code line most likely created this assembly code? Assum
ID: 3756308 • Letter: 2
Question
2. a) (10 points) What C code line most likely created this assembly code? Assume A, B, C and D variables in assembly are x, y, z and w in C, respectively b) (5 points) What is the result in A at the end of execution of this program? Assembly Program AREA c, CODE EXPORT main ENTRY main PROC LDR r2, =B LDR r3, [r2] LDR r2, =C LDR r5, [r2] ADD r3, r3, r5 LDR r2,-D LDR r5, [r2] SUB r3, r3, r5 LDR r2, -A STR r3, [r2 AREA d, DATA A DCD B DCD 5 C DCD D DCD 2 ENDP END (15 points) For the six-bit binary values given below, find the equivalent decimal values when the data is interpreted as unsigned integers or signed integers. 3. 001111, 101011, 110110Explanation / Answer
a)
A = x
B = y
C = z
D = w
int main(){
int x=0;
int y=5;
int z=1;
int w=2;
x = y+z-w;
return 0;
}
b)
A = B+C-D = 4
c)
001111 :-
Unsigned = 15
Signed = 15
101011 :-
Unsigned = 43
Signed = -21
110110 :-
Unsigned = 54
Signed = -10
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.