Perhaps the HEX modifier instead of # would solve your problem?

Val1=$85
SEROUT ...[HEX2 Val1]

Pds forum....
www.picbasic.org/forum