INT 2Fh (47)             Multiplex Interrupt (PRINT)                ≥ DOS 3.1

Provides control of the PRINT spooler.

On entry: AH 01h
AL Function to be performed

Functions: AL 0 Get installed state
1 Submit file
2 Cancel file
3 Cancel all files
4 Status
5 End of status

Error codes: 1 Invalid function
2 File not found
3 Path not found
4 Too many open files
5 Access denied
8 Queue full
9 Busy
12 Name too long
15 Invalid drive

Returns: See below

──────────────────────────────────────────────────────────────────────────

AL = 0 Get Installed State

On entry: AH 01h
AL 00h

Returns: AL 00h Not installed, okay to install
01h Not installed, not okay to install
FFh Installed

──────────────────────────────────────────────────────────────────────────

AL = 1 Submit File

On entry: AH 01h
AL 01h
DS:DX Pointer to submit packet

Returns: AX Error code (see above)

The submit packet must include a "level" value (one byte; for DOS 3.1
through 3.3, the level value must be 0), followed by an ASCIIZ string
containing the drive, path, and filename of the file to be printed.
Wildcard characters are not supported.

──────────────────────────────────────────────────────────────────────────

AL = 2 Cancel File (remove from queue)

On entry: AH 01h
AL 02h
DS:DX Pointer to ASCIIZ string specifying file to
be cancelled.

Returns: AX Error code (see above)

Wildcard characters are supported.

──────────────────────────────────────────────────────────────────────────

AL = 3 Cancel All Files (purge queue)

On entry: AH 01h
AL 03h

──────────────────────────────────────────────────────────────────────────

AL = 4 Status (inspect queue)

On entry: AH 01h
AL 04h

Returns: DX Error count
DS:SI Pointer to print queue

The error count reports the number of consecutive failures experienced
by PRINT in outputting the most recent character.

The print queue, pointed to by DS:SI, is a series of 64-byte entries
specifying the files to be printed. The file currently being printed
appears first. The end of the queue is indicated by an entry beginning
with 00h.

A call to Status freezes the files in the queue. Call End of Status
(AL=5) to release the files for printing.

──────────────────────────────────────────────────────────────────────────

AL = 5 End of Status

On entry: AH 01h
AL 05h

Returns: AX Error code (see above)