Q815.INI Driver File Contents (psexec14.exe)

%---- Persistent variables set by installation programs ----%
%%<i>Q815.CFG    - printer specific configuration file
%%<i>Q825.CFG    - printer specific configuration file
%%<s>CFG_FILE    - configuration file name
%%<s>INI_FILE    - application file name
%%<s>PTYPE       - printer model name

%%<s>HPORT       - host (DOS) port (LPT1-3,COM1-4)
%%<i>HBAUD       - host baud rate (9600,300,600,1200,2400,4800,19200)
%%<s>HPARITY     - host parity (N,E,O)
%%<i>HDBITS      - host data bits (8,7)
%%<i>HSBITS      - host stop bits (1,2)
%%<i>SERIAL      - host serial port in use flag (0,1)
%%<i>PS2         - host supports 19200 via BIOS flag (1,0)
%%<i>LPT1        - port availability flag (1,0)
%%<i>LPT2        - port availability flag (1,0)
%%<i>LPT3        - port availability flag (1,0)
%%<i>COM1        - port availability flag (1,0)
%%<i>COM2        - port availability flag (1,0)
%%<i>COM3        - port availability flag (1,0)
%%<i>COM4        - port availability flag (1,0)

%%<i>ENV_TRAY    - PS825 envelope tray (1,0)

%---- Other persistent variables set during execution ----%
%%<s>HPROTO      - host flow control (DTR/DSR,XON/XOFF)
%%<s>PEMUL       - printer emulation (ESP,PS,HPPCL,HPGL,LN03,etc.)
%%<s>PTRAY       - current paper tray (standard,manual,optional)
%%<s>POTP_S      - start page status (enabled,disabled)
%%<s>PTO_S       - timeouts (0 60 30 5 3)
%%<i>JTO         - job timeout (0)
%%<i>MTO         - manual feed timeout (60)
%%<i>WTO         - ps wait timeout (30)
%%<i>ETO         - emulation wait timeout (5)
%%<i>ATO         - ESP wait timeout (3)

%---- Help Screens ----%
% Communication
help COM_H 14 66
"
 'Communication' allows you to set the host and printer ports.
 The onscreen status window gives current 'Program' settings 
 for PS Executive Series Utilities. If printer setup matches
 these, you are ready to use the program. If not, set the pro-
 gram to match the printer settings using this utility program.

 For current printer setup, check the start-up page or print a
 test configuration page. For more information see your printer
 and utilities documentation.  

                   Press <ESC> to exit help."

% Printer type
help PTYPE_H 9 66
"
 'Printer Type' allows you to set the utility program to oper-
 ate with your particular QMS printer model. When you select
 a different printer type, the program loads printer specific
 information to support the selected printer.

                   Press <ESC> to exit help."

% Printer accessories
help PACC_H 10 66
"
 'Printer Accessories' allows you to set the utility program to
 operate with accessories and options currently installed on 
 your printer. When you indicate that an accessory is install-
 ed, the program loads printer specific information to support
 that accessory.

                   Press <ESC> to exit help."

% Host Port Setup
help HPS_H 7 66
"
 'Host Port Setup' allows you to set your host computer for
 parallel, serial, or network capable communications.

                   Press <ESC> to exit help."

% Serial Port 
help SP_H 10 66
"
 'Serial Port' allows you to choose host computer Port Selec-
 tions (COM1, COM2, etc.); Baud Rate (300, up to 19200); Data 
 Bits (7 or 8); Parity (None, Odd, Even); Stop Bits (1 or 2); 
 and Flow Control (XON/XOFF or DTR/DSR).  Confirm selections by
 choosing Set Host Port.   

                   Press <ESC> to exit help."

% Printer Port Setup
help PPS_H 10 66
"
 'Printer Port Setup' allows you to set your printer serial
 port. Possible choices are Baud Rate (300, up to 19200); Data
 Bits (7 or 8); Parity (None, Ignore, Even, or Odd); Stop Bits
 (1 or 2); Flow Control (XON/XOFF or DTR/DSR); and Set Printer 
 Port to confirm your selections.  

                   Press <ESC> to exit help."

% Print Files
help PF_H 9 66
"
 'Print Files' allows you to select specific files to print. 
 These include PostScript, Non-PostScript, PostScript samples, 
 Status Page, and Adv. Status Page. Be ready to specify the 
 file's location.

                   Press <ESC> to exit help."

% PostScript File
help PSF_H 15 66
"
 'PostScript File' allows you to print any PostScript file you 
 choose. Be ready to specify the location (drive and directory)
 of the file to print.  
  
 The filename is mandatory. If you do not know its location,
 you may use DOS wild cards (? or *) to pop up a listing. How-
 ever, if the file is not in the current directory, you must
 specify a drive and path.  An example is: 

            [drive:] [path/]filename.   

                   Press <ESC> to exit help."

% Non PostScript File 
help NPS_H 9 66
"
 'Non PostScript File' allows you to print any text type file 
 while you are in ESP or PostScript modes of operation. Be 
 ready to specify the location (drive and directory) of the 
 file to print.    

                   Press <ESC> to exit help."

% PostScript Samples
help PSS_H 8 66
"
 'PostScript Samples' allows you to print various demonstration
 files which illustrate text and graphics capabilities of your
 printer.

                   Press <ESC> to exit help."

% Status Page
help SPF_H 10 66
"
 'Status Page' allows you to print a report covering informa-
 tion on your printer. This includes PostScript firmware set-
 tings, virtual memory allocations, serial interface configura-
 tion, and available typefaces. Also, refer to the status win-
 dow at the bottom of your screen for printer information.  

                   Press <ESC> to exit help."

% Adv. Status Page
help ASP_H 9 66
"
 'Adv. Status Page' allows you to print an expanded version of
 the regular status page with more details including timeouts,
 cache, paper, current PostScript settings, and other miscel-
 laneous information.    

                   Press <ESC> to exit help."

% Printer Options
help PO_H 10 66
"
 'Printer Options' offers selections for Current Printer Name,
  Current Paper Source, Current Emulation, Printer Buffer 
  Sizes, Default Timeouts, and Start-Up Page enabling or dis-
  abling. See the help window of each function for more infor-
  mation.  

                   Press <ESC> to exit help."

% Printer Identification
help PID_H 10 66
"
 'Change Printer Name' allows you to change the name by which
 the printer is internally identified. To avoid confusion, it
 is important to change this name when two printers of the same
 name are on one network. The new name remains in effect until
 you change it again or reset default parameters. 

                   Press <ESC> to exit help."
 
% Current Paper Source
help CPS_H 8 66
"
 'Current Paper Source' determines the source of paper, either
 manual feed or a paper tray. On multiple paper tray printers, 
 tray chaining may be enabled or disabled.

                   Press <ESC> to exit help."

% Upper Tray
help UT_H 8 66
"
 Paper will be drawn from the printer's 'Upper Tray.' This 
 becomes the default tray and remains so even if the power is 
 turned off.  

                   Press <ESC> to exit help."

% Lower Tray
help LT_H 8 66
"
 Paper will be drawn from the printer's 'Lower Tray.' This 
 becomes the default tray and remains so even if the power is 
 turned off.  

                   Press <ESC> to exit help."

% Tray Feed
help TF_H 8 66
"
 'Tray Feed' causes paper to be drawn from the printer's paper
 tray. This becomes the default paper source and remains so 
 even if the power is turned off.  

                   Press <ESC> to exit help."

% Tray Chaining
help TC_H 10 66
"
 The printer will switch paper trays when the current tray be-
 comes empty. Paper is first drawn from the default tray and
 then from the other tray. 'Tray Chaining' becomes the default
 and remains so even if the power is turned off until you 
 change it.     

                   Press <ESC> to exit help."

