Hi, I want to implement following job in C code with Keil C51. (1) jump to a place (function entry) after an interrupt occurs. I know how to implement it in assemble, but I don't know how to implement it in C ? Following is the implementation in assemble, JUMP_HERE: CLR A ... ... Int1: MOV DPTR,#JUMP_HERE PUSH DPL PUSH DPH RETI Does following C code works ? void main() { while(1) { JUMP_HERE: func1(); ... } } void Int0_ISR (void) interrupt 0 using 1 { // C code here .... #pragma asm MOV DPTR,#JUMP_HERE PUSH DPL PUSH DPH #pragma endasm } I know you can only use the goto statement within same function in C. Any idea ? Thanks. Daniel
In the context of the OP's problem there would most definitely be 'not robust' things going on if your low priority ISR strategy were employed. Such as??????????????????? Erik
"Such as???????????????????" Keyboard trouble?
Keyboard trouble? and how would a low priority ISR give trouble to a high priority timer ISR (standard procedure for debouncing keys)? Erik
and how would a low priority ISR give trouble to a high priority timer ISR (standard procedure for debouncing keys)? You have quite a talent for misunderstanding, don't you? I was enquiring whether you had keyboard trouble as your '?' key appears to be sticking.
no, it is not, but when you make statements that totally puzzele me beacuse they are totally unfunded, I indicate the puzzlement by ???????????????? when you respond to such as, am I to guess youe intentions?, I do not, as you, enagge in guessing. Erik