home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PRINT
/
PRNF245.ZIP
/
PRNSET.DOC
< prev
next >
Wrap
Text File
|
1993-06-09
|
60KB
|
1,266 lines
PrnSet PrnSet
Universal Printer Setter (Non-Resident)
Version 2.94
Programmer: R. N. Wisan, January, 1993
37 Clinton Street, Oneonta, NY, 13820
Not Copyright: Enjoy.
PrnSet 2.94 Page 1
1 What PrnSet is 1 What PrnSet is
Prnset is a universal printer setting program:
o It gets its data from a data file, which you can make with
any text editor. This makes it possible
(a) to set the print control symbols for any printer
(b) to select and organize the instructions you want to have
in PrnSet's repertoire.
o It can operate interactively through a menu, from a batch
file, or directly from the DOS command line.
o It can send files to the printer from its menu; conversely,
it can redirect its output (instructions, files and all) to a
file.
o It needs DOS 2.00 or higher.
o It is non-resident. It lives on disk.
You normally use a printer setter to prepare the printer be-
fore printing out a plain text file (like this document). A
program which sends its own printer control instructions (like a
word processor) would over-ride anything you sent it with PrnSet.
Occasionally, however, you can set something which your program
doesn't know about. If your program can't switch between "draft"
and "letter quality," for instance, you may find you can set one
of these with PrnSet, and the program will leave it that way.
2 Setting up: The Files 2 Setting up: The Files
As provided: PrnSet comes in the following files:
PRNSET.EXE The operating program.
PRNSET.DOC This Manual
PRNSET.DAT The default data file for PRNSET.EXE.
xxxxxx.DAT There may be other data files. Their names suggest
what printers they're for,
Besides the PrnSet files, proper, some file manicuring tools are
on the disk. To save space, they're packed into self-extractor
files each with its own DOC file of instructions:
PrnSet: Setting up: The Files Page 2
COUNTPGS Used to count the pages and generally size up a file
before printing it. Tells how many pages, how many
lines per page, how long the lines, and other useful
things.
PAGINA Breaks a continuous text file into pages, with
headers, footers and margins, if desired. You get
lots of choice about them.
PRN2BOTH Divides a paginated file in two: one containing the
odd numbered pages, the other containing the even.
You print the odd page file, take the paper out, put
it in again other way up and print the even pages on
the back. If necessary, Prn2Both can lay out
suitable margins and reverse existing header and
footer lines.
MANGLER Performs various file-manicuring functions like
breaking it into smaller pieces, adding or stripping
margins, inserting or removing form-feeds, removing
unwanted blank lines, de-WordStarring files with
strange characters in them etc.
A file which uses bare carriage returns to do under-
lining (CountPgs will tell you if it does) usually
puts the text first, followed by CR and the under-
scores. This makes the file unreadable on the
screen. Mangler can swap what's on the line in
front of such a carriage return with what's behind
it. Try it both ways, you'll see the difference.
To use a self-extractor, you run it from a disk (or directory)
that has plenty of space on it. The self extractor then unpacks
its contents onto the default disk\directory.
The following file (also a self-extracter) contains a program
that isn't part of the PrnSet group. If your word processor
won't make plain ASCII files, you need a simple editor which
will, hence:
TERSE.EXE Contains Terse (T.COM), a simple ASCII text editor
and its instruction manual in TERSE.DOC.
You need a working PRNSET.DAT somewhere on your disk. PrnSet
will look for it all along the path, so anywhere will do so long
as it's on the path. As supplied, PRNSET.DAT contains a trick
billboard file.[1] Look over the .DAT files. If one seems right
for your printer, put it on your disk (and rename it PRNSET.DAT).
-----------
1. PrnSet used to come with a working PRNSET.DAT, in fact the one
I normally use. I've set up the billboard because it was too
easy for the non DOC-reading crowd to punch it up, see the
legend: "for Epson LQ-800" and decide it wasn't for them.
PrnSet: Running PrnSet Page 3
Even if you find one with the name of your printer, you'll
want to edit it to taste eventually, but for now, pick out any-
thing that looks hopeful, just to see how PrnSet works.
3 Running PrnSet 3 Running PrnSet
To run PrnSet, both PRNSET.EXE and PRNSET.DAT must be on the
default disk or somewhere on the DOS path, where PrnSet can find
it. The full syntax for starting PrnSet is:
PRNSET [[d:][\path]datafile] [{+|-}inst[/n]]...
Note that everything after PRNSET is optional. If you enter
PRNSET bare, it will use PRNSET.DAT as the default file, take its
data from that, and give you a menu to choose from. To use a
different data file, enter the name of the file with, optionally,
a drive and path designation. If you give no suffix, PRNSET will
default to .DAT. (If you've set a DOS path, PrnSet will search
all over it for your data file. You really need to give a path
specifier only if the file you want is NOT on the path.)
That's enough to get you going in the interactive mode. The
"[{+|-}inst[/n]]..." options concern the command mode, and we can
put off explaining it to Section 3.2.
3.1 The Interactive Mode 3.1 The Interactive Mode
To start PrnSet, type PRNSET and press <Enter>. Sooner or
later, (emergencies over) you'll see a menu something like this:
-------------------PrnSet for Epson LQ-800----------------------
|F1 Help F2 DOS F3 Setup F5 Test F7 Print F9 ->File <Esc> Quit|
|--------------------------------------------------------------|
| Misc || Fonts || Style || Format |
|--------------||--------------||--------------||--------------|
|[Reset Prn ]|| Pica || NLQ || LMargin |
| ManualStyle || Elite || Cond || RMargin |
| VerySmall || 15 cps || Wide || 8 Line/inch |
| Tiny || Proportional || Underline || 6 Line/inch |
| || || Italic || n/180"/Line |
| || || Dbl Strike || SkipOver |
| || || SpScr || |
| || || SbScr || |
| || || || |
|--------------------------------------------------------------|
| Arrows move; <Enter> turn on/off; F10 sets prn; Del clrs; |
----------------------------------------------------------------
If anything's gone wrong, there'll be a message like "Can't find
PRNSET.DAT" in the bottom line. In such a case, check to make
sure PRNSET.DAT is on the default drive or at least somewhere on
the DOS path.
PrnSet: The Interactive Mode Page 4
If your monitor is the old CGA type, you may see a notice:
"If you can't read the menu above, press the spacebar." If you
can't, press the spacebar, and PrnSet will fix the screen. As a
matter of fact, it'll automatically dump you into the reconfigu-
ration menu (see page 14) with everything set in black-and-white,
asking you "Record this setting permanently? (Y/N)" Answer Y,
and it will fix up its own PRNSET.EXE, and also MANGLER.EXE, PA-
GINA.EXE, and PRN2BOTH.EXE, if it finds them in the default
drive\directory.
3.1.1 Setting the Printer 3.1.1 Setting the Printer
Assuming all's well, first you specify what instructions you
want to send the printer; then you send them. The menu explains
itself pretty well, and you can get some help by pressing F1.
To Specify What to Send,
1. Use the cursor pad keys to move the emphasized bar to the in-
struction you want to give. Then press <Enter>. One press
toggles the instruction ON ("Tell the printer to turn this
feature on"), another <Enter> toggles it OFF ("Tell the
printer to turn this off"), and a third toggles it back to
silent ("Say nothing to the printer about this feature").
Some instructions (like "Pica") have no OFF instruction, so
they just toggle between ON and silent. Some instructions
(like "LMargin") need a number, so when you toggle it on,
you're asked for "Number." Type in what you want and press
<Enter>.
or,
2. Just type the first two letters of the instruction you want
(uppercase or lowercase doesn't matter). "EL" for "Elite" is
the equivalent of moving to "Elite" and pressing <Enter>.
To Send the Instructions:
Press F10. As you enter instructions, the ones that are live
are highlighted. They aren't sent to the printer until you press
F10. Then, you get a solemn announcement to that effect, and you
can press either Esc to quit or any other key to continue in
PrnSet.
If you send several instructions at once, they'll be sent NOT
in the order you punched but in the order of the screen, from top
to bottom for the left column, then top to bottom for the next
column and so on. Thus, if a later instruction cancels an ear-
lier one, that's what you'll get. For example, if you set "Pica
ON," "Elite ON," "8 Line/inch ON," "6 Line/inch ON" from the menu
above. It would turn on Pica, then turn on Elite (which cancels
Pica), then 8 lines per inch, then 6 lines per inch (canceling 8
PrnSet: Setting the Printer Page 5
per inch), and you'd wind up with Elite at 6 lines per inch.
That's why "Reset Prn" is put first, so it can clear the printer
before anything else is sent.
Unless you tell it to, PrnSet never clears the printer. That
means that successive sendings, even successive runs of PrnSet
are cumulative. If you send "Elite", quit PrnSet, run PrnSet
again and send "Wide", you have a printer set for Wide Elite.
If You've Made a Mess:
You can clear PrnSet by pressing Del. That turns all in-
structions silent and puts the bar back at upper left. This does
nothing to the printer. It just lets you start PrnSet afresh.
To See What You've Done:
Press F5, and PrnSet will send a test line of type to the
printer.
3.1.2 Printing and Sending to Files 3.1.2 Printing and Sending to Files
To Send Files to the printer:
Press F7, and PrnSet will send a file to the printer. If you
use wildcards ("*" and "?") to say what files you want, PrnSet
will confirm each file before printing it. For speed, the file
will be read and sent to the printer in blocks. If you change
your mind after it starts, you can't stop it on a dime, but press
<Esc> and it will stop after the next block of print.
The point of this facility is to allow you to sit in PrnSet
and send a series of files, each with suitable printer settings,
including added FF's as you'd have to do if they end in the mid-
dle of a page. The alternative is to make up a batch file to
copy the files, calling PrnSet between them with command line in-
structions.
To Redirect PrnSet's Output:
Press F9, and PrnSet will ask you for a file name. If you
give one, everything which would normally go to the printer will
be sent to that file. To resume sending to the printer, press F9
again; it's a toggle. The point here is to allow you to make up
a file containing text(s) with suitable printer instructions, to
be copied to a printer somewhere and somewhen else. If you have
suitable .DAT files, you can set up files this way for printers
different from your own. Also, by combining PrnSet with the DOS
PRINT command, you can pretty quickly set up files with printer
instructions and start it all printing in the background.
PrnSet: Stepping Briefly into DOS Page 6
When PrnSet sends files to a printer, it adds a newline (car-
riage return and line-feed) to files which don't end with one.
It doesn't do this when it sends to a file.
3.1.3 Stepping Briefly into DOS 3.1.3 Stepping Briefly into DOS
When you get to using PrnSet to make up files with various
texts, printer controls and such, you may want to use some other
facility that has to be launched from the DOS command line. F2
opens a DOS door. That means you seem to be back at the regular
DOS command line. From there, you can do (almost) anything you
can normally do at the command line. When you're done, type EXIT
and press <Enter> to return to PrnSet.
You'll notice the DOS prompt shows an asterisk (*) that isn't
normally there. It's to remind you that you're not at the normal
DOS command line. When you use this facility, PrnSet remains in
the computer's memory. If you do a CHKDSK, you'll notice that
the number of "bytes free" is less than usual. For this reason,
you want to keep in mind you're standing on PrnSet's shoulders
(it's easy to forget).[2]
One warning: if you've started to send things to a file from
PrnSet, don't try to work the same file after you step through
the DOS door. You can confuse the various sets of DOS into open-
ing and closing the same file several times. It makes a mess of
the file.
3.2 The Command Line Mode 3.2 The Command Line Mode
When you know what's on PrnSet's menu, you may prefer to skip
all the foofaraw and enter what you want directly at the DOS com-
mand line. Naturally, if you want to run PrnSet from a batch
file, you have to use this method. To do it, after "PRNSET " or
"PRNSET filename ", put a "+" (to say "Turn on") or a "-" ("Turn
-----------
2. If you're not familiar with this manoever, try this experi-
ment: Do a CHKDSK and make note of the number of bytes free.
Then run PrnSet and press F2. Do another CHKDSK and note the
_______ bytes free. Run PrnSet again without doing an EXIT first.
Run another CHKDSK. Keep doing this until the computer re-
fuses. Either DOS won't run another PrnSet or another CHKDSK
or PrnSet won't give you another DOS command line. You've
filled up all the available memory, as the CHKDSK figures
should show. If you're at DOS do an EXIT; if you're in PrnSet
press <Escape> to quit. Keep doing this until you're back to
the home DOS command line, without an asterisk.
PrnSet: The Command Line Mode Page 7
off") and the name of the feature you want turned on or off.
Thus:
PRNSET +ELITE
turns on Elite without going through the menu. If all's well,
PrnSet will confirm what it sent to the printer. Otherwise, you
get an error message. You can send several instructions at once.
To turn on Elite, turn off italics, and set the left margin to 12
characters, you enter:
PRNSET +ELITE -ITALIC +LMARGIN/12
As a matter of fact, you need only the first two letters of the
instruction (that's all PrnSet will notice) and they can be upper
or lower case. You'd get the same effect with:
PRNSET +EL -it +Lm/12
Notice how the number for LMargin is entered with a slash, as
/12. Remember, the full syntax for starting PrnSet is:
PRNSET [[d:][\path]datafile] [{+|-}inst[/n]]...
Here are the rules for instructions:
____ - Each instruction must begin with either + or -.
- Each instruction that requires a number must end with /n
(where n is the number).
- Spaces must be used to separate instructions from each
other.
- There must be no spaces in the instruction.
In the command line mode, unlike the menu mode, instructions
are executed in the order in which they are given. Thus:
PRNSET +pica +elite
leaves the printer set for elite, while
PRNSET +elite +pica
leaves it set for pica.
Run this way, PrnSet reports what it's doing. You enter:
PRNSET +ELITE +DBL
and Prnset will reply with:
PrnSet: The Command Line Mode Page 8
PrnSet 2.94 for Epson LQ-800
"Elite ON" sent to printer.
"Dbl Strike ON" sent to printer.
That's it.
If you run PrnSet from a batch file, you can suppress this report
by redirecting it to a file or to nul. If the line in your batch
file says
PRNSET +ELITE +DBL > NUL
Prnset will do the job but won't say anything about it.
4 Making a Data File for Your Printer 4 Making a Data File for Your Printer
Everything PrnSet knows about your printer it gets from the
data file. By default, it uses file PRNSET.DAT, though you can
tell it otherwise when you load. If you have several printers,
you might want to keep separate data files for them and tell
PrnSet to use the one you want when you load it.
To make a data file, you can use any text editor that can re-
frain from putting funny characters in the files. (WordStar
works, for example, but only in the nondocument mode).[3] You
will need to work out in advance a list of the features you want
to control from the menu and the ASCII numbers of the symbols the
printer must be sent to turn each of those features on and off.
You'll need to explore your printer's manual to find these.
Here are the rules for a PrnSet data file:
1. Title: The first line is a title. The first 18 characters of
what you put here will appear after "PrnSet 2.94 for " at the
top of the menu. Best use the name of the printer. (But,
see Sec. 4.1, "Hex Numbers and Characters," p. 10 below.)
2. Categories: Any line (after the first) which does not contain
an equal sign ("=") will be taken as the name of a category.
- The category name may have up to 12 characters.
- You may have up to four categories, and each category may
have up to 17 instruction items in it.
-----------
3. If you have nothing else, EDLIN, the silly line editor that
comes with DOS would do. Since I wouldn't wish EDLIN on a
dog, I've put a simple text editor called Terse on the disk.
Please note that Terse is not in the public domain. It's a
shareware program, copyright by Joseph (Yossi) Gil. If you
find you use it, you ought to pay up the reasonable price
asked.
PrnSet: Making a Data File for Your Printer Page 9
- Items entered after a category name will be assigned to
that category. If no items are entered for a category,
the category is ignored. (If you enter two category
names with nothing between, only the second one counts.)
3. Items: The format for an instruction item goes like this:
Name= n,n,n...[#|$n].. [m,m..]
That means:
(a) There must be a name (up to 12 characters) followed by an
equal sign followed by at least one series of numbers.
(b) The first series of numbers (n,n,n...) must be the ASCII
numbers (decimal) for the symbols to turn ON the instruc-
_______ tion.[4] I say again, ASCII numbers. Enter "Escape E" as
27,69. If you want to put a character (instead of its
ASCII number) in the file, you must precede it with a
backslash (\). "Escape E", therefore, could also be
written: 27,\E.
(c) The numbers must be separated with commas. There must be
no spaces in the string.
(d) At any point in the ON sequence, a Dollar sign with a
numeral ($1 to $4) or a pound sign (#) will tell PrnSet
to get a number from the user for the instruction (like
LMargin). "#" tells PrnSet to get the number in the form
of a byte. "$n" tells it to get the number in the form
of a string of n numerals. If necessary, zeros will be
prefixed to make up the n characters: given $4, PrnSet
will turn the entry "23" into "0023".
(e) After the first string, you can put a space followed by a
second string of numbers to provide a turn-OFF instruc-
tion. If there's no OFF string, then:
- If the instruction takes a number (ON string contains
# or $n), PrnSet will send ON 0 for off. (That would
work for Left Margin, but not for Right Margin.)
- If it doesn't take a number, PrnSet will send no OFF
signal at all. It will toggle between ON and silent.
(That's how "Pica" and "Elite" work on Epsons.)
4. Comments: Two kinds of comment are possible:
(a) Semicolons and anything on a line after a semicolon will
be ignored altogether, so you can use semicolons to put
REMarks in your file. Blank lines also are ignored.
-----------
4. If you prefer to use hex numbers or to enter (most) characters
directly, there's a way to do it. See Section 4.1, on "Hex
Numbers and Characters," p. 10 below.
PrnSet: Making a Data File for Your Printer Page 10
(b) You can put comments in the menu itself in the form of
subheadings in the columns --labels, divider lines and
such. To do this, begin the line with an @ sign. A lone
@ sign causes a blank row in the menu. An @ sign follow-
ed by a single character makes a row of that character:
@- would produce a line of hyphens, -------, across the
menu column. If you put more than one character (you're
allowed up to 12) after the @, PrnSet will center the
text in the column.
4.1 Using Hex Numbers and Characters 4.1 Using Hex Numbers and Characters
As explained above, PrnSet normally accepts only decimal num-
bers, separated by commas, in the data file. Some people may
prefer Hex numbers (if nothing else, they're shorter), and some
may want to enter the characters directly. To make PrnSet accept
data in these forms, you put a dollar sign on the end of the
Title string (the first string in the data file), followed by a
code letter. In brief, the codes are:
$H = Use hex numbers (wherever you need numbers)
$C = Use characters (or decimal numbers after a backslash)
$HC or $CH = Use characters (or hex numbers after a backslash)
The $H tail won't show, of course; PrnSet will bobtail the title
string at the $. Notice that you get your choice of decimal or
hex numbers, but you must stick to one or the other. You can't
put both hex and decimal numbers in the same data file.
If you prefer to use characters for most of your entries, you
put $C after the title string. This mode is a little tricky.
Some characters, like "E" are easy to enter, but some, like "Es-
cape" are not. What and how you can put these into the file de-
pends on your editor. If necessary, you can use the backslash to
enter by the ASCII numbers. In character mode, to enter "Escape
E" you might use \027E. Notice two things about this. First,
there are no commas separating the characters. Second, the Es-
cape character is represented with three digits. In this mode,
_____ the next three digits after a backslash are taken to be the ASCII
number called for. For numbers smaller than 100, you must add a
leading zero or two to pad it out to 3 places. If you like Hex
numbers, $CH or $HC sets PrnSet for characters or backslashes
___ followed by hex numbers. In hex, you must use exactly two digits
for each number; "Escape E" could now be entered as \1BE.[5]
Keep in mind that in character mode, some characters can't be
entered straight. You can't enter a carriage return, because
_____ that ASCII number would merely cause a carriage return and ter-
-----------
___ 5. If your editor can do it, you can put a genuine "escape"
character (#27, 1B hex) or maybe a line-feed (#10, 0A hex) or
form-feed (#12, 0C hex) in the file. Don't try to copy such a
file to the printer, though.
PrnSet: Using Hex Numbers and Characters Page 11
minate the line at that point. Nor can you enter a blank space,
because a blank space is PrnSet's string terminator sign, and
would be construed merely as the end of the string. So too, the
dollar sign, the pound (#) sign, and the backslash all have spec-
ial meanings. You must enter these numerically or precede them
with a backslash:
Form-Feed: \012 (dec) \0C (hex)
Carriage Return: \013 \0D
Escape: \027 \1B
Blank Space: \ \032 \20
Pound: \# \035 \23
Dollar: \$ \036 \24
Backslash: \\ \092 \5C
To see how these data forms look, compare three of the supplied
printer files: LQ-800.DAT is the data file I use myself for an
Epson LQ-800. LQ-800H.DAT and LQ-800HC.DAT are exactly equivalent
files, in hex and characters-with-hex-number form.
4.2 Helpful Hints About Data Files 4.2 Helpful Hints About Data Files
To see how a file should look, see any of the printer DAT
files supplied as a model. A few hints:
- Each category will occupy one column on the menu, and it
can have 17 instruction lines. If you need more than that,
you'll have to devote a second category like "Fonts" and
"Fonts Cont'd".
You can overdo the use of @ sign lines to make sub-headings
on the screen; each of them uses up one of the 17 lines in
the column.
- Remember that the order in which you put things in the data
file is the order in which they will appear on the screen,
and that is the order in which (in the menu mode) they'll
go to the printer. Consider what must be done before what.
If you use a tab set, it may matter whether you send it
before or after a font width change. Put "Reset Printer"
first. (Pointless to send other things and then reset, but
you may want to reset and then send.)
- Be careful what names you use. PrnSet recognizes only the
first 2 characters for command line entries or keyboard
interaction. (It's not case-sensitive; upper and lower
case count the same.) If you use "Superscript" and "Sub-
script", PrnSet will treat them both as "SU" and you'll get
whichever comes first. That's why my PRNSET.DATs call them
"SperScript" and "SbScript".
- It's tempting to put everything the printer can do into
your data file. It may be better to keep the menu clean.
If you never use international alphabets, why clutter the
PrnSet: Helpful Hints About Data Files Page 12
menu with them? It's easy to edit your data file if you
need to expand your offering. You can make several files
for different purposes. Call for the one you want on the
command line or copy it to PRNSET.DAT.
Some of the ready made DAT supplied on the disk are ones
I've used. Those printers will do lots of things I never
wrote into the file, because so far I'm not using them.
Explore your printer manual.
- You can, in a sense, create features your printer doesn't
have by combining instructions it does have. For instance,
my LQ-800.DAT (for an Epson LQ-800) contains:
Manual Style= 27,103,27,48 27,80,27,50
Very Small= 27,83,0,27,80,15,27,51,16 27,50,18,27,84
Tiny= 27,83,0,27,77,15,27,51,16 27,50,18,27,80,27,84
"Manual Style" is 15 char/inch and 8 lines/inch, which just
puts an 8.5" x 11" pica layout onto a 5.5" x 8.5" page for
IBM manual size binders (provided the file is paged with
FF's). "Very Small" and "Tiny" are both superscript at
16/180 inches per line. "Very Small" uses condensed pica
at 17 characters per inch, while "Tiny" puts 20 by using
condensed elite. I may have overdone it.
- If you have trouble, you can make PrnSet report exactly
what data it's getting from your file. It puts the report
in a file, PRNSET.LST, and it's not a bad idea, whenever
you make a data file, to see what PRNSET.LST will show.
See Section 5.3, p. 15 below.
4.3 Two Special Codes 4.3 Two Special Codes
4.3.1 Printer Reset 4.3.1 Printer Reset
A printer "reset" or "initialization" is supposed to restore
all the printer's default settings; that is, the condition it's
in when first turned on. There are two ways to do this:
__ _________ In Hardware: There is a signal the computer can send which is
supposed to re-initialize the printer. When this happens,
you can see and hear the printer do a front-and-center, ex-
actly as it does when you turn it on.
PrnSet has a special code, 0 0 0, for this.
Init Printer= 0,0,0
in PRNSET.DAT, will put "Init Printer" into the menu. When
you send it, PrnSet will send the hardware reset signal, and
you should hear the click-jump as the printer sets itself up.
PrnSet: Printer Reset Page 13
__ ________ In Software: Some Printers have a reset instruction which you can
send as you send any other printer instruction. Almost any
Epson can be reset in this way by Esc "@" (27,64). A soft-
ware reset is usually silent.
To use this kind of reset, you put it into PRNSET.DAT like
any other instruction. If your printer has no software reset
instruction, you can make a sort of reset instruction by mak-
ing a string that turns off everything you might have turned
on. PrnSet will accept up to 40 numbers per instruction.
Experiment to see which of these methods you want. You may
want both of them; they have somewhat different effects. On an
Epson, a software reset wipes out all instructions but does not
remove a downloaded software font; a hardware reset wipes out
everything. Hardware resets may not work, however, if you use a
printer buffer. Further, PrnSet's 0,0,0 hardware reset instruc-
tion operates only when you are sending to the printer. It does
nothing when you've redirected output to a file (or to "PRN");
4.3.2 Keyboard Entry on the Fly 4.3.2 Keyboard Entry on the Fly
Occasionally, you may want to send a string of instructions
you never thought to put in your data file. Beginning with ver-
sion 2.92, you can make a menu item to let you do it. If you put
____ four zeros, 0,0,0,0, for an ON string (and leave out the off
string), PrnSet will let you enter numbers for it when you turn
it ON in the menu.[6] Put something like this in the data file:
Keyboard= 0,0,0,0
That'll put an item named "Keyboard" on your menu. When you turn
it on, it will prompt you for a string. You must use the same
format (hex or decimal numbers, with or without characters) as
your data file, and the prompt will remind you what that is. If
you want to repeat that sequence, turn on "Keyboard" again. It
will pop up showing the string you gave it before; you can change
it, or press <Enter> to keep it and continue.
What pops up isn't a simple replica of what you entered.
It's translated back from what PrnSet extracted from your string.
To make sure that PrnSet understood, press <Enter> a couple of
times, and you'll see what actually went in.
Like any other datum, PrnSet will file what's in "Keyboard"
whenever you press F10 in the Reconfiguration Menu to file your
data to PRNSET.LST (see page 15 about filing data this way). If
you change the data form when when you file PRNSET.DAT, by the
-----------
6. 0,0,0,0 would be right in pure number modes. In Characters
with Hex, it would be \00,\00,\00,\00 and \000,\000,\000,\000
in Characters with decimal.
PrnSet: Keyboard Entry on the Fly Page 14
way, the change will hold true for data entry and display for
"Keyboard".
This feature is available only from the menu. You can't call
for it from the command line.
5 Screen Colors and Other Things 5 Screen Colors and Other Things
PrnSet has a built-in reconfiguration procedure. From its
regular menu, press F3, and you'll get a different menu:
-------------------------------------------------------------
| |
| Reconfiguration Menu |
| |
| F1 Emphasized F2 |
| |
| F3 Plain Text F4 |
| |
| F5 Frame F6 |
| |
| F7 Reversed F8 |
| |
| To adjust foregrounds use F-keys plain |
| For backgrounds, use Ctrl with F-keys |
| |
| To file current data press F10 |
| |
| <Esc> cancels changes To accept the colors: <Enter> |
| |
-------------------------------------------------------------
From this menu, you can do two things. You can adjust the color
scheme, and you can make a record of the printer data read from
the .DAT file to help debug a new .DAT file.
5.1 Screen Colors 5.1 Screen Colors
At the Reconfiguration Menu, press the indicated function
keys and the menu will change colors to show what you've done.
The colors cycle. Odd-numbered keys (F1, F3, F5) take you round
the cycle one way; even-numbered keys go around the other way.
Pressing the keys plain adjusts foreground colors. To adjust
backgrounds, hold down Ctrl while you press the keys. Experiment.
What looks best depends on your taste and your monitor. Here are
two settings I like:
Plain text: Green on Black White on Blue
Emphasized: White on Black Yellow on Blue
Frame: Black on Brown Black on Cyan
Reversed: Black on White Black on White
PrnSet: Screen Colors Page 15
When you like the setting, press <Enter>. Before it lets you
out, PrnSet will ask
Record this setting permanently? (Y/N)
If you press Y, PrnSet will make the change permanent by rewrit-
ing part of PRNSET.EXE. This works only if PRNSET.EXE is on the
default drive:\directory, so make sure you have it there when you
want to reconfigure. If they are on the default drive:\direc-
tory, PrnSet will also set colors in PAGINA.EXE, PRN2BOTH.EXE,
MANGLER.EXE. (COUNTPGS.EXE and Terse have nothing to set; they
use whatever color they finds on the screen.)
5.2 If You Need Black & White: 5.2 If You Need Black & White:
If your monitor is a monochrome MDA type, PrnSet will auto-
matically set the colors to black-and-white when it starts. You
can still change "colors" with the Reconfiguration menu. This
could matter if you want PrnSet to whiten its friends, Mangler,
Pagina, and Prn2Both. Go into the Reconfig menu and change any
color to something else and back (say, punch F1 and then F2).
That makes PrnSet think you've changed something; when you press
<Enter>, it'll go into its act and redo all the files.
If you have a black and white or a gray scale monitor, like
many of the laptop/notebook computers, it may be difficult to see
the display. Go to the "colors" configuration screen (that is,
press F3) and press any F-key, F1 to F8, until the screen comes
___ clear. The trick is, turn any foreground black, and PrnSet will
offer a straight white on black screen. It will startle you if
it happens when you're using a color screen. Fear not. Punch
again, and it will go back to color.
5.3 Debugging Help 5.3 Debugging Help
When you're writing a printer data file, mistakes are easy to
make and often curiously hard to spot. For this reason, I've
left a debugging feature in the program.
If PrnSet is unable to load its data because of a defect in
the .DAT file (too much data, too many categories, etc.) it will
create a file called PRNSET.LST on the default drive:\directory
containing a record of the data it succeeded in getting. In such
a case, the data in PRNSET.LST will be in the same format (hex
or decimal numbers, with or without characters) as the .DAT file.
(If it isn't, the title or its $ string must be missing, erron-
eous, or preceded by a semi-colon.) If the data loads all right
but the printer doesn't seem to be doing what you meant, you can
force PrnSet to create a PRNSET.LST by pressing F10 at the Recon-
figuration Menu. You get a chance, then, to change the form of
the data. If you wrote the DAT file in numbers, it may be help-
ful to see them printed out as characters.
PrnSet: Debugging Help Page 16
PRNSET.LST should contain the title, The data format option
(decimal/hex numbers and characters/numbers), each of your categ-
ory names, and all the instructions. For each instruction, you
see
o its name.
o the two-character key PrnSet has constructed for it. (If
this key duplicates something above, you'll get a warning,
pointing it out.)
o If the instruction is an @ sign sub-head marker, you'll find
"Subhead Marker: " followed by the marker it makes. Other-
wise, you're told:
- whether it takes a number, some numeral characters or
nothing at all.
- the turn-on and turn-off instructions. The format of
these will follow the format of a data file as near as
possible. In numerical format, the numbers will be sep-
arated with commas. In character format, you may find
that things you entered with numbers turn up as charac-
ters and vice versa. Two special cases:
The Escape character (#27) is represented as "<Esc>". To
avoid confusion, if a real 5-character sequence, "<Esc>"
happens to occur, it will be displayed as "\060Esc\062"
(in decimal) or "\3CEsc\3E" (if you asked for hex).
In the place where run-time numbers are inserted, you
should find a "#" if the instruction takes a number; if
it takes numerals, there'll be dollar signs: "$$" means
two numerals, "$$$" means three, etc. If you need real #
or $ signs in your file, you'll have entered them either
as numbers or with a preceding "\", and that's how
they'll be in PRNSET.LST.
These data should all be the same as what you've put in your data
file, of course, but they aren't just reprinted from your file.
They're reconstructed from the data as PrnSet absorbed it, so you
can tell what's going down properly and what isn't.
PrnSet: Update History Page 17
Appendix A: Update History Appendix A: Update History
Version 1.1 December, 1986
Okidatas, it turns out, want certain numbers (left margin, for
instance) entered as strings of numerals. So provided in 1.1.
Also, provision made for comments in data file.
Version 1.2 February, 1987
Minor change: screen colors specified with typed constants.
Colors can be jiggered with DEBUG or disk editor without source
code or Turbo compiler.
Version 1.3 June, 1987
Another minor change to make recovery from off-line printer more
graceful. A minor cost for this is giving up the option to
redirect output to a file by changing a constant in the source.
Version 1.4 November, 1987
Reconfiguration option added, so user no longer needs source
code. Just to be sure, maximum length of print control strings
is increased from 24 to 40. Help screen prettied up some, too.
Version 1.5 Also November, 1987
Screens more polished, and reconfiguration can be done from
inside PrnSet.
{========================================================}
{ The less said about versions 1.6 and 2.0 the better. }
{========================================================}
Version 2.1 December, 1987
Rewritten in Turbo Pascal 4; smoothed and slightly shrunk; now
makes an .LST record automatically if error prevents loading
data. Reconfiguration procedure simplified.
Version 2.2 March, 1988
Better handling of disk and printer errors. Reconfiguration also
recolors E88.EXE if it's on the default drive.
PrnSet: Update History Page 18
Version 2.3 August, 1988
New function: copy a file to PRN without leaving PrnSet. Block-
Reads files for speed. Handles lines of any length.
Version 2.4 August, 1988
Uses an inline "BlockPrint" procedure to feed text to printer via
INT 17h. Much faster, though less ingenious than 2.3's method.
Version 2.5 August, 1988 (busy month)
Output can be redirected to a file.
Version 2.6 September, 1988
Debugged a loose cannon in the BlockPrint routine. Redirected
output was fine; bug showed only when printing to paper.
Version 2.61 October, 1988
___ 2.5 and 2.6 checked too thoroughly for printer error. Most
___ printers never "acknowledge." Should be ignored. Maybe now
PrnSet will let the message through.
Version 2.70 October, 1988
Various versions of 2.6 had various unreliabilities, mostly in
copying files. These are now (I hope) fixed, and the error trap-
ping is somewhat improved. Yes, you can BlockWrite to a text
device if you Reset or Rewrite to RecSize 1.
PRN, LPT2,and LPT3 get special treatment. I'd appreciate word
from anyone who's tried Prnset on a serial printer.
Version 2.71 November, 1988
Wildcards (* and ?) can now be used in file names. Smoothed
error messages and bulletproofed as far as I can, but you can
still make a mess by opening the drive door in the middle of a
write.
Versions 2.72 & 2.73 December, 1988
Trivial changes, mainly in getting file names from user and pre-
serving data in bungled output files.
PrnSet: Update History Page 19
Version 2.80 March, 1989
Some associated text file tools added: Pagina, Prn2Both, Mangler,
& CountPgs (which has been around for a while). The only change
in PrnSet proper is the ability to re-color its "friends" if they
are on the drive:\directory when the reconfig function is run.
Version 2.81 April, 1989
Cured a 2.80 bug (wouldn't file data for debugging) and added a
DOS door. 2.81a slightly smooths and bulletproofs it. 2.81b & c
smooth screen attribute handling on monochrome monitor.
Version 2.82 June, 1989
Hardware reset capability added along with some complications
(they may be improvements) in checking for missing or off-line
printer.
Serious bug in file printing routine repaired. (It wouldn't work
without a printer buffer.)
2.82 makes an improvement but not a full cure. The problem is
when to check printer status and when NOT to check. Versions
2.83 and 2.84 make further improvements. 2.85 fixes 2.82-intro-
duced bungle about command line instructions and removes Ctrl-Z
from end of file being printed or copied. (Matters only when
output is redirected to file.)
Version 2.86 January, 1990
Repairs a bug in the path-searching routine (it would hang when
trying to read an environment string more than 255 characters
past the beginning of the environment).
2.86b adds a correction to the path searching routine to make
sure it doesn't overlook the default drive. 2.86c cures a VGA
cursor bug. 2.86d enlarges the title string to 18 characters.
2.86e sends output to standard output and/or standard error when
bypassing the menu.
Version 2.90 November, 1990
To accommodate H-P printers, numbers or numerals entered at run-
time can be put anywhere in the instruction's ON string (instead
of only at the end).
Labels and dividers can be put into the menu columns to mark sub-
heads.
PrnSet: Update History Page 20
Version 2.91 September, 1991
Data files can be made with hex numbers (instead of decimals) or
direct characters. PRNSET.LST debugging information file warns
of duplicate instruction ID's. 2.91a cleans up the treatment of
the "Escape" character in PRNSET.LST. 2.91b & 2.91c neaten up
PRNSET.LST. 2.91d uses "Reversed" color for text entry field
instead of reverse of "Normal". Also fixes buglet about blanks
in instruction names
Version 2.92 June, 1992
New function: It's now possible to make a menu item that accepts
direct entry of keystrokes from the keyboard. To check these,
you can now file data into PRNSET.LST repeatedly. (Each over-
writes the last, though.) 2.92a fixes a bug in the handling of
errors in direct entry.
Version 2.93 October, 1992
Bug repair: File copy can access Read Only files. (Turbo
Pascal's reset balks at read only non-text files.) 2.93 re-
repairs this bug the right way (it's really only a documentation
fault).
Version 2.93b January, 1993
Minor bug fix to prevent reconfig function from trying to
work on compressed (PKLITE or LZEXE) files. An important change,
however is that E88, the text editor in the "PrnSet & Friends"
package, has been replaced by Terse (T.COM). Terse can handle
bare CR's.
PrnSet: Update History Page 21
Version 2.94 June, 1993
At the color configuration screen, turning any foreground
color black gets you a black-and-white screen, thus punching F-
keys on an invisible screen eventually makes it visible. Added
this feature after seeing what happens on a black-and-white
laptop screen.
Appendix B: About Updates Appendix B: About Updates
Updates to my programs appear irregularly and sometimes fre-
quently, as bugs or suggestions are brought to my attention.
Since I make no charge for these things, I can't afford to send
updates to every software library and BBS which may be carrying
them. As of this writing, one place I do make an effort to keep
up to date is Nelson Ford's "Public (software) Library." The
address is:
The Public (software) Library
P.O. Box 35705
Houston, TX 77235-5705
Since the PsL is prompt both in updating their material and in
filling their orders, they're one place where you can be sure of
getting my latest efforts. It is not unethical to take my pro-
__ grams off a PsL disk and package them yourself. (It is unethical
and probably illegal to copy the whole PsL disk including other
programs and the PsL's own explanatory files and programs.)
Of course, people who send me useful suggestions and bug
reports are liable to be sent a copy of the fix (if I can make
one). They are also liable to be drafted into my Beta Testing
Division.
Programmer: R. N. Wisan, January, 1993
37 Clinton Street, Oneonta, NY, 13820
internet: wisanr@hartwick.edu
PrnSet 2.94 Page i
Contents Contents
1 What PrnSet is . . . . . . . . . . . . . . . . 1
2 Setting up: The Files . . . . . . . . . . . . . 1
3 Running PrnSet . . . . . . . . . . . . . . . . 3
3.1 The Interactive Mode . . . . . . . . . . . 3
3.1.1 Setting the Printer 4
3.1.2 Printing and Sending to Files 5
3.1.3 Stepping Briefly into DOS 6
3.2 The Command Line Mode . . . . . . . . . . 6
4 Making a Data File for Your Printer . . . . . . 8
4.1 Using Hex Numbers and Characters . . . . 10
4.2 Helpful Hints About Data Files . . . . . 11
4.3 Two Special Codes . . . . . . . . . . . 12
4.3.1 Printer Reset 12
4.3.2 Keyboard Entry on the Fly 13
5 Screen Colors and Other Things . . . . . . . 14
5.1 Screen Colors . . . . . . . . . . . . . 14
5.2 If You Need Black & White: . . . . . . . 15
5.3 Debugging Help . . . . . . . . . . . . . 15
Appendix A: Update History . . . . . . . . . . 17
Appendix B: About Updates . . . . . . . . . . . 21