Printing to Auxiliary Ports from MS-DOS Editor and QBasic (79890)



The information in this article applies to:
    Microsoft MS-DOS operating system 5.0
    Microsoft MS-DOS operating system 5.0a
    Microsoft MS-DOS operating system 6.0
    Microsoft MS-DOS operating system 6.2
    Microsoft MS-DOS operating system 6.21
    Microsoft MS-DOS operating system 6.22

This article was previously published under Q79890

SUMMARY

You can print to alternative auxiliary ports from MS-DOS Editor or QBasic by saving the file with a file name of the alternative port.

Valid values for parallel ports include LPT1, LPT2, and LPT3. Valid values for serial ports include COM1, COM2, COM3, and COM4. Other auxiliary devices such as CON (console) may be used.

The ability to print to any of the above ports is contingent upon the port being both physically present on the machine and the port being supported by the computer's system BIOS.

MORE INFORMATION

To print to an alternative port, do the following:

    Open the file you want to print in MS-DOS Editor.
    From the File menu, choose Save As. You will be prompted for a new file name.
    For the file name, enter the name of the printer port to which your printer is attached. A dialog box will appear with the following message:

    File already exists. Overwrite?

    Select Yes.
The file will then print to the port you have chosen. Saving the file as an alternative port will not save the file to disk.

Modification Type: Major Last Reviewed: 5/12/2003
Keywords: KB79890