I have a macro:
#define EnterCritical() do { SP++; *(unsigned char idata *)(SP-1) = IE; EA = 0; } while (0);
Maybe you'll want to change that to...
#pragma disable void do_something (void) { . . . } void do_something_loop (void) { . . . //enable interrupts . . . for (i = 0; i < ???; i++) do_something (); . . . }
Yes, that would work. Andrew