English
Language : 

PM0044 Datasheet, PDF (54/162 Pages) STMicroelectronics – STM8 CPU programming manual
STM8 addressing modes
PM0044
Figure 20. Long Pointer Indirect Extended Indexed addressing mode example
Before completion
18
1089
ptr .word table
00
108A
LDF A,([longptr.w],X)
00
108B
72
1692
A7
1693
10
1694
89
1695
table .byte 0x10,0x20,0x30,
10
0x40
20
30
40
180000
180001
180002
180003
PC
1692
X
03
A
Previous value
Steps to Determine
Effective Address
PC = 1692
PC = PC + 2 = 1694
EA = (((PC) : (PC+1)) :
((PC) : (PC+1) +1) :
((PC) : (PC+1) +2)) + X
EA = 180003
180000
03
Adder
EA
180003
After completion
18
1089
ptr .word table
00
108A
00
108B
LDF A,([longptr.w],X)
72
1692
A7
1693
10
1694
89
1695
1696
Instruction Complete
X
A = (EA) = 40
New PC = PC + 2 = 1696
03
New PC
1696
table .byte 0x10,0x20,0x30,
10
0x40
20
30
40
180000
180001
180002
180003
A
VR02059I
40
54/162
Doc ID 13590 Rev 3