204 Tutorial 2 Solution
204 Tutorial 2 Solution
2. List and briefly define the possible states that define an instruction
execution.
Instruction address calculation (iac): Determine the address of the next instruction to
be executed.
Instruction fetch (if): Read instruction from its memory location into the processor.
Instruction operation decoding (iod): Analyze instruction to determine type of
operation to be performed and operand(s) to be used.
Operand address calculation (oac): If the operation involves reference to an operand
in memory or available via I/O, then determine the address of the operand.
Operand fetch (of): Fetch the operand from memory or read it in from I/O.
Data operation (do): Perform the operation indicated in the instruction.
Operand store (os): Write the result into memory or out to I/O.
3. List and briefly define two approaches to dealing with multiple interrupts.
(1) Disable all interrupts while an interrupt is being processed.
(2) Define priorities for interrupts and to allow an interrupt of higher priority to cause a
lower-priority interrupt handler to be interrupted.
I/O to or from memory: For these two cases, an I/O module is allowed to exchange
data directly with memory, without going through the processor, using direct memory
access (DMA).
8.
Memory CPU Memory CPU
Registers Registers
300 3005 300 PC 300 3005 301 PC
301 5940 AC 301 5940 0003 AC
302 7006 3005 IR 302 7006 3005 IR
I/O Devices I/O Devices
940 0002 005 0003 940 0002 005 0003
941 006 941 006