NEC LC-890 in hp emulator mode
Brian Utterback
blu at hall.cray.com
Sun Aug 14 12:28:11 AEST 1988
In article <589 at philmds.UUCP> leo at philmds.UUCP (Leo de Wit) writes:
:In article <49764GL4 at PSUVM> GL4 at PSUVM.BITNET writes:
:|i have an NEC LC-890 hooked up to a unix machine (Celerity) running
:|BSD 4.2 ... the NEC has a mode to emulate an HP laserjet+, but i can't
:|get it to work ... if you feed it a file that looks like:
:|
:| whaa
:| whaa
:| whaa
:|
:|it will print out:
:|
:| whaa
:| whaa
:| whaa
:|
:
:No, seriously, have you tried setting a dipswitch, something like 'CR after
:LF' or 'CR after buffer print'? My printer had one.
:Not getting the carriage return? Unix text files use linefeed as the line
:terminator, not CR/LF or LF/CR. So there IS no carriage return. You have
:to generate it (hardware, software, by the printer, by the driver, by your
:program, whatever is the most appropriate).
:An alternative could be to do it in software, using a filter (not recommended).
:But look for that dipswitch first.
Well, not exactly a dipswitch, but you have put your finger on the problem.
The HP LaserJet II has three settings for line termination.
The first (mode 0) is the default. This treats CR, LF and FF as there literal
interpretation. If it gets a LF, then it line feeds, if it gets a CR it
carriage returns and if it gets FF it ejects the page.
The second mode (mode 1) does the following mapping: CR->CRLF LF->LF FF->FF.
This allows the system to print correctly, and allows programs that use
LF to work.
Mode 2 maps like this: CR->CR, LF->CRLF FF->CRFF
And finally, mode 3 is like this: CR->CRLF, LF->CRLF, FF->CRFF. I use this
mode.
The command to set the modes is:
<esc>&knG where n is the mode number (i.e. <esc>&k1G)
<esc> is a single escape character.
--
Brian Utterback |UUCP:{ihnp4!cray,sun!tundra}!hall!blu | "Aunt Pheobe,
Cray Research Inc. |ARPA:blu%hall.cray.com at uc.msc.umn.edu | we looked like
One Tara Blvd. #301 | | Smurfs!"
Nashua NH. 03062 |Tele:(603) 888-3083 |
More information about the Comp.unix.questions
mailing list