Int 21H [3.1] Function 5EH (94) Subfunction 02H Set printer setup string

Specifies a string to be sent in front of all files directed to a particular network printer, allowing users at different network nodes to specify individualized operating modes on the same printer. This function call is only available when Microsoft Networks is running.

Call with:

AH = 5EH

AL = 02H

BX = redirection list index

CX = length of setup string

DS:SI = segment:offset of setup string

Returns:

If function successful

Carry flag = clear

If function unsuccessful

Carry flag = set

AX = error code

Notes:

The redirection list index passed in register BX is obtained with Function 5FH Subfunction 02H (Get Redirection List Entry).

See also Function 5EH Subfunction 03H, which may be used to obtain the existing setup string for a particular network printer.

Example:

Initialize the setup string for the printer designated by redirection list index 2 so that the device is put into boldface mode before printing a file requested by this network node.

setup db 01bh,045h ; selects boldface mode

.

.

.

mov ax,5e02h ; function & subfunction

mov bx,2 ; redirection list index 2

mov cx,2 ; length of setup string

mov si,seg setup ; address of setup string

mov ds,si

mov si,offset setup

int 21h ; transfer to MS-DOS

jc error ; jump if function failed

.

.

.