MOTOROLA
3-6
SYSTEM RESOURCES
CPU16
REFERENCE MANUAL
Twenty-bit addresses are formed from a 16-bit byte address generated by an individ-
ual CPU16 register and a 4-bit bank address contained in an associated extension
field. The byte address corresponds to ADDR[15:0] and the bank address corre-
sponds to ADDR[19:16].
3.3.2 Extension Fields
The six address extension fields are each used in a different type of access. As shown
in
3.2 Register Model
,
all but EK are associated with particular CPU16 registers.
There are a number of ways to manipulate extension fields and the address map.
3.3.2.1 Using Accumulator B to Modify Extension Fields
EK, XK, YK, ZK, and SK can be examined and modified by using the transfer exten-
sion field to B and transfer B to extension field instructions.
Transfer extension field to B instructions (TEKB, TXKB, TYKB, TZKB, and TSKB) copy
the designated extension field into the four LSB of accumulator B, where it can be
modified. Transfer B to extension field instructions (TBEK, TBXK, TBYK, TBZK, and
TBSK) replace the designated extension field with the contents of the four LSB of ac-
cumulator B.
3.3.2.2 Using Stack Pointer Transfer to Modify Extension Fields
XK, YK, ZK, and SK can be modified by using the transfer index register to stack point-
er and transfer stack pointer to index register instructions.
When the SP is transferred to (TSX, TSY, and TSZ) or from (TXS, TYS, and TZS) an
index register, the corresponding address extension field is also transferred. Before
the extension field is transferred, it is incremented or decremented if bank overflow oc-
curred as a result of the instruction.
3.3.2.3 Using Index Register Exchange to Modify Extension Fields
XK, YK, and ZK can be modified by using the transfer index register to index register
instructions.
When index registers are exchanged (TXY, TXZ, TYX, TYZ, TZX, and TZY), the cor-
responding address extension field is also exchanged.
3.3.2.4 Stacking Extension Field Values
The push multiple registers (PSHM) instruction can be used to store alternate exten-
sion field values on the stack. When bit 5 of the PSHM mask operand is set, the entire
address extension register (EK, XK, YK, and ZK values) is pushed onto the stack.
The pull multiple registers (PULM) instruction can be used to replace extension field
values. When bit 1 of the PULM mask operand is set, the entire address extension reg-
ister (EK, XK, YK, and ZK) will be replaced with stacked values.
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.