Q1700.INI Driver File Contents (psexec14.exe)

%---- Persistent variables set by installation programs ----%
%%<i>Q1700.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>OPT_DISK    - optional printer disk installed flag (1,0)
%%<i>ENV_TRAY    - optional envelope feeder installed flag (1,0)
%%<i>OPT_DPLX    - optional duplex unit installed flag (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 input paper tray (upper,lower,envelope feeder)
%%<s>OPTRAY      - current output paper tray (upper,back)
%%<s>POTP_S      - start page status (enabled,disabled)
%%<s>PTO_S       - timeouts (0 0 30 5 3)
%%<i>JTO         - job timeout (0)
%%<i>STO         - spool timeout (0)
%%<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 9 66
"
 'Printer Options' offers selections for Current Printer Name,
 Current Paper Handling, Current Emulation, Default Timeouts,
 and Start-Up Page enabling or disabling. See the help window
 of each function for more information.  

                   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 Handling
help PH_H 8 66
"
 'Current Paper Handling' allows you to select the input paper
 tray, output paper tray, tray chaining, duplex printing, and
 tumble printing.

                   Press <ESC> to exit help."

% Input Tray
help PHI_H 9 66
"
 'Input Tray' determines the source of paper, either upper
 tray, lower tray, or envelope feeder if installed. The 
 selected tray becomes the default tray and remains so even
 after power is turned off.

                   Press <ESC> to exit help."

% Output Tray
help PHO_H 9 66
"
 'Output Tray' determines the destination of paper after print-
 ing, either upper output tray or back output tray. The select-
 ed tray becomes the default tray and remains so even after 
 power is turned off.

                   Press <ESC> to exit help."

% Tray Chaining
help PHC_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."

% Simplex Mode
help PHS_H 8 66
"
 When enabled, simplex mode limits printing to a single side of
 the paper. Simplex printing becomes the default and remains so
 even if the power is turned off until you change it.

                   Press <ESC> to exit help."

% Duplex Mode
help PHD_H 9 66
"
 When enabled, duplex mode allows you to print on both sides of
 the paper. Duplex printing becomes the default and remains so
 even if the power is turned off until you change it. The 
 optional duplexing unit must be installed to use this option.

                   Press <ESC> to exit help."


% Tumble Mode
help PHT_H 10 66
"
 When enabled, tumble mode provides duplex printing where the
 bottom edge of the front page is the top edge of the back
 page. Tumble printing becomes the default and remains so even
 if the power is turned off until you change it. The optional
 duplexing unit must be installed to use this option.

                   Press <ESC> to exit help."

% Offset Stacking
help PHF_H 10 66
"
 When enabled, this option provides offset stacking of each
 print job in the printer output tray. Offset stacking becomes
 the default and remains so even if the power is turned off
 until you change it. Only the upper and lower output trays are
 capable of offset stacking.

                   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), Hexdump, 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 8 66
"
 'HPGL' activates the printer's HP 7550A plotter (HPGL) emula-
 tion. PostScript batch mode selection deactivates this emula-
 tion. 

                   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."
% Hexdump
help HEX_H 9 66
"
 'Hexdump' activates the printer's hexdump mode which prints
 the hexadecimal representation of all data received by the
 printer. 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 Resolution
help RES_H 8 66
"
 'Printer Resolution' allows you to select the resolution of
 printer output. Available resolutions are 300 and 600 dots
 per inch.

                   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, Spool Wait, 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. Spool
 Wait Timeout is the maximum time between characters received
 on the communication channel for any print job. 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."
% Printer Disk
help PD_H 8 66
"
 'Printer Disk' offers selections for initializing, parking,
 and performing various file operations on the printer's
 optional hard disk.

                   Press <ESC> to exit help."

% Format Disk
help PDF_H 10 66
"
 'Format Disk' allows you to initialize a single printer hard
 disk or all printer hard disks. The format operation erases
 all data on the selected hard disk. Before selecting a disk
 for formatting, verify the SCSI I.D. of the desired disk or 
 remove all other disks from the printer.

                   Press <ESC> to exit help."

