??? 03/08/05 03:39 Read: times |
#89241 - sdcc says unreachable code ! Responding to: ???'s previous message |
Ive now resorted back to my old idea of setting a bit in my ISR and then periodically checking for that bit(i thought the code would shorter if i had the ljmp in my ISR)...
if that bit is set, then I can do the neccesary tasks... i've written my code(which i believe is right)..but when i compile it(SDCC)..it gives me a warning saying unreachabe code.. An ihx file gets generated though...i really cant understand why this is hapening..is it with my code or the compiler.. im using _asm and then writting my label in assembly(00001$:) and then using ljmp to jump to that label. TH1 = /*****/ TL1 = /*****/ TR1 = 1; while(1) { /**** list of statements.. ****/ if(x == 1) { _asm ljmp 00001$ _endasm; } } _asm 00001$: _endasm; }// main () ends /*ISR*/ void timer1_isr(void) interrupt 3 { x=1; } What do i do to stop getting this unrachable code error... thanks -rahul |