Translate B 1 A4 f to ARM Assume f is in register X9 the b

Translate B [1] = A[4] + f to ARM. Assume f is in register X9, the base addresses of arrays A and B are in X10 and X11, and A and B both contain 64 bit double words. You may also use any other registers.

Solution

Solution: See the code below

----------------------------------------------

; move X10 by 20 so that it contains the address storing the 5th integer in array A.

; an integer takes 4 bytes.

ADD X10, X10, #20

; move X11 by 4 so that it contains the address storing the second element in array B

ADD X11, X11, #4

; B[1] = A[4] + f.

; Add values indicated by registers X10, X9 and store the result to X11.

ADD X11, X10, X9

-----------------------------------------------

 Translate B [1] = A[4] + f to ARM. Assume f is in register X9, the base addresses of arrays A and B are in X10 and X11, and A and B both contain 64 bit double

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site