Study Guide #4 Flashcards
(37 cards)
What are the three types of instructions in our theoretical computer?
Memory reference, register reference, and I/O
opcode 000-110
memory reference
opcode 111, I = 0
register reference
opcode 111, I = 1
I/O
PC
program counter
AR
address register
IR
instruction register
TR
temporary register
OUTR
output register
INPR
input register
DR
data register
AC
accumulator
Direct addressing
I = 0; address field contains effective address (1 memory read)
Indirect addressing
I = 1; address field contains address of effective address (2 memory reads)
Instructions for branching to a subroutine
BSA: Branch and save return address
Three machine instructions that are used for program control
BSA, BUN, ISZ
Are recursive subroutines supported on our theoretical computer?
No because the return address would be overwritten every time
What happens when an interrupt cycle occurs
PC set to 0
return address is stored in memory address zero
BUN goes to I/O that handles interrupt
* can occur at any instruction
How does the computer return from the interrupt routine?
BUN (branch unconditional) to blank word before subroutine
ION: turns interrupt flag back on
Can a second interrupt occur during the interrupt routine?
No the first one has to finish
Can a subroutine be interrupted?
Yes as long as you are not in the I/O program
What is the purpose of the timing signals and how are they generated?
Allow sequencing of events
generated by the control unit (4-bit counter into decoder)
Describe all flags associated with the I/O process
Registers: OUTR and INPR
Flags: FGI and FGO
What two flags are associated with I/O and explain what they control
FGI and FGO control input and output