26
CHAPTER 3 CPU
3.1.2
Location of 16-bit Data on Memory
Upper digits of 16-bit data and stack data are stored in lower addresses on memory.
■
16-bit Data Storage State on RAM
When 16-bit data is written into RAM, the upper byte of the data is stored with a lower address and the
lower byte of the data is stored with the next address. 16-bit data is read in the same manner.
Figure 3.1-2 shows the location of 16-bit data on RAM.
Figure 3.1-2 Location of 16-bit Data on RAM
■
16-bit Operand Storage State
When 16 bits are specified for operands in instructions, upper bytes are also stored in addresses close to
operation codes (instructions) and lower bytes are stored in the following addresses.
Operands that indicate memory addresses and 16-bit immediate data are handled in the same manner as
stated above.
Figure 3.1-3 shows the locations of 16-bit data in instructions.
Figure 3.1-3 Location of 16-bit Data in Instructions
■
16-bit Data Storage State in Stack
The upper byte of data for a 16-bit register put in the stack due to an interrupt is also stored with a lower
address.
A
00
8
1
H
00
8
2
H
00
83
H
MOVW 00
8
1H, A
00
8
0
H
00
8
1
H
00
8
2
H
00
83
H
12
3
4
H
A
12
H
3
4
H
00
8
0
H
Before
written
12
3
4
H
Memory
After
written
Memory
XXX0
H
XX
XX
XXX2
H
60
56
7
8
; Extend
a
ddre
ss
; 16-
b
it immedi
a
te d
a
t
a
XXX5
H
E4
12
3
4
XXX
8
H
XX
[Ex
a
mple]
MOV A, 567
8
H
MOV W A, #12
3
4H
; Extend
a
ddre
ss
; 16-
b
it immedi
a
te d
a
t
a
Proce
ss
ed thro
u
gh
ass
em
b
ler
...
...
Содержание F2MC-8L F202RA
Страница 2: ......
Страница 4: ......
Страница 32: ...16 CHAPTER 1 OVERVIEW ...
Страница 90: ...74 CHAPTER 3 CPU ...
Страница 142: ...126 CHAPTER 5 TIME BASE TIMER POPW A RETI ENDS END ...
Страница 150: ...134 CHAPTER 6 WATCHDOG TIMER ...
Страница 174: ...158 CHAPTER 7 8 BIT PWM TIMER User processing POPW A XCHW A T Restoring A and T POPW A RETI ENDS ...
Страница 176: ...160 CHAPTER 7 8 BIT PWM TIMER ...
Страница 220: ...204 CHAPTER 8 8 16 BIT CAPTURE TIMER COUNTER ...
Страница 240: ...224 CHAPTER 9 12 BIT PPG TIMER ...
Страница 258: ...242 CHAPTER 10 EXTERNAL INTERRUPT CIRCUIT 1 EDGE PUSHW A User processing POPW A XCHW A T POPW A RETI ENDS END ...
Страница 274: ...258 CHAPTER 11 EXTERNAL INTERRUPT CIRCUIT 2 LEVEL ...
Страница 362: ...346 CHAPTER 15 BUZZER OUTPUT ...
Страница 371: ...355 CHAPTER 16 WILD REGISTER FUNCTION 16 3 5 Data Test Set Register WROR A test register Do not access this register ...
Страница 390: ...374 CHAPTER 17 FLASH MEMORY ...
Страница 419: ...403 INDEX INDEX The index follows on the next page This is listed in alphabetic order ...
Страница 434: ...418 INDEX ...
Страница 436: ......