Redirecting serial data at runtime
I wrote an enormous program that has an awful lot of RS-232 text out (and user response IN). Now I need to send and receive that data to the second (hardware) serial port - sometimes. I can't possibly have double the number of routines for I/O (one for HSERIN1/HSEROUT1 and another set for HSERIN2/HSEROUT2) ,the extra code wouldn't fit. I'm using an '8723.
I'm pondering trying to write a new assy routine with the function of HSERINx/HSEROUTx where "x" is the port I want to send/receive data from at the moment. Before I even attemp such a feat, I was wondering if anyone else has tried this or knows a simple way.