Question: Consider an 8-pin general purpose input/output port memory mapped to address adr_gpio_a . What does the following code do? ldr r0, adr_gpio_a ldr r1,

Consider an 8-pin general purpose input/output port memory mapped to address " adr_gpio_a ". What does the following code do?

ldr r0, adr_gpio_a ldr r1, =0xfb str r1, [r0, #4] ldr r2, [r0]

  • A.

    Sets pin 2 as input, the remaining pins (0,1, 3..7) as output, then reads from pin 2.

  • B.

    Sets pin 2 as output, the remaining pins (0,1, 3..7) as input, then reads from every pin except pin 2.

  • C.

    Writes the value 0xfb to the memory cell adjacent to the i/o port, then reads input from all of the pins in the port.

  • D.

    Reads the input from the i/o port and applies a bit mask of 0xfb.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!