CH 5 Instruction Set Architecture Level
CH 5 Instruction Set Architecture Level
Level
Instruction Formats
• Design Criteria for Instruction
Formats
• Expanding Opcodes
Addressing
• Addressing Modes
• Immediate Addressing
• Direct Addressing
• Register Addressing
CHAPTER 5
• Register Indirect Addressing
• Index Addressing
• Based-Indexed Addressing INSTRUCTION SET ARCHITECTURE LEVEL
• Stack Addressing
• Evaluation of Reverse Polish
Notation Formula
• On some machines, all instructions have the same length; on others there
may be many different lengths.
• Instructions may be shorter than, the same length as, or longer than the word
length.
❑ 15 three-address instructions,
❑ 14 two-address instructions,
❑ 31 one-address instructions,
❑ 16 zero-address instructions.
• How the bits of an address field are interpreted to find the operand.
1. Immediate addressing
2. Direct addressing
3. Register addressing
4. Register indirect addressing
5. Indexed addressing
6. Based-Indexed addressing
7. Stack addressing
CST301 Computer Organization FCST, UCSY Instruction Set Architecture Level: 5 – 7 / 16
IMMEDIATE ADDRESSING
Instruction Set Architecture
Level • The address part of the instruction actually contains the operand itself
Instruction Formats
• Design Criteria for Instruction
rather than an address or other information describing where the
Formats
• Expanding Opcodes
operand is.
Addressing
• Addressing Modes • Such an operand is called an immediate operand because it is
• Immediate Addressing
• Direct Addressing
automatically fetched from memory at the same time the instruction
• Register Addressing itself is fetched; hence it is immediately available for use.
• Register Indirect Addressing
• Index Addressing
• Based-Indexed Addressing
• Immediate addressing has the virtue of not requiring an extra memory
• Stack Addressing reference to fetch the operand.
• Evaluation of Reverse Polish
Notation Formula
• It has the disadvantage that only a constant can be supplied this way.
ADD R2, A
STORE R2, B
ADD R4, R3
LOAD R3, R2
Image copyright © binaryterms.com
A generic assembly program for computing the sum of the elements of an array.
1. R1 — Holds the
accumulated OR of the
Boolean product terms.
2. R2 — The index, i, that is
used to step through the
arrays.
3. R3 — The constant 4096,
which is the lowest value of i
A generic assembly program for computing the OR of Ai AND Bi not to use.
for two 1024-element arrays. 4. R4 — A scratch register for
holding each product as it is
formed.
Some examples of infix expressions and their reverse Polish notation equivalents.