% Manual Feed
help MF_H 9 66
"
 'Manual Feed' causes paper to be drawn from the printer's 
 manual feed input. This becomes the default paper source and
 remains so until paper tray feed is selected or the power is
 turned off.

                   Press <ESC> to exit help."

% Envelope Feed
help EF_H 8 66
"
 'Envelope Feed' causes paper to be drawn from the printer's
 optional envelope tray. This becomes the default paper source
 and remains so even if the power is turned off.  

                   Press <ESC> to exit help."

% Current Emulation
help CE_H 10 66
"
 'Current Emulation' allows you to activate printer resident 
 emulations without changing the communications switch. You 
 may select HPPCL, HPGL, LN03, Proprinter, FX-80, Diablo, 
 ANSI, ESP (automatic emulation selection), or return to 
 PostScript batch mode.  

                   Press <ESC> to exit help."

% PostScript
help PSE_H 8 66
"
 'PostScript' deactivates printer resident emulations if they
 were activated with PS Executive Series Utilities. Control of
 the printer returns to PostScript mode. 

                   Press <ESC> to exit help."

% HPPCL
help PCL_H 8 66
"
 'HPPCL' activates the printer's resident HP LaserJet+ (HPPCL) 
 emulation. PostScript batch mode selection deactivates this 
 emulation. 

                   Press <ESC> to exit help."

% HPGL
help PGL_H 9 66
"
 'HPGL' activates the printer's HP 7550A plotter (HPGL) emula-
 tion. The HPGL emulation cartridge must be installed to run 
 HPGL mode. PostScript batch mode selection deactivates this 
 emulation. 

                   Press <ESC> to exit help."

% LN03
help LN03_H 9 66
"
 'LN03' activates the printer's DEC LN03 PLUS emulation. The
 LN03 PLUS emulation cartridge must be installed to run LN03
 mode. PostScript batch mode selection deactivates this emula-
 tion. 

                   Press <ESC> to exit help."

% ANSI
help ANSI_H 8 66
"
 'ANSI' activates the printer's ANSI X3.64 emulation. The ANSI
 X3.64 emulation cartridge must be installed to run ANSI mode. 
 PostScript batch mode selection deactivates this emulation. 

                   Press <ESC> to exit help."

% FX-80
help FX80_H 9 66
"
 'FX-80' activates the printer's Epson FX-80 emulation. The
 Epson FX-80 emulation cartridge must be installed to run 
 FX-80 mode. PostScript batch mode selection deactivates this
 emulation. 

                   Press <ESC> to exit help."

% Proprinter
help IPRO_H 9 66
"
 'Proprinter' activates the printer's IBM Proprinter emula-
 tion. The IBM Proprinter emulation cartridge must be install-
 ed to run Proprinter mode. PostScript batch mode selection 
 deactivates this emulation. 

                   Press <ESC> to exit help."
% Diablo
help DBLO_H 9 66
"
 'Diablo' activates the printer's Diablo 630 emulation. The
 Diablo 630 emulation cartridge must be installed to run 
 Diablo mode. PostScript batch mode selection deactivates this
 emulation. 

                   Press <ESC> to exit help."

% ESP - Auto Selection
help AS_H 10 66
"
 'ESP' mode activates the printer to automatically recognize
 a printer language sent to it in a file and to switch to the
 appropriate emulation to handle that language. This is the
 factory default setting for serial and parallel interfaces 
 and remains in effect until you change it.   

                   Press <ESC> to exit help."

% Printer Buffer Sizes
help PBS_H 8 66
"
  'Printer Buffer Sizes' allows you to adjust the amount of
  Virtual Memory reserved for the font cache and host input
  buffer.    

                   Press <ESC> to exit help."

% Font Cache
help FCS_H 11 66
"
 'Font Cache' allows you to adjust the amount of Virtual Mem-
 ory reserved for font caching. You may set the font cache to
 any size up to the amount of available Virtual Memory. Print a
 status page to determine the current available Virtual Memory.
 Accessing fonts in this area is faster than if the printer has
 to go out to other storage areas to retrieve them.      

                   Press <ESC> to exit help."

% Host Input  
help HIS_H 12 66
"
 'Host Input' allows you to adjust the amount of Virtual Memory
 reserved for information from the host. You may set the host
 input buffer for the current host interface to any size up to 
 the amount of available Virtual Memory. Print a status page to
 determine the current available Virtual Memory. A larger area 
 can accept more information from the host which in turn frees
 the host more quickly.      

                   Press <ESC> to exit help."

% Default Timeouts
help PTO_H 20 66
"
 'Default Timeouts' allows you to adjust the number of seconds
 for Print Job, Manual Feed, PostScript Wait, and Emulations
 Wait timeouts before a job is cancelled. The ESP Wait timeout
 allows you to adjust the maximum number of seconds required
 to select the appropriate emulation for print jobs smaller 
 than 256 bytes when in ESP mode.

 Print Job Timeout is the maximum time to process a job. Manual
 Feed Timeout is the maximum time for paper to be inserted in
 manual feed when output is ready to be printed. PostScript and
 Emulations Wait Timeout is the maximum time between characters
 received on the communication channel for Postscript and emu-
 lation modes respectively. Enter a value for each area and 
 press return to go to the next field. You may hit <ESC> to
 cancel and return to previous settings. 

                   Press <ESC> to exit help."

% Start-Up Page
help POTP_H 9 66
"
 'Start-Up Page' allows you to select whether you want a start-
 up page to print automatically when you power-up your printer.
 Enable causes the page to print; disable causes it not to 
 print.  

                   Press <ESC> to exit help."

% Special
help SPC_H 10 66
"
 'Special' offers selections such as Download Typefaces, Align
 Printer Margins, Install Error Handler, Eject PostScript Page,
 End PostScript Job, Reset Default Parameters, and Exit Utili-
 ties. See the help window of each function for more informa-
 tion.  

                   Press <ESC> to exit help."

% Download Typefaces
help DT_H 8 66
"
  'Download Typefaces' downloads PostScript typefaces to the 
  printer. Be ready to specify the location (drive and direc-
  tory) of your downloadable typefaces.

                   Press <ESC> to exit help."

% Align Printer Margins
help APM_H 16 66
"
 'Align Printer Margins' aligns the print area within the page.
 An alignment page prints with two lines which should intersect
 two inches from the bottom and two inches from the left side. 
 If they are correctly positioned, answer Yes. If not, answer 
 No and follow instructions on the next screen.

 You may choose hash mark (1/16 inch) or dot (1/300 inch) in-
 crements. A positive vertical number moves the grid up while
 a negative one moves it down. A positive horizontal number
 moves the grid to the right, and a negative one moves it to
 the left.

                   Press <ESC> to exit help."

% Install Error Handler
help IEH_H 9 66
"
 'Install Error Handler' downloads an error-handling routine 
 which detects PostScript errors and prints a page describing 
 the error. The Error Handler remains in printer memory until 
 power is turned off.

                   Press <ESC> to exit help."

% Eject PostScript Page
help EPP_H 8 66
"
 'Eject PostScript Page' works only in PostScript or ESP mode
 which can choose PostScript. It acts as a form feed to eject
 a page and clear out the printer buffer.   

                   Press <ESC> to exit help."

% End PostScript Page
help EPJ_H 8 66
"
 'End PostScript Job' works only in PostScript or ESP mode
 which can choose PostScript. It terminates the current Post-
 Script print job.

                   Press <ESC> to exit help."

% Reset Default Parameters
help RDP_H 8 66
"
 With the exception of page count, 'Reset Default Parameters'
 returns all configurable options such as timeouts, emulations,
 paper sources, etc. to the factory default settings.  

                   Press <ESC> to exit help."

