Can't upload new code to UNO

I can't upload new code, and i don't get an error message unless i reset the board or unplug the cable. I know the link is working, and i know its running the last program i uploaded which was a basic analog in, serial and digital out, i can still see the values using the serial monitor. I have a feeling new uploads are being blocked some how. anyone know what to do?

I'm running a UNO on winXP with the latest arduino 1.0 IDE. but i've also tried it on a win7 machine, no luck.


int divs=4; // 4, 64, 256 divisor to reach intended bit resolution
int in;
byte out;
void setup()
DDRD =B11111110;

void loop()
in = analogRead(A0)/divs; // read the value from the sensor:
Serial.println(in, DEC);

any suggestions would help, I've tried reinstalling drivers, different combinations of pressing and holding the reset when i try and upload.