Application Note
Data Movement
AN1218 Rev. 2
21
New MOVE
Instruction, Detail
The new CPU08 Move instruction is detailed below. Examples for this
instruction and all four of its addressing modes are given in
Appendix E — New CPU08 MOV Instruction Examples
. The
examples in
Appendix E — New CPU08 MOV Instruction Examples
also compare the CPU05 and the CPU08 bus cycles and memory
requirements for the algorithm to execute the movement of data.
MOV
Move
Operation:
(M)destination
←
(M)source
Description: Moves a byte of data from a source address
to a destination address. Data is examined
as it is moved, and condition codes are set.
Source data is not changed. Internal
registers (other than CCR) are not affected.
There are four addressing modes for the
MOV instruction. A discussion of these
modes was given in an earlier section.
Software
Techniques
The MOV command will cut cycle time and code space when moving
data. The most obvious advantage of the MOV instruction is when the
configuration registers are being initialized along with other RAM
variables at the start of the program.
Code Example
A user wants to start his application one of two different ways. The user
initializes the application on the MCU based on the logic level of port D
bit 4. Once the part is out of reset, it reads port D and moves data from
ROM into the RAM configuration registers according to the logic level of
bit 4. Refer to
Appendix F — CPU05 and CPU08 Data Movement
Code
for code comparing the CPU05 and the CPU08.
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.