% Park Disk
help PDP_H 8 66
"
 'Park Disk' allows you to park the disk heads on all attached
 printer hard disks.  After parking, turn off the printer power
 before handling the hard disks.

                   Press <ESC> to exit help."

% Delete Disk File
help PDD_H 12 66
"
 'Delete Disk File' allows you to delete the specified file
 from the specified printer hard disk. 

 A printer filename contains an optional disk name. The file-
 name '%disk2%myfile' refers to the file 'myfile' on the hard
 disk at SCSI I.D. 2. If no disk is specified, all disks are
 searched for the specified file.   

                   Press <ESC> to exit help."

% Rename Disk File
help PDR_H 12 66
"
 'Rename Disk File' allows you to rename a printer hard disk
 file.

 A printer filename contains an optional disk name. The file-
 name '%disk2%myfile' refers to the file 'myfile' on the hard
 disk at SCSI I.D. 2. If no disk is specified, all disks are
 searched for the specified file.   

                   Press <ESC> to exit help."

% Copy Disk File
help PDCP_H 13 66
"
 'Copy Disk File' allows you to copy from one printer hard disk
 file to another. If the destination file does not exist, it is
 created.

 A printer filename contains an optional disk name. The file-
 name '%disk2%myfile' refers to the file 'myfile' on the hard
 disk at SCSI I.D. 2. If no disk is specified, all disks are
 searched for the specified file.   

                   Press <ESC> to exit help."

% Run Disk File
help PDRN_H 12 66
"
 'Run Disk File' allows you to execute a file on the printer
 hard disk.

 A printer filename contains an optional disk name. The file-
 name '%disk2%myfile' refers to the file 'myfile' on the hard
 disk at SCSI I.D. 2. If no disk is specified, all disks are
 searched for the specified file.   

                   Press <ESC> to exit help."

% Save File to Disk
help PDS_H 14 66
"
 'Save File to Disk' allows you to copy a host file specified
 by a DOS filename to a printer hard disk file specified by a
 printer filename. If the destination file does not exist, it
 is created.

 A printer filename contains an optional disk name. The file-
 name '%disk2%myfile' refers to the file 'myfile' on the hard
 disk at SCSI I.D. 2. If no disk is specified, all disks are
 searched for the specified file.   

                   Press <ESC> to exit help."

% List Disk Files
help PDL_H 11 66
"
 'List Disk Files' prints a catalog of all files contained on
 all attached printer hard disks.

 A printer filename contains an optional disk name. The file-
 name '%disk2%myfile' refers to the file 'myfile' on the hard
 disk at SCSI I.D. 2.

                   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 PostScriptPage' 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 Q1700.CFG 1 KEEP
str CFG_FILE 13 "q1700.cfg" KEEP
str INI_FILE 13 "q1700.ini" KEEP
str PTYPE 32 "QMS-PS 1700" 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
str PTRAY 16 "Upper Tray" KEEP
str OPTRAY 16 "Upper Tray" KEEP

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

int ENV_TRAY 1 KEEP
int OPT_DISK 1 KEEP
int OPT_DPLX 1 KEEP

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

int JTO 0 KEEP
int STO 0 KEEP
int WTO 30 KEEP
int ETO 5 KEEP
int ATO 3 KEEP

%---- non-persistent variables ----%
int OK 0
int ESC 1
int MENU_ESC 3
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"

str PBAUD 6 "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"

str PNAME 32 "QMS-PS 1700"
str UTRAY 0 "Upper Tray"
str LTRAY 0 "Lower Tray"
str ETRAY 0 "Envelope Feeder"
str BTRAY 0 "Back Tray"

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 HEXDMP 0 "Hexdump"

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\0x00aInput Tray     : %s\0x00aOutput Tray    : %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 OPTRAY POTP_S

