home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
cpm3
/
neutexec.lbr
/
NEUTEXEC.DQC
/
NEUTEXEC.DOC
Wrap
Text File
|
1986-04-22
|
19KB
|
505 lines
N E U T E X E C
Technical character generator for CP/M PLUS and Epson-compatible
dot-matrix printers
Version 1.0
USER MANUAL
(C) Copyright Walter D. Neumann, 1986
All rights reserved
Walter D. Neumann
1F Southway
Greenbelt MD 20770
(301) 345-7017
USER SUPPORTED SOFTWARE: SUGGESTED CONTRIBUTION $20
SEE APPENDIX FOR DETAILS
NEUTEXEC USER GUIDE Page 1
1. General description of the program.
NEUTEXEC is also available for IBM PC compatible computers under
the name NEUTECH.
NEUTEXEC is a memory-resident technical character generator for
CP/M Plus computers and for Epson printers or compatible equipment
(IBM Graphics printer etc.). It is designed to be invisible to
applications that do not specifically try to use it. Its effect is to
add a set of technical or other user-defined symbols to the set of fonts
of your printer and to make them easily accessible to application
programs (word-processors, etc.) which do wish to use them.
Individual characters or complete character sets can also be
"downloaded" to the program from the document being printed or from the
operating system.
The built-in character set consists of a Greek alphabet plus a set
of Gothic capitals plus a set of mathematical symbols, each one in a
regular (pica) size and in a compressed size. This character set can be
replaced (in whole or part) by the user. NEUTEXEC keeps track of whether
the printer is printing in compressed and/or wide mode and adjusts its
characters accordingly. Several copies of NEUTEXEC with different symbol
sets can be loaded and accessed at once. Each copy takes up about 3K of
memory.
The NEUTEXEC character set can be printed for reference by installing
NEUTEXEC and printing the file NEUCHARS.DOC.
NEUTEXEC works by watching the character stream sent to the printer
for its own one-character "attention command." When it sees its
attention command, it replaces the next character sent to the printer by
the corresponding character from an internal alphabet, using graphics
mode. A secondary one-character command is used to initiate downloading
a character to NEUTEXEC. The attention command and secondary command
both default to ^Q ("control-Q" or ASCII 11h) but can be changed by the
user (see section 2; this is necessary for using multiple copies of
NEUTEXEC or using it with programs that cannot send a "^Q" to the
printer). Thus, using the defaults, "^Qa" would print the NEUTEXEC
character corresponding to "a" (a greek "alpha") and "^Q^Qa" initiates
downloading a new character to NEUTEXEC to be printed by "^Qa".
NEUTEXEC must keep track of all printer commands being sent, since
if the NEUTEXEC attention command occurs as part of an Epson printer
command, it must be ignored by NEUTEXEC. For this reason the program is
relatively printer-specific. It is designed to work with any printer
that uses the Epson FX80 printer protocol or a subset of it (e.g.
earlier Epson printers, the IBM graphics printer, Centronics GLP, and
many others). NEUTEXEC will work with any printer that uses Epson
graphics commands, so long as the software never uses a non-FX printer
command containing a NEUTEXEC command character.
In the following, "^a" and "^s" will denote the NEUTEXEC attention
command character and secondary command character respectively. As
already described, the default is ^a = ^s = ^Q (ASCII 11h).
NEUTEXEC USER GUIDE Page 2
2. Loading and unloading the program.
NEUTEXEC is loaded into memory by running the program NEUTEXEC.EXE
(enter "NEUTEXEC" at the CP/M command prompt, or include it in your
PROFILE.SUB file). Once loaded, it remains resident in memory, taking
about 3K of memory space and can be unloaded only by rebooting.
The two NEUTEXEC command characters can be set to other values than
the default by adding a parameter on the command line when loading
NEUTEXEC . The format is "NEUTEXEC XXYY" where:
XX is the hex representation of the NEUTEXEC "attention character"
^a (default is XX = 11);
YY is the hex representation of the NEUTEXEC "secondary command
character" ^s (default is YY = 11).
NEUTEXEC will accept ANY value of XX and YY for ^a and ^s; if ^a is
also a printer command it will then always be intercepted by NEUTEXEC and
will be unavailable to the printer, so changes to the default should be
chosen with care (see Section 7).
3. Accessing NEUTEXEC.
Once NEUTEXEC is loaded, printing "^ax" will print the current
NEUTEXEC character corresponding to "x". Here "x" represents any
printable character other than <space>, ^a, or ^s. (If neither ^a or ^s
has been installed to a printable character, then only <space> is
excluded).
The character printed by "^ax" will be compressed and/or wide
according as the the printer is in compressed and/or wide mode.
(At present NEUTEXEC only changes character width on seeing one of
the width-change commands that is common to all Epson printers, namely
one of the 1-character commands or the <esc>W commands. Most software
uses only these, to ensure compatibility. The FX and later printers
have an additional command which should be used only if constant
NEUTEXEC character width is desired).
Printing "^a^sx" followed by a sequence of 12 hex bytes (7 bytes in
compressed mode) will download the character represented by this byte-
sequence to the NEUTEXEC character corresponding to "x"; see Section 4
for details. Again, "x" should be a printable character other than a
space, ^a, or ^s.
NEUTEXEC USER GUIDE Page 3
4. Downloading to Neutech
Printing "^a^sx" followed by a sequence of 12 hex bytes will send
nothing to the printer but will download the character represented by
this sequence to the NEUTEXEC character corresponding to "x". For
example, when using the defaults ^a = ^Q and ^s = ^Q, then printing
"^Q^Q/,FF,81,02,04,08,10,08,04,02,81,FF,00"
would download an extra-large "W" to the NEUTEXEC character corresponding
to "/". Characters other than 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F are
ignored until all 12 hex bytes have been received, so puncuation and
comments can be included for clarity. Thus the following download
commands have the same effect as the above example:
"^Q^Q/FF810204081008040281FF00"
"^Q^Q/: large W FF810204081008040281FF00" .
If NEUTEXEC is in compressed mode, then the character being
downloaded will be sent to NEUTEXEC's compressed symbol set, so only 7
hex bytes should be included in the command.
See your printer manual for an explanation of how a sequence of
bytes is interpreted as a sequence of vertical columns of eight dot
positions each to form a character.
5. Installing user fonts.
A file of "^a^sx" download commands can be printed at any time to
change NEUTEXEC's character set. For example, a command
PIP LST:=<filename>
can be included in a PROFILE.SUB file to change NEUTEXEC's default set
on start-up. Two files, "NEUCHREG.QQ" and "NEUCHCMP.QQ," which can be
printed to restore the regular and compressed default character sets in
a default installation of NEUTEXEC, are included and can be edited as
desired. They can also be combined into one file which restores both
character sets at once.
6. Using multiple copies of NEUTEXEC.
Several copies of NEUTEXEC can be loaded and used simultaneously
with one printer by defining different attention characters for each of
them. Each can be loaded with a different symbol set as described in
Section 5.
Two (or more) copies of NEUTEXEC can also share the SAME attention
character if the secondary command ^s is NOT equal to ^a. In this case,
the copy loaded last acts as usual, but printing "^a^a" sends a single
"^a" to the previously installed NEUTEXEC which will therefore act as if
"^a^a" is its attention command (if there are three copies then the
first loaded one would have attention command "^a^a^a^a", and so on).
NEUTEXEC USER GUIDE Page 4
This technique is particularly useful if NEUTEXEC is to be used with
a word-processor or other user program which limits the number of
different non-printable characters that can be embedded in text to be
printed. A typical installation of two copies of NEUTEXEC might use ^a =
^Q and ^s = | (ASCII 7Ch) in both. Then the character corresponding to
"|" is unavailable in both copies of NEUTEXEC, but the only non-printing
symbol that need be sent by user software is "^Q". If user software
cannot send any non-printing symbols, one might replace "^Q" by "\"
(ASCII 5Ch) in this installation.
7. Recommended installation.
It is recommended that the default installation be used unless
there is good reason to do otherwise. As already pointed out,
installing a value for ^a which is a printer command (e.g. ^a = <esc> =
1Bh, ^a = <SI> = 0Fh, etc.) will cause problems. Choosing a printable
value for ^a is necessary if your software cannot send non-printing
characters in text, but it disables the corresponding NEUTEXEC character
(the character ^a itself can still be sent to the printer by using
"^a^a", unless ^a = ^s). If only one copy of NEUTEXEC is used at once,
then any choice of ^s is safe, but choosing a printable value for ^s
disables the corresponding NEUTEXEC character. If more than one copy of
NEUTEXEC will be used at once, then ^s should NOT be a printer command
since this would confuse the subsequently installed copies of NEUTEXEC.
The default ^Q for ^a was chosen for two reasons:
(i) ^Q is the first of the Wordstar "user commands" and thus gives
particularly easy compatibility with Wordstar. Install the ^Q user
command (USER1) in Wordstar to send a ^Q to the printer. ASCII files
containing ^Q commands will then be compatible between Wordstar and
other print utilities (e.g. "PIP LST:=<filename>"). Wordstar counts ^Q
as being of zero length, so line-length count and formatting by Wordstar
remains correct.
(ii) ^Q IS in fact a printer command on later Epson printers than
the MX -- it is the "Printer enable" command. Since there is no reason
ever to DISable the printer, this command is never needed and never used
by standard software. Since it is unlikely to be used for other
purposes in future printer upgrades, future compatibility is probable.
Currently unused characters such as ASCII 00h to 06h and 15h to 19h are
also possible choices for ^a but have less certain future compatibility.
8. Using NEUTEXEC with Wordstar.
I originally wrote NEUTEXEC for my own use with Wordstar. I was
encouraged by friends who found it useful to distribute it more widely.
The following is the installation of Wordstar which I use with NEUTEXEC
and an Epson MX80 or a Centronics GLP. This installation may be done
from the standard menus in Micropro's installation program Winstall
which comes with Wordstar. A simpler installation, if your printer
allows it, is to install Wordstar to use reverse and forward half line
feeds to enable sub- and superscripting.
NEUTEXEC USER GUIDE Page 5
I install user key ^Q to send a ^Q (ASCII 11 hex or 17 decimal),
the user characters ^W to do "wide print to end of line" (ASCII 0Eh), ^E
as Escape (1Bh), ^R as 00h. I install the width commands ^A and ^N to
start and end compressed mode (0Fh and 12h) and the ribbon color toggle
^Y to start and end italics (1Bh,04h and 1Bh,05h respectively).
Finally, Wordstar's sub- and super-scripts are enabled by installing
half line feed as 0Dh,0Ah and full line feed as 0Dh,0Ah,0Dh,0Ah and
installing the printer initialisation sequence of 1Bh,41h,06h to set
half line feed at 1/12 inches. A termination sequence of 1Bh,40h should
then be installed to reset the printer after use. I double space normal
text and use single spacing for special effects.
This installation permits sending most Epson commands to the
printer. The one I use most often is ^EE to start emphasized print.
Line height can be changed to some extent using ^E3-commands; for
example, with the above installation of ^A and ^N, printing
"^A^E3^N^A^N" returns to the default line height of 1/12 inch per half
line (the extra ^A's and ^N are needed to make sure Wordstar sends the
"^N" after the "3"; Wordstar is smart enough not to act on a normal
width command "^N" if it thinks it is not in alternate width). Epson's
built in sub- and super-scripts have vertical alignment problems on
early Epson printers and are superfluous with this set-up, though they
are available for use if desired (e.g. ^ES^R for subscripts).
Wordstar is clever at knowing how to handle control characters in
conjunction with sub- and super-scripting but it has trouble with
backspacing at the same time. This is not often a problem, but it will
surface if you want simultaneous sub- and super-scripts using special
characters (e.g. to create a large integral sign using the NEUTEXEC
characters for ;, |, and :). However, it can be avoided in several
ways, for instance by installing "overprinting" in the installation menu
to use backspacing (08h -- not available on the IBM graphics printer).
Wordstar then uses backspacing also for underlining and boldface, which
is a bit slow, but no matter. The Epson MX has a bug: it cannot
backspace back over anything printed in graphics mode. Again rarely a
problem, and usually avoidable by interchanging the order of characters
being overprinted. This bug appears to be fixed in later printers.
If you have modified Wordstar with ANYCHAR -- a modification to
allow sending any code to the printer, then ^R must be set to send FFh.
9. Error handling.
NEUTEXEC makes certain assumptions to recover from user errors: if
"^a" or "^a^s" precedes a non-printing character, then the "^a" or
"^a^s" is ignored; the same is true if "^a" or "^a^s" precedes a "^a"
(unless ^a = ^s).
If NEUTEXEC appears to behave erratically, check the file that you
are printing: the most common cause is an accidental "^a^sx", making
NEUTEXEC swallow everything until the download it thinks you wanted is
completed. For example, editing in Wordstar with control-character
display off can put control characters in unusual places: make sure
control-character display is on if you are inserting or deleting text or
doing a search-and-replace.
NEUTEXEC USER GUIDE Page 6
10. Incompatibilities.
Some Epson printers with NLQ capability seem unable to correctly
mix NLQ printing and graphics on one line. Since NEUTEXEC prints in
graphics mode, NEUTEXEC characters cannot mix with NLQ mode in such
cases. The Centronics GLP does not have this problem.
If a memory-resident print spooler is used, it should be loaded
after NEUTEXEC. This is for two reasons: it optimizes use of the
spooler's buffer, and some spoolers will not work correctly if any other
memory resident program which captures the printer interrupt is loaded
over them.
No incompatibility of NEUTEXEC with other software is known to date;
if you find any, please inform me, and I will try to fix it. However,
programs such as Microsoft Basic (CP/M version), which do not use standard
operating system calls to access the printer, will bypass NEUTEXEC.
11. Design considerations.
NEUTEXEC is designed for printing occasional special characters
in regular text. It puts the printer into graphics mode for each
such character. If several special characters occur in sequence,
this is much slower than if NEUTEXEC buffered them and then printed
them all at once in graphics mode. A buffered version will be made
available if there is sufficient demand.
NEUTEXEC intentionally does not use the download capability of the
FX and other Epson printers. Such use would make NEUTEXEC incompatible
with other programs which simultaniously use this feature. Moreover,
downloaded characters have marginally lower quality than NEUTEXEC
characters, since they may not have adjacent horizontal dots, and they
are lost if the printer is turned off.
NEUTEXEC USER GUIDE Page 7
APPENDIX: USER SUPPORTED SOFTWARE
Permission to copy:
Individuals may copy this software and documentation for their own
use or to share with others, so long as no price is charged. Computer
clubs and other non-profit organizations may copy this software and
documentation and share it with their members so long the software and
documentation are distributed unmodified and together, no price is
charged other than cost of distribution, and members are encouraged to
support the user-supported concept with their donations.
If you find this program useful you are encouraged to make a $20
contribution. You will thereby become a registered user. This will
entitle you to notice of updates and other information. Moreover, if enough
users contribute useful NEUTEXEC character sets, I will distribute them
to registered users for a small charge to cover materials, handling, and
modest honorariums to the contributors.
If you send a character set, please do so in the format of the
files NEUCHREG.QQ and NEUCHCMP.QQ and include a printout of the file
NEUCHARS.DOC with your characters installed.
Disclaimer:
In no event will the author be liable to you for any damages of any
kind arising out of the use or inability to use this program.
The original version of NEUTEXEC is a MS-DOS program called NEUTECH
designed for the IBM PC and compatibles. It is available on request.
Walter Neumann January, 1986
1F Southway
Greenbelt, MD 20770
(301) 345-7017