COA Unit III Notes
COA Unit III Notes
COA Unit III Notes
The address field of an instruction can represent either Direct address - the address in
memory of the data to use (the address of the operand), (or) Indirect address- the address in
memory of the address in memory of the data to use.
Effective Address (EA) - The address, that can be directly used without modification to access
an operand for a computation-type instruction, or as the target address for a branch-type
instruction. Eg: Direct Addressing EA is 457, and Indirect Addressing EA is 1350.
1 0
1 P
C Memor
1 0 y
1 4096 x
A 16
R
1 0
5 I
CP
R
U
1 0 1 0
5 T 5 D
R R
7 0 7 0 1 0
OUT INP 5 A
R R C
Common Bus:
The registers in the Basic Computer are connected using a bus. This gives a savings in circuitry
over complete connections between registers. It can be showed as below:
2)Register Reference: Register reference instructions are those which access data and
manipulate the contents of registers. They do not access memory. These instructions are
executed in one clock cycle.
Note that the 12 low-order bits serve a different function depending on the
instruction format used.
3)I/O Instructions: This class of instructions accesses I/O devices. The instructions in this
class also enable and disable interrupts. Since this computer only allows for a single input
device and a single output device, no address information is needed.
4. Instruction Cycle
In Basic Computer, a machine instruction is executed in the following cycle:
1. Fetch an instruction from memory.
2. Decode the instruction.
3. Read the effective address from memory if the instruction has an indirect address.
4. Execute the instruction.
After an instruction is executed, the cycle starts again at step 1, for the next instruction.
Note: Every different processor has its own (different) instruction cycle.
LDA: Load to AC
D2T4: DR M[AR]
D2T5: AC DR, SC 0
STA: Store AC
D3T4: M[AR] AC, SC 0
BUN: Branch Unconditionally
D4T4: PC AR, SC 0
BSA: Branch and Save Return Address
M[AR] PC, PC AR + 1
Open communication only when some data has to be passed. When it getting an interrupt,
- The I/O interface, instead of the CPU, monitors the I/O device.
- When the interface founds that the I/O device is ready for data transfer, it
generates an interrupt request to the CPU
- Upon detecting an interrupt, the CPU stops momentarily the task it is doing, branches to
the service routine to process the data transfer, and then returns to the task it was performing.
The T signals occur in sequence and are never skipped over. The only two options during a
T-state are to proceed to the next T-state or to return to T state 0.
The D signals decode the instruction and are used to select the correct execute routine.
I is used to select the indirect routine and also to select the correct execute routine for non-
memory reference instructions.
R is used for interrupt processing flip-flop.
- The interrupt cycle is a HW implementation of a branch and save return address operation.
- At the beginning of the next instruction cycle, the instruction that is read from memory is in
address 1.
- At memory address 1, the programmer must store a branch instruction that sends the control to
an interrupt service routine
- The instruction that returns the control to the original program is "indirect BUN 0".
The fetch and decode phases of the instruction cycle must be modified Replace T0, T1,
T2 with R'T0, R'T1, R'T2
The interrupt cycle:
RT0: AR 0, TR PC
RT1: M[AR] TR, PC 0
RT2: PC PC + 1, IEN 0, R 0, SC 0.