Submits a file to the print spooler, removes a file from the print spooler's queue of pending files, or obtains the status of the printer. The print spooler, which is contained in the file PRINT.COM, was first added to MS-DOS in version 2.0, but the application program interface to the spooler was not documented until MS-DOS version 3.
Call with:
AH = 01H
AL = subfunction
00H = Get Installed State
01H = Submit File to be Printed
02H = Remove File from Print Queue
03H = Cancel All Files in Queue
04H = Hold Print Jobs for Status Read
05H = Release Hold
DS:DX = segment:offset of packet (Subfunction 01H)
segment:offset of ASCIIZ pathname (Subfunction 02H)
Returns:
If function successful
Carry flag = clear
and, if called with AL = 00H
AL = print spooler state
00H if not installed, ok to install
01H if not installed, not ok to install
FFH if installed
or, if called with AL = 04H
DX = error count
DS:SI = segment:offset of print queue file list
If function unsuccessful
Carry flag = set
AX = error code
Notes:
The packet passed to Subfunction 01H consists of five bytes. The first byte contains the level, which should be 00H for current versions of MS-DOS. The following four bytes contain the segment:offset of an ASCIIZ pathname, which may not include wildcard characters. If the specified file exists, it is added to the print queue.
The * and ? wildcard characters may be included in a pathname passed to Subfunction 02H, making it possible to delete multiple files from the print queue with one call.
The address returned by Subfunction 04H points to a list of 64-byte entries, each containing an ASCIIZ pathname. The first pathname in the list is the file currently being printed. The last entry in the list is a null string (a single 00H byte).