10-07-2012, 12:23 PM
ADDRESSING MODES
Addressing-Modes-New.ppt (Size: 379.5 KB / Downloads: 30)
Immediate Addressing Mode
Operand is part of instruction
Operand = address field
e.g. ADD 5
Add 5 to contents of accumulator
5 is operand
No memory reference to fetch data
Fast
Limited range
This mode is used in specifying address and data constants in programs.
Direct Addressing Mode
Address field contains address of operand
Effective address (EA) = address field (A)
e.g. ADD A
Add contents of cell A to accumulator
Look in memory at address A for operand
Single memory reference to access data
No additional calculations to work out effective address
Limited address space
Indirect Addressing Mode
Memory cell pointed to by address field contains the address of (pointer to) the operand
EA = (A)
Look in A, find address (A) and look there for operand
e.g. ADD (A)
Add contents of cell pointed to by contents of A to accumulator
Register Addressing Mode
Operand is held in register named in address field
EA = R
Limited number of registers
Very small address field needed
Shorter instructions
Faster instruction fetch
No memory access
Very fast execution