Simple microprocessor quiz - 7 questions

User Generated

naqlgurjkzna

Computer Science

Description

QUESTION 1

  1. The primary drawback of using polling to control I/O devices is that...
    it is simple to implement and debug.
    it does not execute instructions sequentially.
    it prevents the CPU from doing anything while waiting.
    it only requires the CPU's attention when a device is ready.

0.25 points

QUESTION 2

  1. For Project 4, when will a value need to be written to the interrupt mask register?
    A.At the beginning of the program.
    B.At the beginning of the Interrupt Service Routine (ISR).
    C.At the end of the Interrupt Service Routine (ISR).
    D.Both A and B
    E.Both A and C
    F.Both B and C
    G.A, B, and C

0.5 points

QUESTION 3

  1. What decimal value needs to be written to the interrupt mask register in order to enable both the timer interrupt and global interrupt bit?(NOTE: Only decimal representations will be properly auto-grade. Binary and hexadecimal representations will not be considered correct)

0.5 points

QUESTION 4

  1. In order to clear an interrupt, which of the following must be done within your ISR?
    A zero (or one) must be written to the interrupt status register.
    The value, 0b10, must be written to the command register.
    The value, 0b01, must be written to the command register.
    The value in the interrupt status register must be read once.

0.25 points

QUESTION 5

  1. Registers used outside of your ISR...
    should not be used inside your ISR.
    should be saved to the stack and restored before returning if the program does not expect them to be changed.
    are automatically saved to the stack when an interrupt is triggered and the program jumps to your ISR.
    None of the above.

0.25 points

QUESTION 6

  1. Suppose you are adding interrupts and an ISR to the program shown below. Select all of the registers that you can safely modify inside your ISR without affecting the functionality of the existing program. Assume that you will not save any register values in memory for later restoration.
    .org 0x10000000li $s0, 0xf0200000li $t0, 1main:sw $t1, 0($s0)addu $t1, $t1, $t0j mainnop
    $i0
    $i1
    $t0
    $t1
    $s0
    $s1

0.5 points

QUESTION 7

  1. What is the maximum value that the timer can hold before it overflows and generates an interrupt? Please provide your answer in both hexadecimal and decimal.Hexadecimal: 0xDecimal:

0.75 points

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hello, find the at...


Anonymous
Really useful study material!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Content

Related Tags