need help for debugging my sketch

hi everyone
I want to read analog voltage with arduino.i have used someone’s code of oscilloscope.but the problem is that code is made for processing.i just want to send the analog signal serially.so i have used only the code for arduino as follows

#include <avr/io.h>
#include <avr/interrupt.h>

#define BAUD_RATE 9600
#define INPUT_PIN 0
#define LED_PIN 13

//#define TEST_MODE // comment out to read analog pin, uncomment for test ramp wave

volatile int j;

void setup()
{
Serial.begin(BAUD_RATE);
pinMode(LED_PIN, OUTPUT);
cli(); // disable interrupts while messing with their settings
TCCR1A = 0x00; // clear default timer settings, this kills the millis() funciton
TCCR1B = 0x00;
TCCR1B |= (1 << WGM12); // Configure timer 1 for CTC mode
TCCR1B |= (0 << CS12); // Set timer prescaling by setting 3 bits
TCCR1B |= (1 << CS11); // 001=1, 010=8, 011=64, 101=1024
TCCR1B |= (1 << CS10);
TIMSK1 |= (1 << OCIE1A); // Enable CTC interrupt
OCR1A = 50; // Set CTC compare value
sei(); // turn interrupts back on
}

void loop() {
// nothing to do, its all in the interrupt handler!
}

ISR(TIMER1_COMPA_vect) // when timer counts down it fires this interrupt
{
#ifdef TEST_MODE
// Serial.print((j%64)*4 , DEC); // test mode, generate a ramp wave
j++;
#else
Serial.println( analogRead(INPUT_PIN), DEC); // real mode, sample analog pin
#endif
}

this code works well but the output is inverted.lets say if i have applied the cardiac signal its peak point comes bottom side and the ground refferance value comes upper side.can anyone suggest me how to get back my original signal?
any help will be hghly appreciated
thanx

this code works well but the output is inverted

can anyone suggest me how to get back my original signal?

Subtract (i.e. 1023 - reading) map?