
Instruction Set Description
4.6.2.20 EINT
* EINT
Enable (general) interrupts
EINT
Syntax
Operation
1
→
GIE
or
(0008h .OR. SR
→
SR / .src .OR. dst
→
dst)
BIS #8,SR
Emulation
Description
All interrupts are enabled.
The constant #08h and the SR are logically ORed. The result is placed into the SR.
Status Bits
Status bits are not affected.
Mode Bits
GIE is set. OSCOFF and CPUOFF are not affected.
Example
The general interrupt enable (GIE) bit in the SR is set.
PUSH.B
&P1IN
BIC.B
@SP,&P1IFG
; Reset only accepted flags
EINT
; Preset port 1 interrupt flags stored on stack
; other interrupts are allowed
BIT
#Mask,@SP
JEQ
MaskOK
; Flags are present identically to mask: jump
......
MaskOK
BIC
#Mask,@SP
......
INCD
SP
; Housekeeping: inverse to PUSH instruction
; at the start of interrupt subroutine. Corrects
; the stack pointer.
RETI
NOTE:
Enable and Disable Interrupt
Due to the pipelined CPU architecture, the instruction following the enable interrupt
instruction (EINT) is always executed, even if an interrupt service request is pending when
the interrupts are enabled.
If the enable interrupt instruction (EINT) is immediately followed by a disable interrupt
instruction (DINT), a pending interrupt might not be serviced. Further instructions after DINT
might execute incorrectly and result in unexpected CPU execution. It is recommended to
always insert at least one instruction between EINT and DINT. Note that any alternative
instruction use that sets and immediately clears the CPU status register GIE bit must be
considered in the same fashion.
153
SLAU272C – May 2011 – Revised November 2013
CPUX
Copyright © 2011–2013, Texas Instruments Incorporated