Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
I'm unsure what the problem exactly is. Are you saying you can't get to your main for(;;) loop because it's not leaving the ISR? Do you mean you're never getting dataready = 1 or result is not reading the result register properly?
Are result and dataReady declared as volatile? Any value that you're going to change in an ISR should be declared volatile to ensure the compiler doesn't just assume and optimize incorrectly. It will basically force the variable to be read before any time it is used rather than assuming it already knows the value.
I'd also recommend not pulling your value from the ADC inside the interrupt. Set a flag then pull the value into your result variable inside your main for(;;) loop. That way you can safely use ADC_IsEndConversion() to determine when your conversion has actually finished and ensure you aren't reading until then. It also minimizes code inside your interrupt.