% Exit Utilities
help EX_H 7 66
"
 'Exit Utilities' allows you to exit these utilities and return
 to DOS.  

                   Press <ESC> to exit help."

%---- general ----%
name "PS Executive Series Utilities"
vers "V1.40"
abbr "Utilities"

str HPORT 0 "LPT1" KEEP
port HPORT

%---- global variables ----%
%---- persistent variables ----%
int Q815.CFG 0 KEEP
int Q825.CFG 0 KEEP
str CFG_FILE 13 "q815.cfg" KEEP
str INI_FILE 13 "q815.ini" KEEP
str PTYPE 32 "QMS-PS 815" KEEP

int HBAUD 9600 KEEP
int HDBITS 8 KEEP 
int HSBITS 1 KEEP
str HPROTO 12 "DTR/DSR" KEEP
str HPARITY 0 "N" KEEP
str PEMUL 14 "ESP" KEEP

#ifdef Q825.CFG
  str PTRAY 15 "Upper Tray" KEEP
#else
  str PTRAY 15 "Tray Feed" KEEP
#endif

int PS2 1 KEEP
int SERIAL 0 KEEP
int COM1 1 KEEP
int COM2 1 KEEP
int COM3 1 KEEP
int COM4 1 KEEP
int LPT1 1 KEEP
int LPT2 1 KEEP
int LPT3 1 KEEP

str POTP_S 8 "Enabled" KEEP
str PTO_S 25 "0 60 30 5 3" KEEP

int JTO 0 KEEP
int MTO 60 KEEP
int WTO 30 KEEP
int ETO 5 KEEP
int ATO 3 KEEP

int ENV_TRAY 0 KEEP

%---- non-persistent variables ----%
int OK 0
int ESC 1
int ALT 2
int KEY 1
int CURMSG -1
int PRTOK 0

str T512 512 ""
str T300 300 ""
str T80 80 ""
str T10 10 ""

str SPACE 0 " "
str EMPTY 0 ""
str YES 0 "Y"
str NO 0 "N"
str ENABLE 0 "E"
str DISABLE 0 "D"

str TRUE 0 "true"
str FALSE 0 "false"

str DDD 0 "%d %d %d"
str SSS 0 "%s%s%s"
str SS 0 "%s%s"

str CTRLD 0 "\0x004"

list N/A -1 

str D_OPT 0 "-d%s"
str EXEPORT 0 "-dcom1"

str HPORT_T 0 "COM1"
int HBAUD_T 9600
int HDB_T 8  
int HSB_T 1
str HPRO_T 12 "DTR/DSR"
str HPAR_T 0 "N"

int PBAUD 9600
int PDBITS 8
int PSBITS 1  
str PPROTO 14 "DTR/DSR"
str PPARITY 0 "N"

str COM1_S 0 "COM1"
str COM2_S 0 "COM2"
str COM3_S 0 "COM3"
str COM4_S 0 "COM4"
str LPT1_S 0 "LPT1"
str LPT2_S 0 "LPT2"
str LPT3_S 0 "LPT3"

#ifdef Q825.CFG
  str PNAME 32 "QMS-PS 825"
  str UTRAY 0 "Upper Tray"
#else
  str PNAME 32 "QMS-PS 815"
  str UTRAY 0 "Tray Feed"
#endif

str ETRAY 0 "Envelope Tray"
str LTRAY 0 "Lower Tray"
str MTRAY 0 "Manual Feed"

str AUTOSW 0 "ESP"
str PSCRPT 0 "PostScript"
str HPPCL 0 "HPPCL"
str HPGL 0 "HPGL"
str LN03 0 "LN03"
str IBMPRO 0 "Proprinter"
str FX80 0 "FX-80"
str DIABLO 0 "Diablo"
str ANSI 0 "ANSI"

str XON-D 0 "XON/XOFF-DTR"
str XON 0 "XON/XOFF"
str DTR 0 "DTR/DSR"
str E 0 "E"
str O 0 "O"
str N 0 "N"
str I 0 "I"

str ENAB 0 "Enabled"
str DISAB 0 "Disabled"

str CURDIR 145 ""
str WILDPS 0 "*.ps"

%---- global procedures ----%
str EXSERV 0 "\0x004%!\0x00aserverdict begin 0 exitserver\0x00a"

proc FPP512 {
  strsss T512 SS EXSERV T300 NULL
  PRTOK = (printstr T512)
}

str PU_STR 0 "\0x00aPrinter power must be cycled for\0x00a  this change to take effect.\0x00a"

proc PU_MSG {
  msgwait PU_STR
}

%---- status box procedures ----%
int STBOX 0
str STBOX_SP 0 "Printer        : %s\0x00aEmulation      : %s\0x00aHost Interface : %s:%d,%d,%s,%d,%s\0x00aTimeouts       : %s\0x00aPaper Source   : %s\0x00aStart-Up Page  : %s\0x00a\0x00a   <ESC> to Cancel      <F1> for Help" 
list STBOX_SL PTYPE PEMUL HPORT HBAUD HDBITS HPARITY HSBITS HPROTO PTO_S PTRAY POTP_S

str STBOX_PP 0 "Printer        : %s\0x00aEmulation      : %s\0x00aHost Interface : %s:\0x00aTimeouts       : %s\0x00aPaper Source   : %s\0x00aStart-Up Page  : %s\0x00a\0x00a   <ESC> to Cancel      <F1> for Help"              
list STBOX_PL PTYPE PEMUL HPORT PTO_S PTRAY POTP_S

proc STATUS {
  if SERIAL { 
     STBOX = (statbox STBOX_SP  STBOX_SL 41)
  }
  if (! SERIAL) { 
     STBOX = (statbox STBOX_PP  STBOX_PL 41)
  }
}

proc NEWSTATUS {
  remmsgbox STBOX
  STATUS
}

proc NOSTATUS {
  remmsgbox STBOX
}

%---- Communication ----%
str SHP_M 0 "\0x00aSetting Host Port Configuration\0x00a"
proc SHP_MB {
  msgbox SHP_M 2
}

str SPC_M 0 "\0x00aSetting Utility Program Configuration\0x00a"
proc SPC_MB {
  msgbox SPC_M 2
}

str psx_exe 0 "PSEXEC.EXE"
str ini_q815mr 0 "q815mr.ini"

proc PS815 {
  SPC_MB
  restart PSX_EXE INI_FILE INI_FILE CFG_FILE "q815.cfg"
}
proc PS825 {
  SPC_MB
  restart PSX_EXE INI_FILE INI_FILE CFG_FILE "q825.cfg"
}
proc PS815MR {
  SPC_MB
  restart PSX_EXE INI_FILE ini_q815mr CFG_FILE "q815mr.cfg"
}
proc PS825MR {
  SPC_MB
  restart PSX_EXE INI_FILE ini_q815mr CFG_FILE "q825mr.cfg"
}
proc PS1700 {
  SPC_MB
  restart psx_exe INI_FILE "q1700.ini" CFG_FILE "q1700.cfg"
}
proc PS2000 {
  SPC_MB
  restart PSX_EXE INI_FILE "q2000.ini" CFG_FILE "q2000.cfg"
}
proc PS410 {
  SPC_MB
  restart PSX_EXE INI_FILE "q410.ini" CFG_FILE "q410.cfg"
}

%---- Communication : Host Port Setup : Serial Port : Port Selection ----%
proc SETC1 {
  strcpy HPORT_T COM1_S
}
proc SETC2 {
  strcpy HPORT_T COM2_S
}
proc SETC3 {
  strcpy HPORT_T COM3_S
}
proc SETC4 {
  strcpy HPORT_T COM4_S
}
menu SPORTS "Serial Ports" SP_H 8 22
#ifdef COM1
  opt SPORTS SETC1 NONE " ~A...COM1:"
