Write assembly instructions to store two immediate 32-bit constants, 0xEF and 0x
ID: 669095 • Letter: W
Question
Write assembly instructions to store two immediate 32-bit constants, 0xEF and 0x00AB0000 at memory locations 0x4000,0000 and 0x4000,0004.
Write assembly instructions to store two immediate 32-bit constants, 0x00113322 and 0x88776600, at memory locations 0x4000,0008 and 0x4000,000C.
Use assembler directive DCD to allocate memory for two 32-bit numbers, 0x55667788and 0x11223344, so that they will be placed right after your instruction code in the memory. Use ARM instructions to copy the two 32-bit numbers into consecutive memory locations starting at 0x4000,0010 and 0x4000,0014.
Explanation / Answer
1)
mov $r1,0x4000_0000
st $r1,0xEF
mov $r1,0x4000_0004
st $r1,0x00AB0000
2)
mov $r1,0x4000_0008
st $r1,0x00113322
mov $r1,0x4000_000C
st $r1,0x88776600
3)
mov $r1,0x4000_0010
st $r1,0x11223344
mov $r1,0x4000_0014
st $r1,0x55667788
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.