str STBOX_PP 0 "Printer        : %s\0x00aEmulation      : %s\0x00aHost Interface : %s:\0x00aTimeouts       : %s\0x00aInput Tray     : %s\0x00aOutput Tray    : %s\0x00aStart-Up Page  : %s\0x00a\0x00a   <ESC> to Cancel      <F1> for Help"
list STBOX_PL PTYPE PEMUL HPORT PTO_S PTRAY OPTRAY 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_q815 0 "q815.ini"
str ini_q815mr 0 "q815mr.ini"

proc PS410 {
  SPC_MB
  restart psx_exe INI_FILE "q410.ini" CFG_FILE "q410.cfg"
}
proc PS815 {
  SPC_MB
  restart psx_exe INI_FILE ini_q815 CFG_FILE "q815.cfg"
}
proc PS825 {
  SPC_MB
  restart psx_exe INI_FILE ini_q815 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 INI_FILE CFG_FILE "q1700.cfg"
}
proc PS2000 {
  SPC_MB
  restart psx_exe INI_FILE "q2000.ini" CFG_FILE "q2000.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 0x0c00
%---- Communication : Printer Port Setup : Baud Rate ----%
proc PB3 {
  strcpy PBAUD "300"
}
proc PB6 {
  strcpy PBAUD "600"
}
proc PB12 {
  strcpy PBAUD "1200"
}
proc PB24 {
  strcpy PBAUD "2400"
}
proc PB48 {
  strcpy PBAUD "4800"
}
proc PB96 {
  strcpy PBAUD "9600"
}
proc PB192 {
  strcpy PBAUD "19200"
}
proc PB384 {
  strcpy PBAUD "38400"
}

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"
  opt PBAUDS PB384 NONE " ~H...38400"

proc GETPBAUD {
  popup PBAUDS
}

%---- Communication : Printer Port Setup : Parity ----%
proc SETPIGN {
  strcpy PPARITY I
  bits SCCVAL 0xfff7 0x08
}
proc SETPEVEN {
  strcpy PPARITY E
  bits SCCVAL 0xfff0 0x04
}
proc SETPODD {
  bits SCCVAL 0xfff0 0x03
  strcpy PPARITY O
}
proc SETPNONE {
  strcpy PPARITY N
  bits SCCVAL 0xfff0 0x00
}

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 0xcfff 0x00
}
proc SETP7B {
  PDBITS = 7
  bits SCCVAL 0xcfff 0x1000
}

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 0x3fff 0x00
}
proc SETP2SB {
  PSBITS = 2
  bits SCCVAL 0x3fff 0x4000
}

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 0xf00f 0x0c00
}
proc SETPXON {
  strcpy PPROTO XON
  bits SCCVAL 0xf00f 0x0090
}
proc SETPXD {
  strcpy PPROTO XON-D
  bits SCCVAL 0xf00f 0x0c10
}

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     :  %s\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 

% the %%d in SPSP_PS allows the string to be formatted with sprintf twice
str SPSP_PS 0 "\0x00astatusdict begin 25 %s %%d setsccbatch end\0x004" 

