CALL LPTSWAP
Switches output between two printers.

Swaps the device address associated with LPT1 with the device address
associated with LPT2. Printer output goes to the device address
associated with LPT1.

Assumes one printer is connected to LPT1 and another to LPT2.

See your DOS documentation or The Peter Norton Programmer's Guide
to the IBM-PC for more information on devices.

SET DEVICE TO PRINTER
* output is directed to printer 1 by default
@...SAY . . .
CALL LPTSWAP && output to printer 2
@...SAY . . .
CALL LPTSWAP && output to printer 1
@...SAY . . .
CALL LPTSWAP && output to printer 2
@...SAY . . .
SET DEVICE TO SCREEN
CALL LPTSWAP && restore to 1 before exiting
RETURN && or QUIT

Hazard
Because LPTSWAP takes no parameters, it is impossible to
tell by reading the code which printer is "active" unless you
comment your code as in the above example.

DOS does not restore the device address for you. The active
printer when you leave your program will remain the active
printer in DOS.


Placed in the Public Domain by Tom Rettig Assoc.