download

Matakuliah
Tahun
Versi
: H0344/Organisasi dan Arsitektur Komputer
: 2005
: 1/1
Pertemuan 16
Instruction Set 2
1
Learning Outcomes
Pada akhir pertemuan ini, diharapkan mahasiswa
akan mampu :
• Menghubungkan instructions set untuk
merealisasikan suatu proses sederhana
2
Outline Materi
•
•
•
•
•
•
Machine Instruction Characteristics
Types of Operands
Types of Operation
Assembly Language
Addressing
Instruction Formats
3
Addressing
Addressing Modes
Instruction
Instruction
Instruction
A
A
Memory
Memory
Operand
Instruction
R
Registers
Operand
Operand
Operand
(a) Immediate
(b) Direct
Instruction
Instruction
R
Memory
Registers
(c) Indirect
(b) Direct
R
(d) Register
Instruction
A
Registers
Operand
Memory
Implicit
Operand
Top of stack
register
(e) Register indirect
(f) Displacement
(g) Stack
4
Addressing
Basic Addressing Modes
Modes
Algorithm
Principal Advantage
Principal Disadvantage
Immediate
Operand = A
No memory reference
Limited operand magnitude
Direct
EA = A
Simple
Limited address space
Indirect
EA = (A)
Large address space
Multiple memory reference
Register
EA = R
No memory space
Limited address space
Register indirect
EA = (R)
Large address space
Extra memory reference
Displacement
EA = A + (R)
Flexibility
Complexity
Displacement
EA = top of stack
No memory reference
Limited application
5
Addressing
Displacement Addressing
• Relative address
• Base register address
• Indexing
Stack addressing
• Pushdown list
• Last in last out
6
Instruction formats
Instruction length is affected by memory size, memory
organization, bus structure, CPU complexity, and CPU speed.
Instruction length determines the richness and flexibility of
machine as seen by the assembly language programmer.
There is clearly a trade off between the number of opcodes and
the power of the addressing capability.
The following interrelated factors go into determining the use of
the addressing bits:
• Number of addressing modes
• Number of operand
• Register versus memory
• Number of register sets
• Address range
• Address granularity
7
Instruction formats
Among the design principles that were employed in designing
the instruction set were
• Orthogonality
• Completeness
• Direct addressing
Variable length instructions
The principal price to pay for variable length instructions is an
increase in the complexity of the CPU.
8