Datasheet

Monitor ROM (MON)
Technical Data MC68HC908LJ12Rev. 2.1
168 Monitor ROM (MON) Freescale Semiconductor
The MCU executes the SWI and PSHH instructions when it enters
monitor mode. The RUN command tells the MCU to execute the PULH
and RTI instructions. Before sending the RUN command, the host can
modify the stacked CPU registers to prepare to run the host program.
The READSP command returns the incremented stack pointer value,
SP + 1. The high and low bytes of the program counter are at addresses
SP + 5 and SP + 6.
Figure 10-7. Stack Pointer at Monitor Mode Entry
Table 10-9. RUN (Run User Program) Command
Description Executes PULH and RTI instructions
Operand None
Data
Returned
None
Opcode $28
Command Sequence
RUN
RUN
ECHO
FROM
HOST
CONDITION CODE REGISTER
ACCUMULATOR
LOW BYTE OF INDEX REGISTER
HIGH BYTE OF PROGRAM COUNTER
LOW BYTE OF PROGRAM COUNTER
SP + 1
SP + 2
SP + 3
SP + 4
SP + 5
SP
SP + 6
HIGH BYTE OF INDEX REGISTER
SP + 7