MB95630H Series
MN702-00009-2v0-E
FUJITSU SEMICONDUCTOR LIMITED
13
CHAPTER 2 CPU
2.3 Placement of 16-bit Data in Memory
2.3
Placement of 16-bit Data in Memory
This section describes how 16-bit data is stored in memory.
■
Placement of 16-bit Data in Memory
●
State of 16-bit data stored in RAM
When 16-bit data is written to memory, the upper byte of the data is stored at a smaller address
and the lower byte is stored at the next address. When 16-bit data is read, it is handled in the
same way.
Figure 2.3-1 shows how 16-bit data is placed in memory.
Figure 2.3-1 Placement of 16-bit Data in Memory
●
Storage state of 16-bit data specified by an operand
Even when the operand in an instruction specifies 16-bit data, the upper byte is stored at the
address closer to the op-code (instruction) and the lower byte is stored at the address next to the
one at which the upper byte is stored.
That is true whether an operand is either a memory address or 16-bit immediate data.
Figure 2.3-2 shows how 16-bit data in an instruction is placed.
Figure 2.3-2 Placement of 16-bit Data in Instruction
●
Storage state of 16-bit data in the stack
When 16-bit register data is saved in a stack on an interrupt, the upper byte is stored at a lower
address in the same way as 16-bit data specified by an operand.
Before
execution
Memory
Memory
A
0x1234
MOVW 0091H, A
0x0090
0x0091
0x0092
0x0093
0x0090
0x0091
0x0092
0x0093
0x12
0x34
A
0x1234
After
execution
Extended address
16-bit immediate data
;
;
Assemble
Extended address
16-bit immediate data
;
;
[Example]
MOV A, 5678H
MOVW A, #1234H
XX XX
60 56 78
E4 12 34
XX
0xXXX0
0xXXX2
0xXXX5
0xXXX8
Содержание 8FX
Страница 2: ......
Страница 4: ......
Страница 8: ...iv ...
Страница 17: ...xiii A 3 Bit Manipulation Instructions SETB CLRB 621 A 4 F2 MC 8FX Instructions 622 A 5 Instruction Map 625 ...
Страница 18: ...xiv ...
Страница 22: ...xviii ...
Страница 108: ...MB95630H Series 86 FUJITSU SEMICONDUCTOR LIMITED MN702 00009 2v0 E CHAPTER 6 I O PORT 6 2 Configuration and Operations ...
Страница 284: ...MB95630H Series 262 FUJITSU SEMICONDUCTOR LIMITED MN702 00009 2v0 E CHAPTER 14 LIN UART 14 8 Notes on Using LIN UART ...
Страница 648: ...MB95630H Series 626 FUJITSU SEMICONDUCTOR LIMITED MN702 00009 2v0 E APPENDIX A Instruction Overview A 5 Instruction Map ...
Страница 650: ......