#endif
#ifdef COM2
  opt SPORTS SETC2 NONE " ~B...COM2:"
#endif
#ifdef COM3
  opt SPORTS SETC3 NONE " ~C...COM3:"
#endif
#ifdef COM4
  opt SPORTS SETC4 NONE " ~D...COM4:"
#endif

proc GETSPORT {
  popup SPORTS
}

%---- Communication : Host Port Setup : Serial Port : Baud Rate ----%
proc SETB3 {
  HBAUD_T = 300
}
proc SETB6 {
  HBAUD_T = 600
}
proc SETB12 {
  HBAUD_T = 1200
}
proc SETB24 {
  HBAUD_T = 2400
}
proc SETB48 {
  HBAUD_T = 4800
}
proc SETB96 {
  HBAUD_T = 9600
}
proc SETB19 {
  HBAUD_T = 19200
}

menu BAUDS "Baud Rates" SP_H 8 22
  opt BAUDS SETB3 NONE " ~A...300"
  opt BAUDS SETB6 NONE " ~B...600"
  opt BAUDS SETB12 NONE " ~C...1200"
  opt BAUDS SETB24 NONE " ~D...2400"
  opt BAUDS SETB48 NONE " ~E...4800"
  opt BAUDS SETB96 NONE " ~F...9600"
#ifdef PS2
  opt BAUDS SETB19 NONE " ~G...19200"
#endif

proc GETBAUD {
  popup BAUDS
}

%---- Communication : Host Port Setup : Serial Port : Parity ----%
proc SETEVEN {
  strcpy HPAR_T E
}
proc SETODD {
  strcpy HPAR_T O
}
proc SETNONE {
  strcpy HPAR_T N
}

menu PARITY "Parity" SP_H 8 22
  opt PARITY SETNONE NONE " ~None"
  opt PARITY SETODD NONE " ~Odd"
  opt PARITY SETEVEN NONE " ~Even"

proc GETPRTY {
  popup PARITY
}

%---- Communication : Host Port Setup : Serial Port : Data Bits ----%
proc SETH8B {
  HDB_T = 8
}
proc SETH7B {
  HDB_T = 7
}

menu HWL_PU "Data Bits" SP_H 8 22
  opt HWL_PU SETH8B NONE " ~8 Bits"
  opt HWL_PU SETH7B NONE " ~7 Bits"

proc GETWLEN {
  popup HWL_PU
}

%---- Communication : Host Port Setup : Serial Port : Stop Bits ----%
proc SETH1SB {
  HSB_T = 1
}
proc SETH2SB {
  HSB_T = 2
}

menu HSB_PU "Stop Bits" SP_H 8 22
  opt HSB_PU SETH1SB NONE " ~1 Bit"
  opt HSB_PU SETH2SB NONE " ~2 Bits"

proc GETSBITS {
  popup HSB_PU
}

%---- Communication : Host Port Setup : Serial Port : Flow Control ----%
proc SETDTR {
  strcpy HPRO_T DTR
}
proc SETXON {
  strcpy HPRO_T XON
}

menu PROTOS "Flow Control" SP_H 8 22
  opt PROTOS SETDTR NONE " ~DTR/DSR"
  opt PROTOS SETXON NONE " ~XON/XOFF"

proc GETPROTO {
 popup PROTOS
}

%---- Communication : Host Port Setup : Serial Port : Set Host Port ----%
str SHSP_P 0 "  Current Serial Port Selections  \0x00a\0x00a      Port          :  %s:\0x00a      Baud Rate     :  %d\0x00a      Parity        :  %s\0x00a      Data Bits     :  %d\0x00a      Stop Bits     :  %d\0x00a      Flow Control  :  %s\0x00a\0x00a    Configure Port (Y/N): "

list SHSP_L SEL SHSP_P NO YES HPORT_T HBAUD_T HPAR_T HDB_T HSB_T HPRO_T

proc SETHSPORT {
  if ((mvinput SHSP_L N/A N/A N/A N/A) == ALT) {
     CURMSG = (msgbox SHP_M 0)
     strcpy HPORT HPORT_T
     HBAUD = HBAUD_T
     strcpy HPARITY HPAR_T
     HDBITS = HDB_T
     HSBITS = HSB_T
     strcpy HPROTO HPRO_T
     SERIAL = 1
     setser (setport HPORT) HBAUD HPARITY HDBITS HSBITS
     saveint &HBAUD HBAUD
     savestr &HPARITY HPARITY
     saveint &HDBITS HDBITS
     saveint &HSBITS HSBITS
     savestr &HPROTO HPROTO
     remmsgbox CURMSG
  }
}

menu SEROPTS "Serial Port Setup" SP_H 8 45 HOLD
  opt SEROPTS GETSPORT NONE " ~Port Selection"
  opt SEROPTS GETBAUD NONE " ~Baud Rate"
  opt SEROPTS GETWLEN NONE " ~Data Bits"
  opt SEROPTS GETPRTY NONE " Pa~rity"
  opt SEROPTS GETSBITS NONE " ~Stop Bits"
  opt SEROPTS GETPROTO NONE " ~Flow Control"
  opt SEROPTS SETHSPORT NONE " Set ~Host Port"

proc GETSOPTS {
  popup SEROPTS
}

proc SETL1 {
  SERIAL = 0
  strcpy HPORT LPT1_S
  setport HPORT
  SHP_MB
}
proc SETL2 {
  SERIAL = 0
  strcpy HPORT LPT2_S
  setport HPORT
  SHP_MB
}
proc SETL3 {
  SERIAL = 0
  strcpy HPORT LPT3_S
  setport HPORT
  SHP_MB
}

menu PPORTS "Parallel Ports" HPS_H 8 45
#ifdef LPT1
  opt PPORTS SETL1 NONE " ~A...LPT1:"
#endif
#ifdef LPT2
  opt PPORTS SETL2 NONE " ~B...LPT2:"
#endif
#ifdef LPT3
  opt PPORTS SETL3 NONE " ~C...LPT3:"
#endif

proc GETPPORT {
  popup PPORTS
}

menu RPORTS "Remote Ports" HPS_H 8 45
  opt RPORTS SETL1 NONE " ~A...LPT1:"
  opt RPORTS SETL2 NONE " ~B...LPT2:"
  opt RPORTS SETL3 NONE " ~C...LPT3:"

proc GETRPORT {
  popup RPORTS
}

menu HOSTOPTS "Host Port Setup" HPS_H 8 22
  opt HOSTOPTS GETPPORT NONE " ~Parallel Port"
  opt HOSTOPTS GETSOPTS NONE " ~Serial Port"
  opt HOSTOPTS GETRPORT NONE " ~Remote Port"

proc GETHOSTOPTS {
  popup HOSTOPTS
  NEWSTATUS
  strsss EXEPORT D_OPT HPORT NULL NULL
  savestr &HPORT HPORT
  saveint &SERIAL SERIAL
}

%---- Communication : Printer Port Setup ----%
int SCCVAL 71
%---- Communication : Printer Port Setup : Baud Rate ----%
proc PB3 {
  PBAUD = 300
}
proc PB6 {
  PBAUD = 600
}
proc PB12 {
  PBAUD = 1200
}
proc PB24 {
  PBAUD = 2400
}
proc PB48 {
  PBAUD = 4800
}
proc PB96 {
  PBAUD = 9600
}
proc PB192 {
  PBAUD = 19200
}

