Question
ELEC 310 HW2 1. ARM Data Addressing. Suppose r0 = 0x8000, and the memory layout is as follows Address Data 0x8000 0x1A 0x8001 0x2C 0x8002 OxEB 0x8003 0xOD 0x8004 0xFD 0x8005 0xA3 0x8006 0xCD 0x8007 0x79 ARM processors can be configured as big-endianness or little-endianness. What is the value of rl after running? LDR r1, [10] (This instruction basically loads the value found in address [r0] into register r1) a. If little-endianness, r1 = b. If big-endianness, r1= 2- A GPIO port supports a total of 16 pins. The mode register for a GPIO port has 32 bits, with two bits for each pin (Pin 0 - Pin 15). The definition of these two bits is as follows: digital input (00), digital output (01), alternate function (10), and analog (11). Suppose we need to set the mode of port B pin 9 to digital output. Does the following C code always work? Explain why? GPIOB->MODER |= (1 << 18); 3- Write a short C code that sets bit 4, 5, and 6 of variable x to 1, 0, and 1, respectively. Suppose x has 32 bits, from bit 0 to bit 31. (Use the masking method you learned in prelab 3)