4) Human Assembler: Hand assemble (encode) the following machine code instructio
ID: 2248684 • Letter: 4
Question
4) Human Assembler: Hand assemble (encode) the following machine code instructions. Write all instruction codes in hex! (2 points each)
For a-d write answer in 32-bit instruction code:
a) MOV R0, #0x12
32-bit IC: ________________
b) ADD R5, R6, R7
32-bit IC: ________________
c) LDR R4, [R5, #4]!
32-bit IC: ________________
d) STR R4,[R5], #4
32-bit IC: ________________
For e-g write answer in 16-bit instruction code:
e) LDRH R0, [R1]
16-bit IC: ________________
f) STRB R2, [R3]
16-bit IC: ________________
g) LDR R4, [R5, #4]
16-bit IC: ________________
Explanation / Answer
a) MOV R0, #0x12
32-bit IC: 0x1200A0E3
b) ADD R5, R6, R7
32-bit IC: 0x075086E0
c) LDR R4, [R5, #4]!
32-bit IC: 0x0440B5E5
d) STR R4,[R5], #4
32-bit IC: 0x044085E4
For e-g write answer in 16-bit instruction code:
e) LDRH R0, [R1]
16-bit IC: 0x0888
f) STRB R2, [R3]
16-bit IC: 0x1A70
g) LDR R4, [R5, #4]
16-bit IC: 0x6C68
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.