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
Summary of Contents for 8FX
Page 2: ......
Page 4: ......
Page 8: ...iv ...
Page 18: ...xiv ...
Page 22: ...xviii ...
Page 650: ......