Question: ; Should return Z = ( A 3 ) | ( B 5 1 4 ) ; Assume A and B are in R 0

; Should return Z =(A 3)|(B 514)
; Assume A and B are in R0 and R1, respectively
; The value of Z should be placed in RO at the end
Part3_Function
;Your code here
LSL RO, RO, #3
AND R1, R1, #14
ORR RO, RO, R1
BX LR
Consider the code above which is actually from a previous semester's Lab 2 part 3. Note that it is
very similar to your part 3 and notice I am using the full syntax rather than a shorter version (the King's
English). Suppose RO=0x00000004(A) and R1=0x00000011(B) before we call (Branch Link) to
Part3_Function. Then the values of R0 and R1 at the end of this function are (notice that #3 and #14 are
DECIMAL numbers)
a.RO=000000020,R1=00000000E
b.RO=000000020,R1=000000014
c.RO=000000020,R1=000000000
d. None of the above
; Should return Z = ( A < < 3 ) | ( B 5 1 4 ) ;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!