help .

new to pic programming! !

i need to program a 16c74 with 2 serial ports at two different baud rates 

the outline is :-  

one serial port is connected to a modem on landline all the time 

second serial is connected to a pc , by monitoring 4 logic pins on pic  

on any one of the logic pins going low it will autodial a prefixed number 

and then connect the second serial port to the first serial and send data between  

the two ports.

also if a landline incoming call is answered it then acts as above   

any help !!!  c code if possible if any 

 regards >

david >