My solution is to write a package called VIRTUAL_PRINTER (Listing 54) which has the name of the printer hidden in the body. If you ever need to change the name of the printer port, you just have to change the name in the VIRTUAL_PRINTER body, recompile it, and relink any application programs that use it. You don't need to recompile the affected application programs because they depend on the VIRTUAL_PRINTER specification, and you've only had to change the body. All you have to do is relink them. (An Ada programming environment ought to be able to give you a list of all units that depend on the VIRTUAL_PRINTER package specification, so you will know which programs to relink.)
The first printer I attached to my IBM PC AT clone was my old reliable Microline 83 printer, which had served my CP/M system for five years. It was configured for 1200 baud serial operation, and I put it on the COM2 port. Modern printers buffer several thousand characters, but in 1982 serial printers only buffered a line or two. At the end of each line the Microline 83 used an RS-232C control signal to tell the computer not to send any more data because it was busy printing the data in the buffer. My new computer expects the printer to use CONTROL_Q and CONTROL_S to tell it when to start and stop sending data, and must not bother to check the RS-232C control lines. Consequently, the first character of a line would sometimes be sent while the printer was still printing, and wouldn't get into the print buffer.
This is not a new problem. The original teletypewriter terminals took a long time for the print cylinder to return to the first column. They used a 20 milliamp current loop, and didn't have any extra control lines in those days. Since they didn't have any way of telling when the print cylinder was ready to print again, they routinely sent a few null characters after every carriage return. Nulls aren't printed, so it doesn't matter if they get lost or not. (Now you know why electronic bulletin boards sometimes ask you if you require any nulls.) Figure 33 shows that I solved my problem in exactly the same way.
When I bought my Epson LQ-850, I put it on the parallel port LPT1. All I had to do to was make the changes shown in Listing 55, and all my old programs would send data to by new printer.
You will almost certainly have to write your own VIRTUAL_PRINTER body, but it shouldn't be too difficult. All you have to do is know the logical name of the printer.