Examine the following assembly code for the function: int* bearCatFunction(int *
ID: 3695164 • Letter: E
Question
Examine the following assembly code for the function: int* bearCatFunction(int *a, int b, int c) 00000000 : 0: e61510002 cmp r1, r2 4: e92d0030 push {r4, r5} 8: aa000009 bge 34 c: e080c102 add r12, r0, r2, 1s1 #2 10: e0803101 add r3, r0, r1, 1s1 #2 14: e59c4000 1dr r4, [r12] 18: e5935000 1dr r5, [x3] 1c: e2811001 add r1, r1, #1 20: e2422001 sub r2, r2, #1 24: e1510002 cmp r1, r2 28: e40c5004 str r5, [x12], #-4 2c: e4834004 str r4, [r3], #4 30: bafffff7 blt 14 34: e8bd0030 pop {r4, r5} 38: e12fff1e bx 1r [15] (a) Write the equivalent code in C. You may use whatever variables you choose.Explanation / Answer
b) the function will do 2's compliment of a given two binary numbers
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.