1 /** setjmp/longjmp tests.
6 unsigned int global_int = 0;
9 #if defined(SDCC_mcs51)
12 void T2_isr (void) interrupt 5 //no using
14 //do not clear flag TF2 so it keeps interrupting !
19 #if defined(SDCC_mcs51) || defined(PORT_HOST)
21 void try_fun(jmp_buf catch, int except)
23 longjmp(catch, except);
31 #if defined(SDCC_mcs51) || defined(PORT_HOST)
36 #if defined(SDCC_mcs51)
38 //enable the interrupt and set it's flag to generate some heavy stack usage
44 exception = setjmp(catch);
48 //should not get here!
51 ASSERT(exception == 1);