Dale - Computer Science Illuminated 220

Dale - Computer Science Illuminated 220 - in the operation...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
7.3 Machine Language 193 Figure 7.3 Difference between imme- diate-mode and direct-mode addressing Instruction specifier Data Operand specifier (a) Immediate-mode addressing: Operand is shaded gray 00 Instruction specifier Address of data Operand specifier Data (b) Direct-mode addressing: Operand is shaded gray 01 the instruction) holds either the operand itself or the address of where the operand is. Some instructions do not use the operand specifier. The instruction specifier is made up of several sections: the operation code, the register specifier, and the addressing-mode specifier. The opera- tion code is 5 bits long (shaded green). The bit string in the operation code specifies which instruction is to be carried out. You may have predicted that the operation code would be 5 bits when we said that Pep/7 had 32 instructions: There are 32 unique patterns using 5 bits. The 1-bit register specifier is 0 if register A (the accumulator) is involved
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: in the operation and 1 if register X (the index register) is involved. The register specifier is not color coded. The 2-bit addressing-mode specifier (shaded light blue) says how to interpret the operand part of the instruction. If the addressing mode is 00, the operand is in the operand specifier of the instruction. This addressing mode is called immediate (i). If the addressing mode is 01, the operand is the memory address named in the operand specifier. This addressing mode is called direct (d). (There are two other addressing modes that we do not cover here.) The distinction between the immediate addressing mode and the direct addressing mode is very important because it determines where the data involved in the operation is stored or is to be stored. See Figure 7.3. Locations that contain addresses are shaded in red; operands are shaded gray....
View Full Document

This note was uploaded on 01/13/2011 for the course CSE 1550 taught by Professor Marianakant during the Fall '10 term at York University.

Ask a homework question - tutors are online