proc SETPSPORT {
  if ((mvinput SPSP_L N/A N/A N/A N/A) == ALT) {
     strsss T80 SPSP_PS PBAUD NULL NULL
     strddd T300 T80 SCCVAL 0 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"
  opt PRTTYPES PS815 PTYPE_H " QMS-PS 8~15"
  opt PRTTYPES PS825 PTYPE_H " QMS-PS ~825"
  opt PRTTYPES PS815MR PTYPE_H " QMS-PS 815 ~MR"
  opt PRTTYPES PS825MR PTYPE_H " QMS-PS 825 M~R"
  opt PRTTYPES PS2000 PTYPE_H " QMS-PS ~2000"

proc GETPRINTER {
  popup PRTTYPES
}

%---- Communication : Printer Accessories ----%
#ifdef OPT_DISK
  str PACC_HR 0 "Y"
#else
  str PACC_HR 0 "N"
#endif

#ifdef ENV_TRAY
  str PACC_TR 0 "Y"
#else
  str PACC_TR 0 "N"
#endif

#ifdef OPT_DPLX
  str PACC_DR 0 "Y"
#else
  str PACC_DR 0 "N"
#endif

str INST_R 0 "Y"
int INST_V 1

proc S_INST {
  strcpy INST_R YES
  INST_V = 1
}
proc S_NINST {
  strcpy INST_R NO
  INST_V = 0
}
menu PACC_T "Accessory Control" PACC_H 8 45
  opt PACC_T S_INST NONE " ~Installed"
  opt PACC_T S_NINST NONE " ~Not Installed "

proc SET_HD {
  if ((popup PACC_T) != MENU_ESC) {
     OPT_DISK = INST_V
     strcpy PACC_HR INST_R
  }
}
proc SET_EF {
  if ((popup PACC_T) != MENU_ESC) {
     ENV_TRAY = INST_V
     strcpy PACC_TR INST_R
  }
}
proc SET_DX {
  if ((popup PACC_T) != MENU_ESC) {
     OPT_DPLX = INST_V
     strcpy PACC_DR INST_R
  }
}

str PACC_P 0 "   Current Accessory Selections\0x00a\0x00a Printer Hard Disk.  Installed? : %s \0x00a Envelope Feeder.    Installed? : %s \0x00a Duplexing Unit.     Installed? : %s \0x00a\0x00a    Set Program Support (Y/N): "

list PACC_L SEL PACC_P NO YES PACC_HR PACC_TR PACC_DR

proc SET_ACC {
  if ((mvinput PACC_L N/A N/A N/A N/A) == ALT) {
     saveint &OPT_DISK OPT_DISK
     saveint &ENV_TRAY ENV_TRAY
     saveint &OPT_DPLX OPT_DPLX

     % if optional tray is not installed
     if(ENV_TRAY == 0) {
       % if optional tray is current
       if(! (strcmp PTRAY ETRAY) ) {
         strcpy PTRAY UTRAY
         savestr &PTRAY PTRAY
       }
     }
     PS1700
  }
}

menu PACC_M "Printer Accessories" PACC_H 8 18 HOLD
  opt PACC_M SET_HD NONE " Printer ~Hard Disk "
  opt PACC_M SET_EF NONE " ~Envelope Feeder"
  opt PACC_M SET_DX NONE " ~Duplexing Unit"
  opt PACC_M SET_ACC NONE " ~Set Accessories"

proc GETPACC {
  popup PACC_M
}

%---- 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 ----%
str NEWNAME 32 "QMS-PS 1700"
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 Handling ----%
str TRAY_PS 0 "\0x00astatusdict begin %d dup defaultpapertray ne {setdefaultpapertray} {pop}ifelse %d setpapertray end\0x004" 
str OTRAY_PS 0 "\0x00astatusdict begin %d dup defaultoutputtray ne {setdefaultoutputtray} {pop}ifelse %d setoutputtray end\0x004" 

%---- Printer Options : Current Paper Handling : Upper Tray ----%
proc SUTRAY {
  strddd T300 TRAY_PS 1 1 0
  FPP512
  if(PRTOK == OK) {
     strcpy PTRAY UTRAY
  }
}

%---- Printer Options : Current Paper Handling : Lower Tray ----%
proc SLTRAY {
  strddd T300 TRAY_PS 2 2 0
  FPP512
  if(PRTOK == OK) {
     strcpy PTRAY LTRAY
  }
}

%---- Printer Options : Current Paper Handling : Envelope Feeder ----%
proc SETRAY {
  strddd T300 TRAY_PS 3 3 0
  FPP512
  if(PRTOK == OK) {
     strcpy PTRAY ETRAY
  }
}

menu ITRAYS "Input Tray" PHI_H 8 44
  opt ITRAYS SUTRAY NONE " ~Upper Tray"
  opt ITRAYS SLTRAY NONE " ~Lower Tray"
#ifdef ENV_TRAY
  opt ITRAYS SETRAY NONE " ~Envelope Feeder "
#endif

proc SITRAY {
  popup ITRAYS
  NEWSTATUS
  savestr &PTRAY PTRAY
}

%---- Printer Options : Current Paper Handling : Output Tray ----%
proc SUOTRAY {
  strddd T300 OTRAY_PS 1 1 0
  FPP512
  if(PRTOK == OK) {
     strcpy OPTRAY UTRAY
  }
}
proc SBOTRAY {
  strddd T300 OTRAY_PS 2 2 0
  FPP512
  if(PRTOK == OK) {
     strcpy OPTRAY BTRAY
  }
}

menu OTRAYS "Output Tray" PHO_H 8 44
  opt OTRAYS SUOTRAY NONE " ~Upper Tray "
  opt OTRAYS SBOTRAY NONE " ~Back Tray"

proc SOTRAY {
  popup OTRAYS
  NEWSTATUS
  savestr &OPTRAY OPTRAY
}


%---- Printer Options : Current Paper Handling : Chain/Offset/Duplex/Tumble ----%
str TGL_V 0 "false"

proc SENBLE {
  strcpy TGL_V TRUE
}
proc SDSBLE {
  strcpy TGL_V FALSE
}
menu TGLE "Feature Control" NONE 8 44
  opt TGLE SENBLE NONE " ~Enable"
  opt TGLE SDSBLE NONE " ~Disable "

str PTCH_PS 0 "\0x00astatusdict begin %s dup defaulttrayswitch ne {setdefaulttrayswitch} {pop}ifelse end\0x004"
proc SPTCHN {
  if ((popup TGLE) != MENU_ESC) {
     strsss T300 PTCH_PS TGL_V NULL NULL
     FPP512
  }
}
str OFFST_PS 0 "\0x00astatusdict begin %s dup defaultoutputpositioning ne {setdefaultoutputpositioning} {pop}ifelse end\0x004"
proc SOFFSET {
  if ((popup TGLE) != MENU_ESC) {
     strsss T300 OFFST_PS TGL_V NULL NULL
     FPP512
  }
}

str DPLX_PS 0 "\0x00astatusdict begin %s dup defaultduplexmode ne {setdefaultduplexmode} {pop}ifelse %s dup defaulttumble ne {setdefaulttumble} {pop}ifelse  end\0x004"
proc SSPLX {
  strsss T300 DPLX_PS FALSE FALSE NULL
  FPP512
}
proc SDPLX {
  strsss T300 DPLX_PS TRUE FALSE NULL
  FPP512
}
proc STMBL {
  strsss T300 DPLX_PS TRUE TRUE NULL
  FPP512
}

menu PHNDLG "Paper Handling" PH_H 8 19 HOLD
  opt PHNDLG SITRAY PHI_H " ~Input Tray"
  opt PHNDLG SOTRAY PHO_H " ~Output Tray"
  opt PHNDLG SPTCHN PHC_H " Tray ~Chaining"
%  opt PHNDLG SOFFSET PHF_H " O~ffset Stacking "
#ifdef OPT_DPLX
  opt PHNDLG SSPLX PHS_H " ~Simplex Mode"
  opt PHNDLG SDPLX PHD_H " ~Duplex Mode"
  opt PHNDLG STMBL PHT_H " ~Tumble Mode"
#endif

proc SPHNDLG {
  popup PHNDLG
  NEWSTATUS
}

%---- 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 SETHEX {
  strddd T300 EMUL_PS 6 0 0
  strsss T512 SSS ESCPS_PS EXSERV T300
  if((printstr T512) == OK) {
     strcpy PEMUL HEXDMP
  }
}
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"
  opt EMULS SETHEX HEX_H " He~xdump"

proc GETEMUL {
  popup EMULS
  NEWSTATUS
  savestr &PEMUL PEMUL
}

%---- Printer Options : Printer Resolution ----%
str RESOL_PS 0 "\0x00astatusdict begin %d dup defaultresolution ne {setdefaultresolution} {pop}ifelse end\0x004" 

proc SET300R {
  strddd T300 RESOL_PS 300 0 0
  FPP512
}
proc SET600R {
  strddd T300 RESOL_PS 600 0 0
  FPP512
}

menu RESOL "Resolution" RES_H 9 26
  opt RESOL SET300R RES_H " ~300 dpi"
  opt RESOL SET600R RES_H " ~600 dpi"

proc GETRES {
  popup RESOL
}

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

str JTO_S 7 ""
str STO_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,\0x00aspool wait, 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             Spool Wait 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 STO_S STO_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 0 %d setdefaulttimeouts\0x00a"
str PTO_EPS 0 "\0x00a %d setspooltimeout %d setemulationwaittimeout %d setesptimeout end\0x004"

proc SETPTO {
  JTO_T = JTO
  STO_T = STO
  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 WTO_T 0
     strddd T80 PTO_EPS STO_T ETO_T ATO_T
     strcat T300 T80
     FPP512
     % if printed ok 
     if (PRTOK == OK) {
        JTO = JTO_T
        STO = STO_T
        WTO = WTO_T
        ETO = ETO_T
        ATO = ATO_T
        strddd PTO_S "%d %d %d" JTO STO 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 &STO STO
        saveint &WTO WTO
        saveint &ETO ETO
        saveint &ATO ATO
     }
  }

  if ((KEY != OK) || (PRTOK != OK)) {
     JTO_T = JTO
     STO_T = STO
     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
}

%---- Printer Disk ----%
%---- Printer Disk : Format Disk ----%
str FD_MSG 0 "\0x00aThe disk format command has been transmitted to\0x00athe printer. The format operation requires 5 to\0x00a10 minutes to complete.\0x00a"

str FDALL_P 0 "               WARNING!!!\0x00a\0x00aYou have asked to format all printer hard\0x00adisks. This operation will erase all data\0x00aon all printer disks!\0x00a\0x00a     Format All Printer Disks (Y/N): "

list FDALL_L SEL FDALL_P NO YES
str  FDALL_PS 0 "\0x00astatusdict begin 0 1 initializedisk end\0x004"

proc SETDALL {
  if((mvinput FDALL_L N/A N/A N/A N/A) == ALT) {
     if((mvinput FDALL_L N/A N/A N/A N/A) == ALT) {
        strsss T512 SS EXSERV FDALL_PS NULL
        if((printstr T512) == OK) {
           msgwait FD_MSG
        }
     }
  }
}

int FD_D 0
str FD_P 0 "               WARNING!!!\0x00a\0x00aYou have asked to format the printer hard\0x00adisk at SCSI ID %d. This operation will\0x00aerase all data on that disk!\0x00a\0x00a      Format Printer Disk (Y/N): "

list FD_L SEL FD_P NO YES FD_D

str  FD_PS 0 "\0x00astatusdict begin (%%disk%d%%) 0 1 devformat end\0x004"

proc SETD_SUB {
  if ((mvinput FD_L N/A N/A N/A N/A) == ALT) { 
     if ((mvinput FD_L N/A N/A N/A N/A) == ALT) {
        strddd T300 FD_PS FD_D 0 0
        FPP512
        % if printed ok 
        if (PRTOK == OK) {
           msgwait FD_MSG
        }
     }
  }
}

proc SETD0 {
  FD_D = 0
  SETD_SUB
}
proc SETD1 {
  FD_D = 1
  SETD_SUB
}
proc SETD2 {
  FD_D = 2
  SETD_SUB
}
proc SETD3 {
  FD_D = 3
  SETD_SUB
}
proc SETD4 {
  FD_D = 4
  SETD_SUB
}
proc SETD5 {
  FD_D = 5
  SETD_SUB
}
proc SETD6 {
  FD_D = 6
  SETD_SUB
}

menu DISKS "Printer Disks" PDF_H 8 32
  opt DISKS SETDALL NONE " ~All Disks"
  opt DISKS SETD0 NONE " SCSI Disk ~0 "
  opt DISKS SETD1 NONE " SCSI Disk ~1"
  opt DISKS SETD2 NONE " SCSI Disk ~2"
  opt DISKS SETD3 NONE " SCSI Disk ~3"
  opt DISKS SETD4 NONE " SCSI Disk ~4"
  opt DISKS SETD5 NONE " SCSI Disk ~5"
  opt DISKS SETD6 NONE " SCSI Disk ~6"

proc FMT_DSK {
 popup DISKS
}

%---- Printer Disk : Park Disk ----%
str PD_MSG 0 "\0x00aThe disk park command has been transmitted to\0x00athe printer. Turn printer power off before\0x00ahandling the hard disk.\0x00a"

str PD_P 0 "               Park Printer Disk\0x00a\0x00aThe disk heads of all printer hard disks may be\0x00aparked to allow handling and transport of the\0x00adisk.\0x00a\0x00a          Park Printer Disk(s) (Y/N): "
list PD_L SEL PD_P NO YES
str PD_PS 0 "\0x004 statusdict begin parkdiskheads {} loop\0x004"

proc PRK_DSK {
  if((mvinput PD_L N/A N/A N/A N/A) == ALT) {
      if((printstr PD_PS) == OK) {
        msgwait PD_MSG
     }
  }
}

%---- Printer Disk : List Disk Files ----%
proc LST_DSK {
  printfile ".\\util\\disklist.prt" NULL
}

%---- Printer Disk : Save File to Disk ----%
str WRT_PS 0 "\0x004 /dfile (%s) (w) file def /buf 1024 string def /savfile { {currentfile buf readstring exch dfile exch writestring not {dfile closefile exit} if} bind loop} def savfile \0x00a"
str WRT_SP 0 "            Save File to Disk\0x00a\0x00aEnter the host source file to be saved and\0x00athe printer destination file name.\0x00a\0x00a  Host File   : " 
str WRT_DP 0 "  Printer File: " 

list WRT_SL PATH WRT_SP T300 128
list WRT_DL ALPHA WRT_DP T80 79

proc WRT_DSK {
  % add *.ps to path
  strcpy T300 CURDIR
  strcat T300 WILDPS
  strcpy T80 EMPTY
  if ((mvinput WRT_SL WRT_DL N/A N/A N/A) == OK) {
     strsss T512 WRT_PS T80 NULL NULL
     if ((printstr T512) == OK) {
       printfile T300 NULL
       printstr CTRLD
     }
     % separate path in to drive,dir,file,ext
     splitpath T300 CURDIR T512 T80 T10
     % catenate dir to drive
     strcat CURDIR T512
  }
}

%---- Printer Disk : Run Disk File ----%
str RUN_PS 0 "\0x004 (%s) run \0x004"
str RUN_P 0 "              Run Disk File\0x00a\0x00aEnter the name of the printer disk file.\0x00a\0x00a  File: " 

list RUN_L ALPHA RUN_P T80 79

proc RUN_DSK {
  strcpy T80 EMPTY
  if ((mvinput RUN_L N/A N/A N/A N/A) == OK) {
     strsss T512 RUN_PS T80 NULL NULL
     printstr T512
  }
}

%---- Printer Disk : Copy Disk File ----%
str CPY_PS 0 "\0x004 /sfile (%s) (r) file def /dfile (%s) (w) file def /buf 1024 string def /savfile { {sfile buf readstring exch dfile exch writestring not {dfile closefile sfile closefile exit} if} bind loop} def savfile \0x004"
str CPY_SP 0 "              Copy Disk File\0x00a\0x00aEnter the printer disk source file and the\0x00adestination file name.\0x00a\0x00a  Source File: " 
str CPY_DP 0 "  Dest. File : " 

list CPY_SL ALPHA CPY_SP T80 79
list CPY_DL ALPHA CPY_DP T300 79

proc CPY_DSK {
  strcpy T80 EMPTY
  strcpy T300 EMPTY
  if ((mvinput CPY_SL CPY_DL N/A N/A N/A) == OK) {
     strsss T512 CPY_PS T80 T300 NULL
     printstr T512
  }
}

%---- Printer Disk : Rename Disk File ----%
str REN_PS 0 "\0x004 serverdict begin 0 exitserver\0x00a (%s) (%s) renamefile \0x004"
str REN_OP 0 "            Rename Disk File\0x00a\0x00aEnter the printer disk file to be renamed\0x00aand the new file name.\0x00a\0x00a  Old Name: " 
str REN_NP 0 "  New Name: " 

list REN_OL ALPHA REN_OP T80 79
list REN_NL ALPHA REN_NP T300 79

proc REN_DSK {
  strcpy T80 EMPTY
  strcpy T300 EMPTY
  if ((mvinput REN_OL REN_NL N/A N/A N/A) == OK) {
     strsss T512 REN_PS T80 T300 NULL
     printstr T512
  }
}

%---- Printer Disk : Delete Disk File ----%
str DEL_PS 0 "\0x004 (%s) deletefile \0x004"
str DEL_P 0 "             Delete Disk File\0x00a\0x00aEnter the name of the printer disk file to\0x00adelete.\0x00a\0x00a  File: " 

list DEL_L ALPHA DEL_P T80 79

proc DEL_DSK {
  strcpy T80 EMPTY
  if ((mvinput DEL_L N/A N/A N/A N/A) == OK) {
     strsss T512 DEL_PS T80 NULL NULL
     printstr T512
  }
}

%---- 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 1 setpapertray 1 defaultpapertray ne {1 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
        STO = 0
        WTO = 30
        ETO = 5
        ATO = 3
        strcpy PTO_S "0 0 30 5 3"
        strcpy PTRAY UTRAY
        strcpy OPTRAY UTRAY
        strcpy POTP_S ENAB
        NEWSTATUS
        % save all config file values
        savestr &PEMUL PEMUL
        savestr &PTO_S PTO_S
        saveint &JTO JTO
        saveint &STO STO
        saveint &WTO WTO
        saveint &ETO ETO
        saveint &ATO ATO
        savestr &PTRAY PTRAY
        savestr &OPTRAY OPTRAY
        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"
  opt COMM GETPACC PACC_H "Printer ~Accessories"
  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 SPHNDLG PH_H "Current ~Paper Handling"
  opt OPTIONS GETEMUL CE_H "Current ~Emulation"
  opt OPTIONS GETRES RES_H "Printer ~Resolution"
  opt OPTIONS SETPTO PTO_H "Default ~Timeouts"
  opt OPTIONS SETPOTP POTP_H "~Start-Up Page"

menu DISK "Printer ~Disk" PD_H 8 26
  opt DISK PRK_DSK PDP_H "~Park Disk"
  opt DISK FMT_DSK PDF_H "~Format Disk"
  opt DISK LST_DSK PDL_H "~List Disk Files"
  opt DISK WRT_DSK PDS_H "~Save File to Disk"
  opt DISK RUN_DSK PDRN_H "~Run Disk File"
  opt DISK CPY_DSK PDCP_H "~Copy Disk File"
  opt DISK REN_DSK PDR_H "Re~name Disk File"
  opt DISK DEL_DSK PDD_H "~Delete Disk File"

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 ----%
#ifdef OPT_DISK
  wmenu WMAIN "   "
#else
  wmenu WMAIN "       "
#endif

addmenu WMAIN COMM
addmenu WMAIN FILES
addmenu WMAIN OPTIONS
#ifdef OPT_DISK
  addmenu WMAIN DISK
#endif
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: 0.98