Bit data locations are specified by bit number. Bit 15 is the most significant bit. Bit 0 is the least
significant bit. BCD and byte data are stored in the lower 8 bits of a general register. Word data
use all 16 bits of a general register. Longword data use two general registers: the upper 16 bits
are stored in Rn (n must be an even number); the lower 16 bits are stored in Rn+1.
Operations performed on BCD data or byte data do not affect the upper 8 bits of the register.
Table 3-4 General Register Data Formats
Data Type
Register No.
1-Bit
Rn
BCD
Rn
Byte
Rn
Word
Rn
Longword
Rn*
Rn+1*
* For longword data n must be even (0, 2, 4, or 6).
3.3.2 Data Formats in Memory
Table 3-5 indicates the data formats in memory.
Instructions that access bit data in memory have byte or word operands. The instruction specifies
a bit number to indicate a specific bit in the operand.
Access to word data in memory must always begin at an even address. Access to word data
starting at an odd address causes an address error. The upper 8 bits of word data are stored in
address n (where n is an even number); the lower 8 bits are stored in address n+1.
Downloaded from
Elcodis.com
electronic components distributor
Data Structure
15
15
14
13
12
11
10
15
Don't-care
15
Don't-care
15
MSB
31
MSB
15
42
9
8
7
6
5
4
8
7
4
Upper digit
8
7
MSB
Upper 16 bits
Lower 16 bits
0
3
2
1
0
3
0
Lower digit
0
LSB
0
LSB
16
LSB
0