Typewriter User Manual

5- 84 MC68340 USER’S MANUAL MOTOROLA
Command Sequence:
GO
???
NORMAL
MODE
XXX
"ILLEGAL"
NEXT CMD
"NOT READY"
Operand Data:
None
Result Data:
None
5.6.2.8.13 Call User Code (CALL). This instruction provides a convenient way to patch
user code. The return PC is stacked at the location pointed to by the current SP. The
stacked PC serves as a return address to be restored by the RTS command that
terminates the patch routine. After stacking is complete, the 32-bit operand data is loaded
into the PC. The pipeline is flushed and refilled from the location pointed to by the new
PC, BDM is exited, and normal mode instruction execution begins.
NOTE
If a bus error or address error occurs during return address
stacking, the CPU returns an error status via the serial
interface and remains in BDM.
If a bus error or address error occurs on the first instruction
prefetch from the new PC, the processor exits BDM and the
error is trapped as a normal mode exception. The stacked
value of the current PC may not be valid in this case,
depending on the state of the machine prior to entering BDM.
For address error, the PC does not reflect the true return PC.
Instead, the stacked fault address is the (odd) return PC.
Command Format:
1514131211109876543210
0000100000000000
Frees
cale Semiconductor,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...