TCB1043 Computer Organisation: Basic Microprocessor System
TCB1043 Computer Organisation: Basic Microprocessor System
TCB1043 Computer Organisation: Basic Microprocessor System
COMPUTER ORGANISATION
Basic Microprocessor System
Learning Topics
View of LMC
Saipunidzam Mahamad @ Computer Organization
Address
Content
Op code
Operand
1xx
ADD
Data Movement
2xx
3xx
SUB
STORE
5xx
LOAD
901
902
000
INPUT
Output
STOP
COB
Input/Output
Machine Control
(coffee break)
Saipunidzam Mahamad @ Computer Organization
Input/Output
Move data between calculator and in/out
baskets
Content
Op Code
Operand
(address)
IN (input)
01
OUT (output)
02
LMC Input/Output
IN
OUT
xx
LDA (load)
xx
Arithmetic Instructions
Read mailbox
Perform operation in the calculator
Content
Op Code
Operand
(address)
ADD
xx
SUB
xx
Program Control
Branching (executing an instruction out of
sequence)
Changes the address in the counter
Halt
Content
Op Code
Operand
(address)
BR (Jump)
xx
BRZ (Branch on 0)
xx
BRP (Branch on +)
xx
COB (stop)
(ignore)
Instruction Set
Arithmetic
1xx
ADD
2xx
SUB
3xx
STORE
5xx
LOAD
BR
6xx
JUMP
BRZ
7xx
BRANC ON 0
BRP
8xx
BRANCH ON +
Input/Output
901
INPUT
902
OUTPUT
000
HALT
COB
Data Movement
Machine Control
(coffee break)
Saipunidzam Mahamad @ Computer Organization
Op
Code
5xx
3xx
1xx
Description
SUB
2xx
IN
OUT
COB or
HLT
BRZ
BRP
BR
DAT
901
902
000
7xx
8xx
6xx
yyy
Store the #
Input a #
Add
Output the
number
Saipunidzam Mahamad @ Computer Organization
IN
01
02
STO 99
IN
;store data
;input 2nd Number
03
ADD 99
04
OUT
;output result
05
COB
;stop
99
DAT 00
;data
901
399
901
199
902
000
000
IN
901
01
STO 10
310
02
IN
901
03
STO 11
311
04
SUB 10
210
05
BRP 08
808
;test
06
LDA 10
510
07
SUB 11
211
08
OUT
902
09
COB
000
;stop
10
DAT 00
000
11
DAT 00
000
START
Fetch Cycle
Execute Cycle
Fetch Next
Instruction
Execute
Instruction
HALT
Figure 6.5b
Figure 6.5b
Exercise
Convert the following LMC:
a. Machine code Mnemonic code
00
01
02
03
04
05
06
07
08
901
399
901
199
399
901
299
902
000
99
99
99
98
99
98
01
Program counter
LMC
CPU
The post-room
The little man
The calculator
The input tray
The output tray
Mailbox
Pigeon hole
The location counter
Summary
The working of the computer can be simulated by a simple
model - The Little Man Computer Model
The LMC meets all qualification of von Neumann
computer architecture
The exact steps performed by the LMC are important
because they reflect closely the steps performed in real
CPU in executing an instruction
Reading: Textbook - Chapter 6 & 7