English
Language : 

MC68HC08AZ0 Datasheet, PDF (107/444 Pages) Motorola, Inc – Advance Information
Freescale Semiconductor, Inc.
System Integration Module (SIM)
SIM registers
SBSW can be read within the break state SWI routine. The user can
modify the return address on the stack by subtracting one from it. The
following code is an example of this.
; This code works if the H register has been pushed onto the stack in the break
; service routine software. This code should be executed at the end of the
; break service routine software.
HIBYTE EQU 5
LOBYTE EQU 6
;
If not SBSW, do RTI
BRCLR SBSW,SBSR, RETURN ; See if STOP or WAIT mode was exited by
; break.
TST LOBYTE,SP
; If RETURNLO is not ‘0’,
BNE DOLO
; then just decrement low byte.
DEC HIBYTE,SP
; Else deal with high byte, too.
DOLO DEC LOBYTE,SP
; Point to STOP/WAIT opcode.
RETURN PULH
RTI
; Restore H register.
SIM reset status
register (SRSR)
This register contains six flags that show the source of the last reset. The
SIM reset status register can be cleared by reading it. A power-on reset
sets the POR bit and clears all other bits in the register.
Bit 7
6
5
4
3
2
1
Bit 0
SRSR Read: POR
PIN
COP ILOP ILAD
0
LVI
0
$FE01 Write:
POR: 1
0
0
0
0
0
0
0
= Unimplemented
Figure 17. SIM reset status register (SRSR)
POR — Power-on reset bit
1 = Last reset caused by POR circuit
0 = Read of SRSR
21-sim
MOTOROLA
System Integration Module (SIM)
For More Information On This Product,
Go to: www.freescale.com
MC68HC08AZ0
105