I have a flag bit variable that is set by an interrupt routine. Then in my main loop the flag is checked like:
adc0_flag = 0; while(1){ if(adc0_flag == 1){ adc0_flag = 0; process_data() } ... }