menu PBAUDS "Baud Rates" PPS_H 8 45
  opt PBAUDS PB3 NONE " ~A...300"
  opt PBAUDS PB6 NONE " ~B...600"
  opt PBAUDS PB12 NONE " ~C...1200"
  opt PBAUDS PB24 NONE " ~D...2400"
  opt PBAUDS PB48 NONE " ~E...4800"
  opt PBAUDS PB96 NONE " ~F...9600"
  opt PBAUDS PB192 NONE " ~G...19200"

proc GETPBAUD {
  popup PBAUDS
}

%---- Communication : Printer Port Setup : Parity ----%
proc SETPIGN {
  strcpy PPARITY I
  bits SCCVAL 0xfc 0x00
}
proc SETPEVEN {
  strcpy PPARITY E
  bits SCCVAL 0xfc 0x02
}
proc SETPODD {
  bits SCCVAL 0xfc 0x01
  strcpy PPARITY O
}
proc SETPNONE {
  strcpy PPARITY N
  bits SCCVAL 0xfc 0x03
}

menu GPPARITY "Parity" PPS_H 8 45
  opt GPPARITY SETPNONE NONE " ~None"
  opt GPPARITY SETPIGN NONE " ~Ignore"
  opt GPPARITY SETPEVEN NONE " ~Even"
  opt GPPARITY SETPODD NONE " ~Odd"

proc GETPPRTY {
  popup GPPARITY
}

%---- Communication : Printer Port Setup : Data Bits ----%
proc SETP8B {
  PDBITS = 8
  bits SCCVAL 0x9f 0x40
}
proc SETP7B {
  PDBITS = 7
  bits SCCVAL 0x9f 0x00
}

menu PWL_PU "Data Bits" PPS_H 8 45
  opt PWL_PU SETP8B NONE " ~8 Bits"
  opt PWL_PU SETP7B NONE " ~7 Bits"

proc GETPWLEN {
  popup PWL_PU
}

%---- Communication : Printer Port Setup : Stop Bits ----%
proc SETP1SB {
  PSBITS = 1
  bits SCCVAL 0x7f 0x00
}
proc SETP2SB {
  PSBITS = 2
  bits SCCVAL 0x7f 0x80
}

menu PSB_PU "Stop Bits" PPS_H 8 45
  opt PSB_PU SETP1SB NONE " ~1 Bit"
  opt PSB_PU SETP2SB NONE " ~2 Bits"

proc GETPSBITS {
  popup PSB_PU
}

%---- Communication : Printer Port Setup : Flow Control ----%
proc SETPDTR {
  strcpy PPROTO DTR
  bits SCCVAL 0xe3 0x04
}
proc SETPXON {
  strcpy PPROTO XON
  bits SCCVAL 0xe3 0x14
}
proc SETPXD {
  strcpy PPROTO XON-D
  bits SCCVAL 0xe3 0x00
}

menu PPROTOS "Flow Control" PPS_H 8 45
  opt PPROTOS SETPDTR NONE " ~DTR/DSR"
  opt PPROTOS SETPXON NONE " ~XON/XOFF"
  opt PPROTOS SETPXD NONE " X~ON/XOFF-DTR"

proc GETPPROTO {
 popup PPROTOS
}

%---- Communication : Printer Port Setup : Set Printer Port ----%
str SPSP_P 0 "  Current Printer Port Selections  \0x00a\0x00a     Baud Rate     :  %d\0x00a     Parity        :  %s\0x00a     Data Bits     :  %d\0x00a     Stop Bits     :  %d\0x00a     Flow Control  :  %s\0x00a\0x00a    Configure Printer (Y/N): "

list SPSP_L SEL SPSP_P NO YES PBAUD PPARITY PDBITS PSBITS PPROTO 

str SPSP_PS 0 "\0x00astatusdict begin 25 %d %d setsccbatch end\0x004" 

proc SETPSPORT {
  if ((mvinput SPSP_L N/A N/A N/A N/A) == ALT) {
     strddd T300 SPSP_PS PBAUD SCCVAL 0
     FPP512
  }
}

menu PSEROPTS "Serial Port Setup" PPS_H 8 22 HOLD
  opt PSEROPTS GETPBAUD NONE " ~Baud Rate"
  opt PSEROPTS GETPWLEN NONE " ~Data Bits"
  opt PSEROPTS GETPPRTY NONE " Pa~rity"
  opt PSEROPTS GETPSBITS NONE " ~Stop Bits"
  opt PSEROPTS GETPPROTO NONE " ~Flow Control"
  opt PSEROPTS SETPSPORT NONE " Set ~Printer Port"

proc GETPSOPTS {
  popup PSEROPTS
}

%---- Communication : Printer Type ----%
menu PRTTYPES "Printer Models" PTYPE_H 8 22 
  opt PRTTYPES PS410 PTYPE_H " QMS-PS ~410"
#ifdef Q825.CFG
  opt PRTTYPES PS815 PTYPE_H " QMS-PS 8~15"
#else
  opt PRTTYPES PS825 PTYPE_H " QMS-PS ~825"
#endif
  opt PRTTYPES PS815MR PTYPE_H " QMS-PS 815 ~MR"
  opt PRTTYPES PS825MR PTYPE_H " QMS-PS 825 M~R"
  opt PRTTYPES PS1700 PTYPE_H " QMS-PS 1~700"
  opt PRTTYPES PS2000 PTYPE_H " QMS-PS ~2000"

proc GETPRINTER {
  popup PRTTYPES
}

%---- Communication : Printer Accessories ----%
str PACC_P 0 "               Printer Accessories\0x00a\0x00aThe utility program can be configured to support\0x00aprinter accessories and options currently installed\0x00aon your printer.\0x00a\0x00a        Envelope Feeder. Installed? (Y/N): "
list PACCLIST SEL PACC_P NO YES

proc GETPACC {
  KEY = (mvinput PACCLIST N/A N/A N/A N/A)
  if(KEY != ESC) {
     % if envelope tray installed
     if(KEY == ALT) {
       saveint &ENV_TRAY 1
     }

     % if envelope tray is not installed
     if(KEY == OK) {
       % if envelope tray is current
       if(! (strcmp PTRAY ETRAY) ) {
         strcpy PTRAY UTRAY
         savestr &PTRAY PTRAY
       }
       saveint &ENV_TRAY 0
     }
     PS825
  }
}

%---- Print Files : PostScript File ----%
% the % in the following string is doubled to create the literal %
str PS_COPIES 0 "\0x004%%!\0x00a/#copies %d def\0x00a" 
int PSC_C 1
str PSC_S 6 "10000"

proc PRT_COPY {
  % if 1 copy specified 
  if(PSC_C == 1) {
     printfile T300 NULL
  }
  if(PSC_C > 1) {
     strddd T80 PS_Copies PSC_C 0 0
     printfile T300 T80
  }
}

str PPSF_P 0 "          Print PostScript File\0x00a\0x00aEnter the name of the PostScript file and\0x00athe number of copies to print.\0x00a\0x00a  File  : " 
str PPSC_P 0 "  Copies: " 

list PPSF_LIST PATH PPSF_P T300 128
list PPSC_LIST NUM PPSC_P PSC_S PSC_C 9999 1

proc PPS {
  % default copies is 1
  PSC_C = 1
  % add *.ps to path
  strcpy T300 CURDIR
  strcat T300 WILDPS
  % prompt user and print file if not ESC
  if ((mvinput PPSF_LIST PPSC_LIST N/A N/A N/A) == OK) {
     PRT_COPY
     % separate path in to drive,dir,file,ext
     splitpath T300 CURDIR T512 T80 T10
     % catenate dir to drive
     strcat CURDIR T512
  }
}

%---- Print Files : Non PostScript File ----%
exec ASCIIPS "." "psprint.exe" "-a1" EXEPORT
%---- Print Files : PostScript Samples ----%
str PPSS_P 0 "      Print PostScript Samples\0x00a\0x00aEnter the number of copies to print.\0x00a\0x00a           Copies: " 
list PPSS_LIST NUM PPSS_P PSC_S PSC_C 9999 1

