Placement Of 16-Bit Data In Memory - Fujitsu 8FX Hardware Manual

8-bit microcontroller new 8fx family
Table of Contents

Advertisement

MB95630H Series
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.
Before
execution
A 0x1234
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.
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.
MN702-00009-2v0-E
Figure 2.3-1 Placement of 16-bit Data in Memory
Memory
MOVW 0091H, A
0x0090
0x0091
0x0092
0x0093
Figure 2.3-2 Placement of 16-bit Data in Instruction
MOV A, 5678H
[Example]
MOVW A, #1234H
0xXXX0
XX XX
0xXXX2
60 56 78
0xXXX5
E4 12 34
0xXXX8
XX
FUJITSU SEMICONDUCTOR LIMITED
2.3 Placement of 16-bit Data in Memory
After
execution
Memory
A 0x1234
;
Extended address
;
16-bit immediate data
Assemble
;
Extended address
;
16-bit immediate data
CHAPTER 2 CPU
0x0090
0x12
0x0091
0x34
0x0092
0x0093
13

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb95630h series

Table of Contents