arduino mega2560 multiple interrupt problem

i am new to arduino programming
can anyone help me with this code i want to read the adc channel A8 to A11 what changes i will have to make in the code below

#include <Arduino.h>

#define ADC_NOISE_VALUE 10

#define ADC0 0
#define ADC1 1
#define ADC2 2
#define ADC3 3
#define ADC4 4
#define ADC5 5
#define ADC6 6
#define ADC7 7

// Define the ADC channels used. ADLAR will be zero.
#define ADCH1 ((1 << REFS0) | ADC1)
#define ADCH2 ((1 << REFS0) | ADC2)

volatile int analogValue1;
volatile int analogValue2;
volatile int adcChan;

void setup() {
Serial.begin(9600);

snaAdcIntSetup();
}

void loop() {
int oldAnalogValue1;
int oldAnalogValue2;

oldAnalogValue1 = 0;
oldAnalogValue1 = 0;

while (1) {
// If the first channel value has changed, print it out.
if (analogValue1 != oldAnalogValue1) {
Serial.print("Value1: ");
Serial.println(analogValue1);
oldAnalogValue1 = analogValue1;
}

// If the second channel value has changed, print it out.
if (analogValue1 != oldAnalogValue1) {
Serial.print("Value1: ");
Serial.println(analogValue1);
oldAnalogValue1 = analogValue1;
}
}
}

// Function: snaAdcIntSetup()
// Description: This funtion sets up the ADC for generating interrupts.
// Arguments: None
// Returns: None
void snaAdcIntSetup() {
// Set for the first ADC channel.
ADMUX = ADCH1;

// Set ADEN, prescale (128), and enable interrupts.
ADCSRA = (1 << ADEN) | (1 << ADPS2) | (1 << ADPS1) | (1 << ADPS0) | (1 << ADIE);

// Clear everything. No free running because ADATE is clear in ADSRA.
ADCSRB = 0;

// Enable global interrupts.
sei();

// Kick off the first ADC.
analogValue1 = 0;
analogValue2 = 0;

// Set ADSC to start ADC conversion.
ADCSRA |= (1 << ADSC);
}

// The ADC interrupt function.
ISR(ADC_vect) {
// int adcChan;
int tempVal;

// Get the ADC channel causing the interrupt.
adcChan = ADMUX & ((1 << MUX3) | (1 << MUX2) | (1 << MUX1) | (1 << MUX0));

// Read low first
tempVal = ADCL | (ADCH << 8);

switch (adcChan) {
case ADC1:
// If quiescent, ready to read
if (tempVal == 0) {
// Because of the continuous use of the ADC, only keep “real” values.
if (analogValue1 > ADC_NOISE_VALUE) {
// snaKeypadPutValue(analogValue1);
// Don’t keep anthing until another key pressed.
analogValue1 = 0;
}
}

// If the analog value just read is greater than the previously read, save it.
// Otherwise ignore it; assuming the key is just being pressed and low pressure
// might cause the value to be low.
if (tempVal > analogValue1) {
analogValue1 = tempVal;
}

// Set up for ADC Channel 2.
// Uncomment the following to enable the second channel.
ADMUX = ADCH2;
break;
case ADC2:
analogValue2 = tempVal;

// Set up for ADC channel 1.
ADMUX = ADCH1;
break;
}

// Set ADSC to start the next ADC conversion.
ADCSRA |= (1 << ADSC);
}

I haven’t gone into your interrupt functions, but your loop() structure is bad practice (though functional)

void loop() {
  static unsigned int oldAnalogValue1=0;
  static unsigned int oldAnalogValue2=0;  

    // If the first channel value has changed, print it out.
    if (analogValue1 != oldAnalogValue1) {
      Serial.print("Value1: ");
      Serial.println(analogValue1);
      oldAnalogValue1 = analogValue1;
    }

    // If the second channel value has changed, print it out.
    if (analogValue1 != oldAnalogValue1) {
      Serial.print("Value1: ");
      Serial.println(analogValue1);
      oldAnalogValue1 = analogValue1;
    }
}

Please post you sketch within </> code-tags for easier reading and the correct representation of tempVal = ADCL | (ADCH << 8);

  // Enable global interrupts.
  sei();

turning them on is probably a good idea, but how about turning them off during setup first ?

For each channel of interest, in the ISR read the channel, store the value for that channel, and change the multiplexer to the next channel of interest. Right now that is done with a switch statement. It might be easier to keep a counter and put the multiplexer settings in an array.

const byte ChannelCount = 4;
byte Channels[ChannelCount] = 
{
  ((1 << REFS0) | 8),
  ((1 << REFS0) | 9),
  ((1 << REFS0) | 10),
  ((1 << REFS0) | 11)
};
unsigned ADCValues[ChannelCount];

byte CurrentChannel = 0;

// In the ISR:

// Fetch the value for the current channel
ACDValues[CurrentChannel] = ADC;

// Switch the ADC Multiplexer to the next channel
CurrentChannel = (CurrentChannel + 1) % ChannelCount;
ADMUX = Channels[CurrentChannel];