proc PSampl {
  PSC_C = 1
  %get sample file name
  if((dirbox EMPTY ".\\samples"  T300 WILDPS) == OK) {
     % get copy count
     if ((mvinput PPSS_LIST N/A N/A N/A N/A) == OK) {
        PRT_COPY
     }
  }
}

%---- Print Files : Status Page ----%
proc StatPg {
  printfile ".\\util\\status.prt" NULL
}
%---- Print Files : Adv. Status Page ----%
proc AStatPg {
  printfile ".\\util\\astat.prt" NULL
}

%---- Printer Options : Printer Identification ----%
#ifdef Q825.CFG
  str NEWNAME 32 "QMS-PS 825"
#else
  str NEWNAME 32 "QMS-PS 815"
#endif

str VPN_P1 0 " Change Name to '"
str VPN_P2 0 "' (Y/N): "
str BADCHRS 0 ":@"

%---- Printer Options : Printer Identification : Printer Name ----%
str CPN_P 0 "            Change Printer Name\0x00a\0x00aEnter a new printer name. The maximum length\0x00aof a name is 31 characters. All print type\0x00acharacters are valid except ':' and '@'.\0x00a\0x00a  New Name: "
str CPN_P2 0 "The printer name cannot contain ':' or '@'.\0x00aEnter another printer name.\0x00a\0x00a  New Name: "
list CPN_LIST ALPHA CPN_P NEWNAME 31
list CPN_LIST2 ALPHA CPN_P2 NEWNAME 31

str CPN_PS 0 "\0x00astatusdict begin (%s) dup 32 string printername ne {setprintername} {pop}ifelse end\0x004"

proc CPNAME {
  strcpy NEWNAME PNAME
  if ((mvinput CPN_LIST N/A N/A N/A N/A) == OK) {
     KEY = OK
     while ((strcom NEWNAME BADCHRS) && (KEY != ESC)) {
        beep
        KEY = (mvinput CPN_LIST2 N/A N/A N/A N/A)
     }

     if (KEY == OK) {
        if ((verify VPN_P1 NEWNAME VPN_P2 YES NO) == OK) {
           strsss T300 CPN_PS NEWNAME NULL NULL
           FPP512
           % if printed ok 
           if (PRTOK == OK) {
              strcpy PNAME NEWNAME
           }
        }

     }
  }
}

%---- Printer Options : Current Paper Source ----%
str MTE_PS 0 "\0x00astatusdict /manualfeed true put\0x004"
str MTD_PS 0 "\0x00astatusdict /manualfeed false put\0x00a"
str TRAY_PS 0 "\0x00astatusdict begin %d dup defaultpapertray ne {setdefaultpapertray} {pop}ifelse %d setpapertray end\0x004" 

%---- Printer Options : Current Paper Source : Tray Chaining ----%
str PTCH_P 0 "            Paper Tray Chaining\0x00a\0x00aThe standard and optional paper trays can be\0x00achained in order to allow printing to continue\0x00afrom a second tray when the current tray is\0x00aempty.\0x00a\0x00a       Enable Tray Chaining (Y/N): "
list PTCH_L SEL PTCH_P YES NO

str PTCH_PS 0 "\0x00astatusdict begin %s dup defaulttrayswitch ne {setdefaulttrayswitch} {pop}ifelse end\0x004"

proc PTCHAIN {
  KEY = (mvinput PTCH_L N/A N/A N/A N/A) 
  % if not ESC pressed 
  if (KEY != ESC) {
     % if Enable was pressed
     if (KEY == OK) {
        strsss T300 PTCH_PS TRUE NULL NULL
     }
     % if Disable was pressed
     if (KEY == ALT) {
        strsss T300 PTCH_PS FALSE NULL NULL
     }

     FPP512
  }
}

%---- Printer Options : Current Paper Source : Manual Tray ----%
proc MANUAL {
  strsss T512 SS EXSERV MTE_PS NULL
  if((printstr T512) == OK) {
     strcpy PTRAY MTRAY
  }
}

%---- Printer Options : Current Paper Source : Upper Tray ----%
%---- Printer Options : Current Paper Source : Tray Feed ----%
proc SUTRAY {
  strddd T300 TRAY_PS 2 2 0
  strsss T512 SSS EXSERV MTD_PS T300
  if((printstr T512) == OK) {
     strcpy PTRAY UTRAY
  }
}

%---- Printer Options : Current Paper Source : Lower Tray ----%
proc SLTRAY {
  strddd T300 TRAY_PS 1 1 0
  strsss T512 SSS  EXSERV MTD_PS T300
  if((printstr T512) == OK) {
     strcpy PTRAY LTRAY
  }
}

%---- Printer Options : Current Paper Source : Envelope Feed ----%
proc ENVLP {
  strddd T300 TRAY_PS 3 3 0
  strsss T512 SSS EXSERV MTD_PS T300
  if((printstr T512) == OK) {
     strcpy PTRAY ETRAY
  }
}

menu TRAYS "Paper Source" CPS_H 8 26
#ifdef Q825.CFG
  opt TRAYS SUTRAY UT_H " ~Upper Tray"
  opt TRAYS SLTRAY LT_H " ~Lower Tray"
  opt TRAYS PTCHAIN TC_H " Tray ~Chaining "
#else
  opt TRAYS SUTRAY TF_H " ~Tray Feed"
#endif
  opt TRAYS MANUAL MF_H " ~Manual Feed"
#ifdef ENV_TRAY
  opt TRAYS ENVLP EF_H " ~Envelope Feed"
#endif

proc GETTRAY {
  popup TRAYS
  NEWSTATUS
  savestr &PTRAY PTRAY
}

%---- Printer Options : Current Emulation ----%
str ESCPS_PS 0 "\0x01b\0x07f0\0x004"
str EMUL_PS 0 "\0x00astatusdict begin %d setsoftwareiomode end\0x004"

proc SETUS {
  strddd T300 EMUL_PS 0 0 0
  strsss T512 SSS ESCPS_PS EXSERV T300
  if((printstr T512) == OK) {
     strcpy PEMUL PSCRPT
  }
}
proc SETHPPCL {
  strddd T300 EMUL_PS 5 0 0
  strsss T512 SSS ESCPS_PS EXSERV T300
  if((printstr T512) == OK) {
     strcpy PEMUL HPPCL
  }
}
proc SETHPGL {
  strddd T300 EMUL_PS 4 0 0
  strsss T512 SSS ESCPS_PS EXSERV T300
  if((printstr T512) == OK) {
     strcpy PEMUL HPGL
  }
}
proc SETANSI {
  strddd T300 EMUL_PS 10 0 0
  strsss T512 SSS ESCPS_PS EXSERV T300
  if((printstr T512) == OK) {
     strcpy PEMUL ANSI
  }
}
proc SETDBLO {
  strddd T300 EMUL_PS 2 0 0
  strsss T512 SSS ESCPS_PS EXSERV T300
  if((printstr T512) == OK) {
     strcpy PEMUL DIABLO
  }
}
proc SETIPRO {
  strddd T300 EMUL_PS 1 0 0
  strsss T512 SSS ESCPS_PS EXSERV T300
  if((printstr T512) == OK) {
     strcpy PEMUL IBMPRO
  }
}
proc SETFX80 {
  strddd T300 EMUL_PS 9 0 0
  strsss T512 SSS ESCPS_PS EXSERV T300
  if((printstr T512) == OK) {
     strcpy PEMUL FX80
  }
}
proc SETLN03 {
  strddd T300 EMUL_PS 12 0 0
  strsss T512 SSS ESCPS_PS EXSERV T300
  if((printstr T512) == OK) {
     strcpy PEMUL LN03
  }
}
proc SETAUTO {
  strddd T300 EMUL_PS 200 0 0
  strsss T512 SSS ESCPS_PS EXSERV T300
  if((printstr T512) == OK) {
     strcpy PEMUL AUTOSW
  }
}

