Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uwmcsd1!nic.MR.NET!umn-cs!hall!blu From: blu@hall.cray.com (Brian Utterback) Newsgroups: comp.unix.questions Subject: Re: NEC LC-890 in hp emulator mode Message-ID: <8562@hall.cray.com> Date: 14 Aug 88 02:28:11 GMT References: <49764GL4@PSUVM> <589@philmds.UUCP> Reply-To: blu@hall.UUCP (Brian Utterback) Organization: Cray Research, Inc., Mendota Heights, MN Lines: 52 In article <589@philmds.UUCP> leo@philmds.UUCP (Leo de Wit) writes: :In article <49764GL4@PSUVM> GL4@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:&knG where n is the mode number (i.e. &k1G) is a single escape character. -- Brian Utterback |UUCP:{ihnp4!cray,sun!tundra}!hall!blu | "Aunt Pheobe, Cray Research Inc. |ARPA:blu%hall.cray.com@uc.msc.umn.edu | we looked like One Tara Blvd. #301 | | Smurfs!" Nashua NH. 03062 |Tele:(603) 888-3083 |