home *** CD-ROM | disk | FTP | other *** search
- ;/*
- ;** setprsu.asm
- ;** contains: setprsup(), getprsup()
- ;*/
-
- SETPRINTERSETUP equ 05e02h ;Set Printer setup function
- GETPRINTERSETUP equ 05e03h ;Get Printer setup function
- DOSCALL equ 021h ;DOS Software Interrupt
-
- include model.h
- include prologue.h
-
- pseg cSetPrinterSetup
-
- ;/*
- ;** int
- ;** setprsup(int index, int stringlength, char *string)
- ;**
- ;** ARGUMENT(s)
- ;** index - Redirection list index.
- ;** stringlength - Length of setup string (maximum length is 64 bytes).
- ;** string - Pointer to printer setup string.
- ;**
- ;** DESCRIPTION
- ;** Specifies an initial string for printer files. The IBM PC
- ;** Network Program must be loaded for the function call to execute
- ;** properly.
- ;**
- ;** RETURNS
- ;** 0 if successful, else a DOS error code
- ;**
- ;** AUTHOR
- ;** "" Fri 11-Nov-1988 16:19:24
- ;** Copyright (C)1988-1990 Greenleaf Software Inc. All Rights Reserved.
- ;**
- ;** MODIFICATIONS
- ;**
- ;*/
- cproc setprsup
- mov ax,SETPRINTERSETUP ;ax=dos function number
- mov bx,parm1_ ;bx=index
- mov cx,parm2_ ;cx=length of string
- if _LDATA
- push ds
- lds si,parm3_ ;DS:SI points to buffer
- else
- mov si,parm3_ ;DS:SI points to buffer
- endif
- int DOSCALL
- jc setprtexit ;if error leave with it
- xor ax,ax ;else indicate success
- setprtexit:
- cproce
-
-
- ;/*
- ;** int
- ;** getprsup(int index, int *stringlength, char *string)
- ;**
- ;** ARGUMENT(s)
- ;** index - Redirection list index.
- ;** stringlength - Pointer to variable to receive length of string.
- ;** string - Pointer to variable to receive string. (Maximum
- ;** possible length is 64 bytes).
- ;**
- ;** DESCRIPTION
- ;** Returns the printer setup string for printer files. The IBM PC
- ;** Network Program must be loaded for the function call to execute
- ;** properly.
- ;**
- ;** RETURNS
- ;** 0 if successful, else a DOS error code
- ;**
- ;** AUTHOR
- ;** "" Fri 11-Nov-1988 16:19:24
- ;** Copyright (C)1988-1990 Greenleaf Software Inc. All Rights Reserved.
- ;**
- ;** MODIFICATIONS
- ;**
- ;*/
- cproc getprsup
- mov ax,GETPRINTERSETUP ;ax=dos function number
- mov bx,parm1_ ;bx=index
- if _LDATA
- push ds
- lds di,parm4_
- else
- mov di,parm3_
- endif
- int DOSCALL ;call dos
- jc getexit
- if _LDATA
- lds bx,parm2_
- else
- mov bx,parm2_
- endif
- mov [bx],cx ;save length
- xor ax,ax ;indicate success
- getexit:
- if _LDATA
- pop ds
- endif
- cproce
-
- endps
- end
-