hey thank you for replying.

FYI, i didn't wrote that code. It came from the website. I have connected to the PC through the serial cable with pin5 of DB9 to GND, and pin 2 connect to 1koHm --> portC.6. To receive the data, i used a free PicBasic MicroCode Studio editor RS-232 terminal program, and also tested with hyper terminal at 9600baudrate-8bits-N-1. I think the function of debug and serout is the same.
About your suggestions for debugging. Do you mean to add a serout line test before looping to test the PIC? Then connect a LED to a certain output port and add "toggle LED" inside the loop to test the crystal oscillator? Im sorry man, i'm very new at this. Anyway, thank you very much.

Peter