menu EMULS "Emulations" CE_H 8 26
  opt EMULS SETAUTO AS_H " ~ESP"
  opt EMULS SETUS PSE_H " ~PostScript"
  opt EMULS SETHPPCL PCL_H " ~HPPCL"
  opt EMULS SETHPGL PGL_H " HP~GL"
  opt EMULS SETLN03 LN03_H " ~LN03"
  opt EMULS SETIPRO IPRO_H " P~roprinter"
  opt EMULS SETFX80 FX80_H " ~FX-80"
  opt EMULS SETDBLO DBLO_H " ~Diablo"
  opt EMULS SETANSI ANSI_H " ~ANSI"

proc GETEMUL {
  popup EMULS
  NEWSTATUS
  savestr &PEMUL PEMUL
}

%---- Printer Options : Printer Buffer Sizes ----%
int FCSIZE 150
str FCS_S 5 "2000"
str FCS_P 0 "              Font Cache Size\0x00a\0x00aThe printer font cache may be set to any size\0x00aup to the amount of available virtual memory.\0x00a\0x00a   Enter a new size in Kilobytes: "

list FCS_L NUM FCS_P FCS_S FCSIZE 2000 50

str FCS_PS 0 "\0x00astatusdict begin /freq %d 1024 mul def getallfontcachesizes exch pop /fcur exch def /fmax exch def /fmin exch def freq fcur ne {freq fmax gt {/freq fmax def}if freq fmin lt {/freq fmin def}if freq setfontcachesize}if end\0x004"

proc SETFCS {
  if ((mvinput FCS_L N/A N/A N/A N/A) == OK) {
     strddd T300 FCS_PS FCSIZE 0 0
     FPP512
     PU_MSG
  }
}

int HISIZE 8
str HIS_S 5 "2000"
str HIS_P 0 "          Host Input Buffer Size\0x00a\0x00aThe printer host input buffer may be set to\0x00aany size up to the amount of available vir-\0x00atual memory.\0x00a\0x00a   Enter a new size in Kilobytes: "

list HIS_L NUM HIS_P HIS_S HISIZE 2000 4

str HIS_S_PS 0 "\0x00astatusdict begin /freq %d 1024 mul def getallserialbuffersizes exch pop /fcur exch def /fmax exch def /fmin exch def freq fcur ne {freq fmax gt {/freq fmax def}if freq fmin lt {/freq fmin def}if freq setserialbuffersize}if end\0x004"
str HIS_P_PS 0 "\0x00astatusdict begin /freq %d 1024 mul def getallparallelbuffersizes exch pop /fcur exch def /fmax exch def /fmin exch def freq fcur ne {freq fmax gt {/freq fmax def}if freq fmin lt {/freq fmin def}if freq setparallelbuffersize}if end\0x004"

proc SETHIS {
  if ((mvinput HIS_L N/A N/A N/A N/A) == OK) {
     % serial interface
     if SERIAL {
        strddd T300 HIS_S_PS HISIZE 0 0
     }
     % parallel interface
     if (! SERIAL) {
        strddd T300 HIS_P_PS HISIZE 0 0
     }

     FPP512
     PU_MSG
  }
}

menu BUFFS "Printer Buffers" PBS_H 8 26
  opt BUFFS SETFCS FCS_H " ~Font Cache"
  opt BUFFS SETHIS HIS_H " ~Host Input"

proc SETBUFS {
  popup BUFFS
}

%---- Printer Options : Default Timeouts ----%
int JTO_T 0
int MTO_T 60
int WTO_T 30
int ETO_T 5
int ATO_T 3

str JTO_S 7 ""
str MTO_S 7 ""
str WTO_S 7 ""
str ETO_S 7 ""
str ATO_S 7 ""

str PTO_JP 0 "               Set Printer Timeouts\0x00a\0x00aEnter a value in seconds for the printer's job,\0x00amanual feed, PostScript wait, emulations wait, and\0x00aESP wait timeouts. A value of zero indicates no\0x00atimeout.\0x00a\0x00a              Print Job Timeout: "
str PTO_MP 0 "\0x00a             Manual Feed Timeout: "
str PTO_HP 0 "\0x00a           PostScript Wait Timeout: "
str PTO_EP 0 "\0x00a           Emulations Wait Timeout: "
str PTO_AP 0 "\0x00a              ESP Wait Timeout: "

list PTO_JL NUM PTO_JP JTO_S JTO_T 9999 0
list PTO_ML NUM PTO_MP MTO_S MTO_T 9999 0
list PTO_HL NUM PTO_HP WTO_S WTO_T 9999 0
list PTO_EL NUM PTO_EP ETO_S ETO_T 9999 0
list PTO_AL NUM PTO_AP ATO_S ATO_T 9999 0

str PTO_PS 0 "\0x00astatusdict begin %d %d %d setdefaulttimeouts\0x00a"
str PTO_EPS 0 "\0x00a %d setemulationwaittimeout %d setesptimeout end\0x004"

proc SETPTO {
  JTO_T = JTO
  MTO_T = MTO
  WTO_T = WTO
  ETO_T = ETO
  ATO_T = ATO

  KEY = (mvinput PTO_JL PTO_ML PTO_HL PTO_EL PTO_AL) 
  if (KEY == OK) {
     strddd T300 PTO_PS JTO_T MTO_T WTO_T
     strddd T80 PTO_EPS ETO_T ATO_T 0
     strcat T300 T80
     FPP512
     % if printed ok 
     if (PRTOK == OK) {
        JTO = JTO_T
        MTO = MTO_T
        WTO = WTO_T
        ETO = ETO_T
        ATO = ATO_T
        strddd PTO_S "%d %d %d" JTO MTO WTO
        strsss T80 "%s %s %s" PTO_S ETO_S ATO_S
        strcpy PTO_S T80
        NEWSTATUS
        savestr &PTO_S PTO_S
        saveint &JTO JTO
        saveint &MTO MTO
        saveint &WTO WTO
        saveint &ETO ETO
        saveint &ATO ATO
     }
  }

  if ((KEY != OK) || (PRTOK != OK)) {
     JTO_T = JTO
     MTO_T = MTO
     WTO_T = WTO
     ETO_T = ETO
     ATO_T = ATO
  }
}

%---- Printer Options : Start-Up Page ----%
proc POTP_D {
  % if printed ok
  if((printfile ".\\util\\startup.off" NULL) == OK) {
     strcpy POTP_S DISAB
  }
}
proc POTP_E {
  % if printed ok
  if((printfile ".\\util\\startup.on" NULL) == OK) {
     strcpy POTP_S ENAB
  }
}

menu POTPAGE "Start-Up Page" POTP_H 8 26
  opt POTPAGE POTP_E NONE " ~Enable"
  opt POTPAGE POTP_D NONE " ~Disable"

proc SETPOTP {
  popup POTPAGE
  NEWSTATUS
  savestr &POTP_S POTP_S
}

%---- Special : Download Typefaces ----%
exec FONTDL "." "psfont.exe" "-c0" "-a1" EXEPORT 

%---- Special : Align Printer Margins ----%
int INCR 0
int VERT 0
int HORZ 0

str HASH 0 "H"
str DOTS 0 "D"
str VERT_S 5 ""
str HORZ_S 5 ""

