CH 5 Updated
CH 5 Updated
In this chapter we introduce a basic computer and show how its operation can
be specified with register transfer statements.
It has the advantage of being simple enough so we can demonstrate the design
process without too many complications.
Instruction Codes
A process is controlled by a program
– A program is a set of instructions that specify
the operations, data, and the control sequence
– An instruction is stored in binary code that
specifies a sequence of microoperations
– Instruction codes together with data are stored
in memory (Stored Program Concept)
Direct address
Occurs When the Operand Part Contains the Address of
Needed Data.
•It is also necessary to provide a register in the control unit for storing the
instruction code after it is read from memory.
Adder E
& Logic
AC 4
LD INR CLR
INPR
IR 5
LD
TR 6
LD INR CLR
OUTR
Clock
LD
16-bit common bus
Computer System Architecture, Mano, Copyright (C) 1993 Prentice-Hall, Inc.
Common Bus System
– The connection of the registers and memory of the
basic computer to a common bus system :
12 bits
5.3 Computer Instructions
5-3. Computer Instruction
•
– 3 Instruction Code Formats : Fig. 5-5 Hex Code
Symbol I =0 I =1 Description
• Memory-reference instruction AND 0xxx 8xxx And memory word to AC
ADD 1xxx 9xxx Add memory word to AC
–Opcode = 000 110 LDA 2xxx Axxx Load memory word to AC
STA 3xxx Bxxx Store content of AC in memory
»I=0 : 0xxx ~ 6xxx, I=1: 8xxx ~Exxx BUN 4xxx Cxxx Branch unconditionally
I=0 : Direct, 15 14 12 11 0 BSA 5xxx Dxxx Branch and Save return address
I=1 : Indirect ISZ 6xxx Exxx Increment and skip if zero
I Opcode Address CLA 7800 Clear AC
CLE 7400 Clear E
CMS 7200 Complement AC
»Register-reference instruction CME m 7100 e Comp
CIR 7080 Circulate right AC and E
–7xxx (7800 ~ 7001) : CLA, CMA, CIL 7040 Circulate left AC and E
15 14 12 11 0 INC 7020 Increment AC
SPA 7010 Skip next instruction if AC positive
0 1 1 1 Register Operation
SNA 7008 Skip next instruction if AC negative
SZA 7004 Skip next instruction if AC zero
–Input-Output instruction SZE
HLT
7002
7001
Skip next instruction if E is 0
Halt computer
–Fxxx(F800 ~ F040) : INP, OUT, ION, SKI, INP
OUT
F800
F400
Input character to AC
Output character from AC
SKI F200 Skip on input flag
15 14 12 11 0
SKO F100 Skip on output flag
1 1 1 1 I/O Operation ION F080 Interrup
IOF F040 Inter
5.4: Timing & Control: