Addressing Modes_Lecture_18 (1)
Addressing Modes_Lecture_18 (1)
ADDRESSING MODES
Addressing Modes:
Implied Mode
Address of the operands are specified implicitly
in the instruction
- No need to specify address in the instruction
- Ex: CMA(Complement the accumulator)
CLA
Immediate Addressing 12-4
Instruction
Opcode Address A
Memory
Operand
Indirect Addressing (1) 12-7
Opcode Address A
Memory
Instruction
Pointer to operand
Operand
Register Addressing 12-9
Instruction
Opcode Register Address R
Set of Registers
Operand
Register Indirect Addressing 12-11
Instruction
Opcode Register Address R
Memory
Registers
EA = PC + IR (address)
(a) Relative AM
(b) Base Register (BR) Instruction
(c) Index (XR) Address Field
EA = BAR + IR (address)
EA = PC + IR (address)
Auto-Incr. & Auto-Decr.Addressing Mode 12-15
Auto-Increment AM Auto-Decrement AM
...
Numerical on Addressing Mode 12-18
...
Numerical on Addressing Mode 12-20
P3: To show the differences between the various modes, here shows
the effect of the addressing modes on the instruction defined in the
figure given below. The two-word instruction at address 200 and 201
is “Load to Accumulator (AC)” instruction with an address field
equal to 500. PC has the value 200 for fetching this instruction. The
content of processor register R1 is 400, and the content of an index
register XR is 100. AC receives the operand after the instruction is
executed.
Numerical on Addressing Mode 12-21
Memory
200 Load to AC Mode
201 Address = 500
202 Next Instruction
Addressing Modes Effective Content of AC
Address (EA) PC = 200
Direct Address 399 450
400 700
Immediate Operand R1 = 400
Indirect Address
500 800
Relative Address XR = 100
Indexed Address
600 900
Register AC
Register Indirect 702 325
Auto-Increment
Auto-Decrement
800 300
Numerical on Addressing Mode 12-22
The Table lists the value of the effective address (EA) and the
operand loaded into AC for the nine addressing modes
Addressing Effective Content of AC
Modes Address (EA)
Direct Address 500 800
Immediate Operand 201 500
Indirect Address 800 300
Relative Address 702 325
Indexed Address 600 900
Register - 400
Register Indirect 400 700
Auto-Increment 400 700
Auto-Decrement 399 450
Typical Data Transfer Instructions 12-23
Name Mnemonic
Load LD
Store ST
Move MOV
Exchange XCH
Input IN
Output OUT
Push PUSH
Pop POP
Eight Addressing Modes for the Load 12-24
Instructions
Mode Assembly Convention Register Transfer
LD ADR AC ← M[ADR]
LD @ADR AC ← M[M[ADR]]
LD #NBR AC ← NBR
LD R1 AC ← R1
LD (R1) AC ← M[R1]
Register LD R1 AC ← R1
X is an index register
R1 is a processor register