Look at the Datasheets. 16F877 uses C6 and C7 as you say, but the 16F628 used B1 RX and B2 TX

the only thing that I can see needs changing from a quick glance is the line....

TRISC = %10111111
to
TRISB = %11111011