str AP_P 0 "                  Align Margins\0x00a\0x00aThe page being printed should have two lines that\0x00aintersect two inches from the bottom and two inches\0x00afrom the left side of the page.\0x00a\0x00a     Are the measurements correct (Y/N): "   
str AP_P2 0 "                  Align Margins\0x00a\0x00aThe printer alignment may be changed in 1/16 inch\0x00a(hash marks) or 1/300 inch (dots) increments.\0x00a \0x00a     Changes in [H]ash marks or [D]ots: "

str AP_PHH 0 " Horizontal offset in hash marks: "
str AP_PHV 0 " Vertical offset in hash marks: "
str AP_PDH 0 " Horizontal offset in dots: "
str AP_PDV 0 " Vertical offset in dots: "

list AP_L SEL AP_P YES NO
list AP_L2 SEL AP_P2 HASH DOTS
% hash marks
list AP_LHH NUM AP_PHH HORZ_S HORZ 8 -8 
list AP_LHV NUM AP_PHV VERT_S VERT 8 -8
% dots
list AP_LDH NUM AP_PDH HORZ_S HORZ 150 -150
list AP_LDV NUM AP_PDV VERT_S VERT 150 -150

str AP_PS 0 "\0x00astatusdict begin margins exch %d sub exch %d add setmargins end\0x004"

proc ALIGN {
  INCR = (printfile ".\\util\\align.prt" NULL)
  if (INCR == OK) {
     KEY = (mvinput AP_L N/A N/A N/A N/A) 
     % while margins not correct and printed ok and esc not pressed
     while ( (KEY == ALT) && (INCR == OK) ) { 
        HORZ = 0
        VERT = 0
        % get increment type
        INCR = (mvinput AP_L2 N/A N/A N/A N/A)
        if (INCR != ESC) {
           % if hash marks
           if (INCR == OK) {
              KEY = (mvinput AP_LHH AP_LHV N/A N/A N/A)
              % calc vert and horz value
              HORZ = (HORZ * 19)
              VERT = (VERT * 19)
           }

           % if dots
           if (INCR == ALT) {
              KEY = (mvinput AP_LDH AP_LDV N/A N/A N/A)
              % calc vert and horz value
           }

           % if ESC not pressed
           if (KEY != ESC) {
              % alignment string
              strddd T300 AP_PS VERT HORZ 0
              FPP512
              INCR = (printfile ".\\util\\align.prt" NULL)
              KEY = (mvinput AP_L N/A N/A N/A N/A) 
           }

        }
     }
  }
}

%---- Special : Install Error Handler ----%
proc ErrHdl {
  printfile ".\\util\\error.hdl" NULL
}
%---- Special : Eject PostScript Page ----%
proc PShwpge {
  printstr "\0x00a%!\0x00ashowpage\0x00a"
}
%---- Special : End PostScript Job ----%
proc ECJ {
  printstr CTRLD
}
%---- Special : Reset Default Parameters ----%
str RDP_P 0 "          Reset Default Parameters\0x00a\0x00aAll configurable printer options can be reset\0x00ato factory default.\0x00a\0x00a           Reset Options (Y/N): "
list RDPLIST SEL RDP_P NO YES

str RDP_PS 0 "\0x00astatusdict begin 2 setpapertray 2 defaultpapertray ne {2 setdefaultpapertray}if resettodefaults end\0x004"

proc RDPARMS {
  if((mvinput RDPLIST N/A N/A N/A N/A) == ALT) {
     strsss T512 SS EXSERV RDP_PS NULL
     if((printstr T512) == OK) {
        % set all parameters that are shown on statbox
        strcpy PEMUL AUTOSW
        JTO = 0
        MTO = 60
        WTO = 30
        ETO = 5
        ATO = 3
        strcpy PTO_S "0 60 30 5 3"
        strcpy PTRAY UTRAY
        strcpy POTP_S ENAB
        NEWSTATUS
        % save all config file values
        savestr &PEMUL PEMUL
        savestr &PTO_S PTO_S
        saveint &JTO JTO
        saveint &MTO MTO
        saveint &WTO WTO
        saveint &ETO ETO
        saveint &ATO ATO
        savestr &PTRAY PTRAY
        savestr &POTP_S POTP_S

        PU_MSG
     }
  }
}

%---- Special : Temporary Exit To DOS ----%
% exec DOS "." "command.com" 

%---- Special : Exit Utilities ----%
proc CEXIT {
  exit
}

%---- pull downs ----%
menu COMM "~Communication" COM_H 8 26
  opt COMM GETPRINTER PTYPE_H "Printer ~Type"
#ifdef Q825.CFG
  opt COMM GETPACC PACC_H "Printer ~Accessories"
#endif
  opt COMM GETPSOPTS PPS_H "Printer ~Port Setup"
  opt COMM GETHOSTOPTS HPS_H "~Host Port Setup"

menu FILES "~Print Files"  PF_H  8 26
  opt FILES PPS PSF_H "~PostScript File"
  opt FILES ASCIIPS NPS_H "~Non PostScript File"
  opt FILES PSampl PSS_H "PostScript ~Samples"
  opt FILES StatPg SPF_H "S~tatus Page"
  opt FILES AStatPg ASP_H "~Adv. Status Page"

menu OPTIONS "Printer ~Options" PO_H 8 26
  opt OPTIONS CPNAME PID_H "Current Printer ~Name"
  opt OPTIONS GETTRAY CPS_H "Current ~Paper Source"
  opt OPTIONS GETEMUL CE_H "Current ~Emulation"
  opt OPTIONS SETBUFS PBS_H "Printer ~Buffer Sizes"
  opt OPTIONS SETPTO PTO_H "Default ~Timeouts"
  opt OPTIONS SETPOTP POTP_H "~Start-Up Page"

menu SPECIAL "~Special" SPC_H 8 26
  opt SPECIAL FONTDL DT_H "Download ~Typefaces"
  opt SPECIAL ALIGN APM_H "Align Printer ~Margins"
  opt SPECIAL ERRHDL IEH_H "Install Error ~Handler"
  opt SPECIAL PSHWPGE EPP_H "~Eject PostScript Page"
  opt SPECIAL ECJ EPJ_H "E~nd PostScript Job"
  opt SPECIAL RDPARMS RDP_H "~Reset Default Parameters"
% opt SPECIAL DOS NONE "Temporary Exit to ~DOS"
  opt SPECIAL CEXIT EX_H "E~xit Utilities"

%---- main ----%
wmenu WMAIN "       "
addmenu WMAIN COMM
addmenu WMAIN FILES
addmenu WMAIN OPTIONS
addmenu WMAIN SPECIAL

proc MWINDOW begin
  % init. either the host serial or parallel port
  if SERIAL {
     setser (setport HPORT) HBAUD HPARITY HDBITS HSBITS
  }
  if (! SERIAL) {
     setport HPORT
  }

  % init. -d[port] string for use with executables
  strsss EXEPORT D_OPT HPORT NULL NULL

  % get user's path at program invocation
  strcpy CURDIR (userpath)
  % display information box as backdrop
  STATUS
  % execute window application
  window WMAIN
end

main MWINDOW

stop

Download Driver Pack

How To Update Drivers Manually

After your driver has been downloaded, follow these simple steps to install it.

  • Expand the archive file (if the download file is in zip or rar format).

  • If the expanded file has an .exe extension, double click it and follow the installation instructions.

  • Otherwise, open Device Manager by right-clicking the Start menu and selecting Device Manager.

  • Find the device and model you want to update in the device list.

  • Double-click on it to open the Properties dialog box.

  • From the Properties dialog box, select the Driver tab.

  • Click the Update Driver button, then follow the instructions.

Very important: You must reboot your system to ensure that any driver updates have taken effect.

For more help, visit our Driver Support section for step-by-step videos on how to install drivers for every file type.

server: web2, load: 1.13