home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
print
/
nec95
/
readme.txt
< prev
Wrap
Text File
|
1994-02-03
|
3KB
|
90 lines
NEC95 - A mode switching device monitor for NEC 95 printers under OS/2
by John W. Cocula
Who needs it
------------
To be useful, this program requires:
- OS/2
- a NEC 95 printer
- two physical parallel ports, one of which is not in use, unless
the printer is connected to a serial port, in which case one
not-in-use parallel port is needed (explained below)
Why it's useful
---------------
I wrote this when I got my new NEC SilentWriter Model 95. I bought the
printer under the mistaken impression that the printer automatically sensed
the printer language from the data stream and switched to the correct mode
automatically. Instead, they gave me some steenking DOS software that did
it, totally useless to us OS/2 users.
Under OS/2 2.0, I defined two printer objects: one on LPT1 for a PostScript
printer, and another on LPT2 for a LaserJet III. With the device monitor
in the background, the printer mode switching is automatic, not requiring
any manual intervention.
How it works
------------
Have the printer power-on to PostScript mode. When data is sent to a monitored
parallel port, it sends a sequence to the target file or device which switches
to LJ mode, sends the print job, and switches back to PostScript mode. Pretty
simple.
Since the only way to insert one's code into the printer's data stream is via
a parallel port device monitor, an unused parallel port must be specified as
the <source> parameter. There could actually be a printer attached to this
port, but as long as this monitor is running, no data will ever get to this
printer.
Syntax
------
detach NEC95 <source> <target>
where
<source> is a parallel port to which nothing is attached
<target> is the target file or device to which to send printer data
For example:
DETACH NEC95 LPT2 LPT1
If you have an unused LPT2 and the printer is really connected to LPT1,
this will catch all LJ-type data going to LPT2, wrap it in the command
sequences to switch to/from LJ mode, and send it to LPT1.
Restrictions
------------
1. It takes awhile to switch to/from different modes all the time. It would
be nice to switch only when needed. This would require two device monitors,
however.
2. Something appears to hang briefly when ending a LaserJet job, but only
sometimes. Perhaps the monitor packets aren't being moved correctly?
For these reasons and others, I've included the source file NEC95.C, to see
if anyone is interested in improving this little utility. If so, please post
it for others (including myself) to take advantage of. I compile this file
simply by 'cl nec95.c' using Microsoft C 6.00a.
Disclaimer of warranties
------------------------
This program is freeware. It may be distributed without payment to me,
as long as nothing is charged for its distribution to others. This program
and accompanying information is provided AS IS, without warranty either
express or implied, including but not limited to implied warranties of
merchantability and fitness for a particular purpose. In no event shall
I be held liable for any damages whatsoever arising out of the use of or
inability to use this program.
John W. Cocula
May 19, 1992