Complete the code to load a single byte from memory in ARM assembly.
LDRB R0, [R1, #[1]]
The LDRB instruction loads a single byte. The offset should be 0 to access the byte at the address in R1.
Complete the code to store a halfword (2 bytes) at the correct memory offset.
STRH R2, [R3, #[1]]
STRH stores a halfword (2 bytes). The offset must be a multiple of 2, so 0 is correct for aligned access.
Fix the error in the code to correctly load a word (4 bytes) from memory.
LDR R4, [R5, #[1]]
LDR loads a word (4 bytes). The offset must be a multiple of 4, so 4 is correct.
Fill both blanks to create a dictionary comprehension that maps memory addresses to their byte or halfword size.
{addr: size for addr, size in memory_map.items() if size == [1] or size == [2]This comprehension filters for sizes that are either byte (1) or halfword (2).
Fill all three blanks to create a dictionary comprehension that maps addresses to sizes for byte, halfword, and word accesses.
{addr: size for addr, size in memory_map.items() if size == [1] or size == [2] or size == [3]This comprehension filters for sizes that are byte (1), halfword (2), or word (4).
