home *** CD-ROM | disk | FTP | other *** search
- CONTROL
- --------------------------------------------------------------
-
-
- WHAT IS CONTROL?
-
- CONTROL is a memory-resident program that allows you to easily
- access the features of your printer. Simple commands, embedded
- in your printed text, are converted into printer control
- codes. You can also define text substitutions that allow you
- to "boiler-plate" letters, forms, etc.
-
- Configuration files allow you to specify what effect each
- embedded command has.
-
- CONTROL can be removed from memory without rebooting your
- computer.
-
-
- FILES INCLUDED WITH CONTROL
-
- The files are:
-
- CONTROL.EXE The main memory-resident program.
-
- REM-CTRL.EXE Removes CONTROL from memory.
-
- CONTROL.DAT Sample data file for Epson or IBM printers.
- It contains substitution definitions that
- select bold, double width, etc.
-
- SAMPLE.DAT Sample data file for text. It contains
- example text substitutions.
-
- Both of the .DAT files are plain "ASCII" files. They contain
- comments to help you understand their contents.
-
-
- LOADING CONTROL
-
- The syntax for loading CONTROL is:
-
- CONTROL [-Tx] [configuration_file] [printer]
-
- All bracketed items following CONTROL are optional.
-
- The "-Tx" option allows you to select an alternate trigger
- character for the embedded commands contained in the text that
- you are sending to your printer. The character following the
- "T" (here shown as an "x") becomes the new trigger character.
- The default trigger character is a backslash ("\"). A typical
- example of an embedded command would be:
-
- \BThis would print as bold, \Cand this wouldn't.
-
-
-
- 1
-
-
-
-
-
-
-
-
- CONTROL
- --------------------------------------------------------------
-
-
- In the above example, "\B" turns on the bold feature of your
- printer, and "\C" turns it off. (The "\B" and "\C" commands
- could mean something entirely different; they are used here
- only for the purpose of showing commands embedded within
- text.)
-
- The trigger character is always immediately followed by a
- character that identifies which substitution string is to
- replace the embedded command. Upper and lower case are
- equivalent for the second character. For example, "\b" and
- "\B" are the same.
-
- The "configuration_file" option allows you to select an
- alternate configuration file. The default configuration file
- is CONTROL.DAT. To load SAMPLE.DAT instead, type:
-
- CONTROL SAMPLE.DAT
-
- The "printer" option allows you to use CONTROL with a printer
- connected to a printer port other than the default LPT1:
- (PRN:). "Printer" can be LPT1:, LPT2: or LPT3:. For example,
- to control the printer connected to LPT2:, type:
-
- CONTROL LPT2:
-
- To remove CONTROL from memory, run REM-CTRL from the DOS
- prompt.
-
-
- CONFIGURING CONTROL
-
- The CONTROL configuration file determines what strings are
- substituted for the embedded commands contained in your text.
-
- The default CONTROL.DAT file contains the following
- substitution definitions for an Epson or IBM printer:
-
- \B : turns on (B)old printing
- \C : (C)ancels bold, underline, double width
- \E : turns on (E)ight lines per inch printing
- \N : turns off superscript and subscript
- \S : turns on (S)ix lines per inch printing
- \U : turns on (U)nderlining
- \V : turns on subscript ("arrow" points down)
- \W : turns on double (W)idth
- \^ : turns on superscript ("arrow" points up)
- \< : turns on compressed mode
- \> : turns on 10 characters per inch mode
-
- Configuration files must be in "ASCII" format. The file must
- contain only printable characters ("A...Z, 0...9"), with no
-
-
- 2
-
-
-
-
-
-
-
-
- CONTROL
- --------------------------------------------------------------
-
-
- word processor or printer control codes. Most word processors
- have a facility for editing and saving ASCII files.
-
- You may find the following explanation of the contents of a
- configuration file easier to understand if you first copy
- CONTROL.DAT to your printer with the following command:
-
- COPY CONTROL.DAT PRN:
-
- The substitution definitions contained in the configuration
- file consist of a header character, followed by a colon,
- followed by the substitution string. For example, to define
- the string that will be substituted for "\B":
-
- B: {ESC} "E"
-
- In the above example, each occurence of "\B" in your text will
- be replaced by the ESCAPE character, immediately followed by
- an upper case E. This is the IBM or Epson command for bold
- printing.
-
- Comments in a definition file are enclosed by parentheses "("
- and ")".
-
- Special control character representations recognized are:
-
- {ESC} This is the escape character (decimal 27, hex 1B)
- {LF} This is a line feed character
- {CR} This is a carriage return
- {NL} This is a newline (line feed, plus carriage return)
- {TAB} This is a tab character
- {FF} This is a form feed character
-
- Not all string substitutions have to be printer control commands.
- You can define ordinary text substitutions. For example:
-
- A: "This is what will print if '\A' is sent to the printer"
-
- The parsing of the configuration file uses the following
- rules:
-
- comment ::= (anything enclosed in parentheses)
- substitution definition ::= header & body
- header ::= alpha & :
- alpha ::= ASCII characters greater than 32 (hex 20)
- body ::= (string | number | control character) & separator
- string ::= "anything enclosed in double quotes"
- number ::= integer <= 255
- control character ::= {ESC} | {LF} | {CR} | {NL} | {TAB} | {FF}
- separator ::= SPACE | COMMA | TAB | LF | CR | FORMFEED
-
-
-
- 3
-
-
-
-
-
-
-
-