Where in an Interrupt should you disable the GIE bit?
(or do you have to?)
Code:
org 0x004 ;IRQ routines
Push bcf INTCON, GIE ;Bx
movwf W_Stack ;Bx given multiple banks, and no global memory
swapf STATUS,W ;Bx The swapf instruction, unlike the movf, affects NO status bits, which is why it is used here.
clrf STATUS ;Bx point to bank 0 and clear all the flags
I don't use assembly very much, but I was under the impression it gets cleared automatically, otherwise it would get stuck in an infinite loop if you didn't immediately clear it.
looking at the datasheet for the 16F88 for example, it does say on the first page about interrupts that the GIE bit gets cleared, and that the instruction RETFIE automatically sets it again when exiting the ISR.