English
Language : 

MC68HC908GP32_08 Datasheet, PDF (230/266 Pages) Freescale Semiconductor, Inc – M68HC08 Microcontrollers
Development Support
Table 18-7. READSP (Read Stack Pointer) Command
Description
Operand
Data Returned
Opcode
Reads stack pointer
None
Returns incremented stack pointer value (SP + 1) in high-byte:low-byte order
$0C
Command Sequence
FROM HOST
READSP READSP
SP
SP
HIGH
LOW
ECHO
RETURN
Table 18-8. RUN (Run User Program) Command
Description
Operand
Data Returned
Opcode
Executes PULH and RTI instructions
None
None
$28
Command Sequence
FROM HOST
RUN
RUN
ECHO
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.
HIGH BYTE OF INDEX REGISTER
CONDITION CODE REGISTER
ACCUMULATOR
LOW BYTE OF INDEX REGISTER
HIGH BYTE OF PROGRAM COUNTER
LOW BYTE OF PROGRAM COUNTER
SP
SP + 1
SP + 2
SP + 3
SP + 4
SP + 5
SP + 6
SP + 7
Figure 18-16. Stack Pointer at Monitor Mode Entry
MC68HC908GP32 Data Sheet, Rev. 10
230
Freescale Semiconductor