MS-DOS 6.22 PRINT Command Background Printing Queue

In MS-DOS 6.22, the PRINT command functions as a native background print spooler, allowing users to offload plain text files to a printer while continuing to run applications or execute command-line tasks. Because MS-DOS is fundamentally a single-tasking operating system, the PRINT command provides a rare form of pseudo-multitasking by operating as a background process. This article details how the command initializes memory, manages the print queue, configures performance parameters, and handles print job control.

Mechanism: The TSR Architecture

The PRINT command achieves background printing by loading itself as a Terminate-and-Stay-Resident (TSR) program upon its first invocation. Once loaded into conventional memory, it intercepts system timer interrupts (specifically INT 28h for DOS idle and INT 08h / INT 1Ch for timer ticks).

When MS-DOS waits for keyboard input or during system idle cycles, the PRINT routine activates, reads data from the queued text files on the disk, and sends bytes to the designated output port. This design frees up the standard command prompt immediately, preventing the computer from freezing during lengthy print operations.

Initial Configuration Switches

When running PRINT for the first time in an MS-DOS session, several configuration switches can be set to define hardware allocation and buffer behavior:

  • /D:device: Specifies the target print device (such as PRN, LPT1, LPT2, or serial ports like COM1). If omitted, DOS prompts the user to confirm the default list device (PRN).
  • /B:size: Sets the size of the internal print buffer in bytes (default is 512, maximum is 16384). A larger buffer reduces disk access frequency during background printing.
  • /Q:maxfiles: Sets the maximum number of files allowed in the print queue (range is 4 to 32; default is 10).
  • /U:ticks: Specifies the number of clock ticks the utility waits for a printer that is unavailable or busy before yielding CPU time (default is 1).
  • /M:ticks: Specifies the maximum number of clock ticks the utility can retain control of the CPU to transfer characters to the printer (default is 2, range is 1 to 64).
  • /S:ticks: Sets the time slice allocation for the background print engine relative to foreground system tasks (default is 8, range is 1 to 255).

Note: These parameters can only be defined the first time the command is loaded. Changing them requires restarting MS-DOS.

Managing the Background Queue

Once the TSR component is resident in memory, the queue can be manipulated with simple command-line arguments:

  • Adding Files to the Queue: Running PRINT file1.txt file2.txt appends the specified files to the end of the existing queue. Standard MS-DOS wildcards (such as *.txt) are supported.
  • Checking Queue Status: Entering PRINT with no arguments displays the list of files currently being printed and those awaiting their turn.
  • Canceling Specific Files: Adding the /C flag removes specific files from the queue (e.g., PRINT file1.txt /C).
  • Adding While Canceling: The /P flag switches the command back into "print" mode on the same command line (e.g., PRINT file1.txt /C file2.txt /P).
  • Terminating the Entire Queue: Entering PRINT /T immediately stops printing the current file and empties all remaining jobs from the queue.

Limitations

The MS-DOS 6.22 PRINT command is strictly a text-file spooler. It transmits raw byte streams directly to the parallel or serial interface without rendering post-processing commands. Consequently, binary files, formatted modern document formats, and graphical output cannot be processed using this utility. Additionally, loading the utility reduces available conventional memory (the 640 KB base memory area), which can affect memory-intensive DOS programs running in the foreground.