02 Addressing Modes
02 Addressing Modes
Addressing Modes
C5X Addressing Modes
• Immediate addressing
• Direct addressing
• Memory mapped register addressing
• Dedicated register addressing
• Indirect addressing
• Circular addressing
15 76 0
C5X Addressing Modes – Manish Tiwari 5
Direct Addressing (Contd.)
• The memory pages in C5X (Page 0 to Page 511)
Access
Word 07
in Page 1
DP = 01
DP dir
0 0000 0001 000 Page 1
0111
0080 Word 0
H
0081
H
: Word 7
:
0087
H
:
:
:
C5X Addressing Modes – Manish Tiwari 6
Direct Addressing (Contd.)
• Example
ADD 01H ; Add memory word stored at an address
01 in current page to ACC.
Current page is obtained by the content of Data Pointer DP.
Let DP=06. So 16-bit address is formed as
DP dir
Address = 0 0000 0110 | 000 0001
= 0000 0011 0000 0001 = 0301H = dma
dma – Data Memory Address
ADD 01H ; Add the content of the data memory
location 301H to ACC.
C5X Addressing Modes – Manish Tiwari 7
LDP
• After the reset DP is unpredictable, so it must be
initialized before use.
LAMM
ACCL (dma) dma is data memory address
ACCH 0
x(2) 0202H
After Sample x(3), the After Address 0200H, the
algorithm should go to algorithm should go to Address
Sample x(0) 2003H.
Memory
Addres Data Starting Address = 0200H =
s
CBSR1
0200H x(0)
0201H x(1) Ending Address = 0203H =
0202H x(2)
CBER1
0203H x(3)