English
Language : 

MC68HC08AZ32A Datasheet, PDF (113/456 Pages) Motorola, Inc – HCMOS Microcontroller Unit
Freescale Semiconductor, Inc.
System Integration Module (SIM)
SIM Registers
BW — SIM Break WAIT
This status bit is useful in applications requiring a return to WAIT
mode after exiting from a break interrupt. BW can be cleared by
writing a logic ‘0’ to it. Reset clears BW.
1 = WAIT mode was exited by break interrupt
0 = WAIT mode was not exited by break interrupt
BW 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 BW, do RTI
BRCLR BW,SBSR, RETURN ; See if 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 WAIT opcode.
RETURN PULH
RTI
; Restore H register.
MC68HC08AZ32A — Rev 1.0
MOTOROLA
System Integration Module (SIM)
For More Information On This Product,
Go to: www.freescale.com
Technical Data
113