I have a macro:
#define EnterCritical() do { SP++; *(unsigned char idata *)(SP-1) = IE; EA = 0; } while (0);
Opps, I forgot the <pre> and </pre> tags. ( Sure would be nice if the following message was before the message box: "Use <pre> and </pre> tags surrounding any code posted." )<br> <br> May I suggest this simpler, faster C code.<br> <br>
void main() { //some code .. { bit ie = IE; IE = 0; //critical code .. IE = ie; } //some more code .. }