Hi yasser,

It's half right, and the solution is half wrong.

When using ON INTERRUPT, you can not "Disable" the interrupts by clearing the GIE bit. Clearing GIE tells PBP that an interrupt has occured.

In suggesting INTCON=%10000000, perhaps they were only considering the peripheral interrupt sources. Which means the global interrupts can still trigger.

For ON INTERRUPT, If you want to make sure interrupts can't happen in a section of code, you need to wrap DISABLE / ENABLE statements around the affected code.

Doing so also reduces the "Code Bloat" from checking interrupts in-between each and every line of code.
<br>