Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a single line of ARM assembly code to invert the lower six bits of registe

ID: 3665503 • Letter: W

Question

Write a single line of ARM assembly code to invert the lower six bits of register rl. What are the contents of register r9 after the following instructions have executed? Assume r/and r6 contain 0x0BCB85Al and 0x28EC75A9 respectively. EOR r9, rl, r6 Replace the following ARM assembly language instruction sequence with a single line of ARM assembly code. MVN r4, r4 AND r3, r3, r4 MVN r4, r4 Write a short program which implements the following line of high level language pseudocode. Assume all source registers may be used as scratch registers. r0:-=(r3 + 29)/8 + 17 - r2 * rl

Explanation / Answer

single line of ARM assembly code to set bits 7,10 and 12 of register r9

Ans:

MOV r9,#0X00001480

this code will set the 7th, 10th and 12th bits of r9.

----------------------------------------------------------
single line of ARM assembly code to invert the lower 6 bits of register r1

Ans:

Assume the values are in registers
r1=0xFFFFFFFF

then

AND r1,r1,#0XFFFFFFC0


or


BIC r1,r1,#0x0000003F

this instuction will invert the lower 6 bits of r1
----------------------------------------------------------
9.a) EOR r9,r1,r6: This instruction will perform
XOR operation of the contents in registers r1 and r6 and
store the result in r9.

Here
[r1]=0x08CB85A1
[r6]=0x28ec57A9 XOR
----------------
[r9]=0x2027f008
----------------
----------------------------------------------------------
b)

-----------------------------------------------------------
c)

MUL r1, r2, r1
ADD r0,r0,#29
MOV r0,r0,LSL #08
add r0,r0,#17
sub r0,r0,r1

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote