The first thing I notice is a 10 Mhz osc defined as 40 Mhz.

Second is the SERIN/SEROUT commands.

Should read something like
Code:
SEROUT PIN, BAUDE RATE,[DATA]
Looks like the BAUD RATE (MODE) is missing.

Third, you will need to have
Code:
INCLUDE "modedefs.bas
at the beginning of your program.