Question
ASSEMBLY CODE NEED ASAP WILL RATE RIGHT AWAY
all Verizon 6:48 PM What will r2 contain after the execution of the following instructions assuming that the instructions are executed independently? given that initially r2=0XFFFFFFFF r1=0xFF00FF00 and r0= 0xF7 1) MVN r2, 0x7E000000 2) EOR r2,rO,r1; 3) ROR r2,ro,#2; 4)MLA r2,r2,r2,rO 5) RRX, r2,r& initial carry flag =1 6) MOV r2,(14<<3) 7)ASR r2,r1,#1 8)LSL r2,r1,#3 9) LAR r2,r1,#3
0 0
Add a comment Improve this question Transcribed image text
Answer #1

r2 = 0x1C2D3E4F
r1 = 0x83FAC180
r0 = 0xF7

1. MVN r2, 0xFF000000; which means r2 <- NOT 0xFF000000 => r2 <- 0x00FFFFFF.
So, after this instruction r2 will hold, 0x00FFFFFF.

2. RSB r2, r0, 0xFF; Subtracts the value in r0 from the value 0xFF. i.e., r2 <- 0xFF - 0xF7, => r2 <- 0x08.
So, after this instruction r2 will hold, 0x08.

3. ROR r2, r0, #2; Rotates the bits in register r0 by 2 positions and store in r2. i.e., r2 <- 0xF7 rotates by 2 bits.
So, after this instruction r2 will hold, 0xC03D, assuming it to be 16 bit.
If it is 32 bit, then the value in r2 will be 0xC000003D.

4. REVSH r2, r1; Reverses byte order in bottom half word, and sign extend the value in r1.
So, after this instruction r2 will hold, 0x83FA80C1

Add a comment
Know the answer?
Add Answer to:
ASSEMBLY CODE NEED ASAP WILL RATE RIGHT AWAY all Verizon 6:48 PM What will r2 contain...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT