16
2.3.2
Memory Data Formats
Figure 2.4 indicates the data formats in memory. Word data stored in memory must always begin
at an even address. In word access the least significant bit of the address is regarded as 0. If an odd
address is specified, no address error occurs but the access is performed at the preceding even
address. This rule affects the MOV.W instruction, and also applies to instruction fetching.
7
6
5
4
3
2
1
0
7
0
MSB
LSB
MSB
LSB
MSB
LSB
MSB
LSB
MSB
LSB
Upper 8 bits
Lower 8 bits
CCR
CCR*
Address
Data type
Data format
Address n
Address n
Even address
Odd address
Even address
Odd address
Even address
Odd address
1-bit data
Byte data
Word data
Byte data (CCR)
on stack
Word data on
stack
Legend:
CCR: Condition code register
Note: * Ignored on return.
Figure 2.4 Memory Data Formats
When the stack is accessed using R7 as an address register, word access should always be
performed. When CCR is pushed on the stack, two identical copies of CCR are pushed to make a
complete word. When they are restored, the lower byte is ignored.