Setting it to $80 does keep the "Global Enable" (GIE, INTCON.7) enabled, and this is required to keep ON INTERRUPT from thinking an interrupt occured.
But it also clears the "Peripheral Interrupt Enable" (PEIE, INTCON.6), so no peripherals can trigger an interrupt.
The manual should have added to disable the interrupts that are not "Peripheral" like TMR0 and the INT pin, but it didn't.
*Added* Or I guess it did, T0IE and INTE are in INTCON in the 16F's, so clearing INTCON would also clear them.
*Added* But with 18F's there are more non-peripheral interrupts like INT2IE in INTCON3.
The PBP3 manual has expanded the information on interrupts, and the $80 statement isn't there anymore.
It recommends clearing each enable bit for all interrupts being used.
It also describes DISABLE INTERRUPT and ENABLE INTERRUPT.
But there are two ways of thinking about it, and your application dictates which method to use.
Clearing the enable bits allows a section of code or the entire program to proceed without being interrupted, but it still checks between every line of code for an interrupt. Which does allow for selective disabling of individual interrupts.
Using DISABLE INTERRUPT/ENABLE INTERRUPT stops the checking between each line which makes that section run faster and use less code space.
DISABLE/ENABLE only affects the code it surrounds and can't turn interrupts off for the whole program.
The method used really depends on what your program needs.
HTH,
Bookmarks