[comp.sys.ibm.pc] Changing CR/LF to CR on printer output

mikej@lilink.com (Michael R. Johnston) (02/21/90)

I have some printers here locally that I used to use with a TRS80 computer.
These printers ASSUME a linefeed when they see a carraige return. Consequently
when I plug them into a PC and try to print everything is double spaced. I.E
the printer sees the CR and does a CR/LF and then it sees an LF again and does
another linefeed. How can I change the system so it knows NOT to send the extra
line feed? It is not possible to reconfigure the printer. Do I need to write 
a driver?
-- 
Michael R. Johnston                   mikej@lilink.com 
Lilink Communications                 rutgers!lilink!mikej 
"Affordable Unix Solutions"           (516) 285-4148

acm@grendal.Sun.COM (Andrew MacRae) (02/22/90)

In article <1990Feb21.122448.22508@lilink.com> mikej@lilink.com (Michael R. Johnston) writes:
>I have some printers here locally that I used to use with a TRS80 computer.
>These printers ASSUME a linefeed when they see a carraige return. Consequently
>when I plug them into a PC and try to print everything is double spaced. I.E
>the printer sees the CR and does a CR/LF and then it sees an LF again and does
>another linefeed. How can I change the system so it knows NOT to send the extra
>line feed? It is not possible to reconfigure the printer. Do I need to write 
>a driver?

(Assuming you are talking about a parallel printer port...)

I had to do this about four years ago.  I had an Apple IIe, an Atari 800, and
an IBM clone all hooked up to a switch box.  In order to defeat the extra
linefeed I had to ground one of the pins.  I don't have a Centronics pinout
nearby, but as I recall it was pretty plain as to which pin needed grounding
from the descriptions given.  (The pin is called something like 'LineFeed
Signal'.)

						Andrew MacRae

crmeyer@voodoo.ucsb.edu (02/22/90)

In article <1990Feb21.122448.22508@lilink.com>, mikej@lilink.com (Michael R. Johnston) writes...
>I have some printers here locally that I used to use with a TRS80 computer.
>These printers ASSUME a linefeed when they see a carraige return...

Most older Radio Shack printers I have seen are dip switch configurable for
either assuming a LF with a CR or not.

toma@tekgvs.LABS.TEK.COM (Tom Almy) (02/23/90)

In article <1990Feb21.122448.22508@lilink.com> mikej@lilink.com (Michael R. Johnston) writes:
>I have some printers here locally that I used to use with a TRS80 computer.
>These printers ASSUME a linefeed when they see a carraige return. Consequently
>when I plug them into a PC and try to print everything is double spaced.

For the Tandy printers which did not have a dip switch for this, the following
small TSR can be used:
begin 666 printer.com
MZ0@`$`(`````"@"\FO_'!@4!F/^]_O^)+@<!_.A+`+@`3,TA``````CD=1H)
MTG46/`IU#BZ`/GX`#74&HGX`,.3/+J)^`"[_+H``7EA:6QZ.V[0ES2$?_^:T
M-<TAB=B,P\.Z"P"X`#'-(>A5`!)05%(Q(&%U=&\@;&EN9F5E9'/H40#H/``+
M0GD@5&]M($%L;7GH/P"X%P#HOO^C)`&)'B8!NB0!4KJ``%*Z)P!2Z%$`C,A0
MNH0`4KH7`%+HC/_IH/];B@<PY$-34`'#6%I3B=/I(0"X#0#H"0"X"@#I`P`!
M``"BX@&T0+D!`+KB`8L>X`'-(<.)P8G:BQ[@`;1`S2'#6UE?7N,&C-B.P/.D
"_^.B
`
end

This will work for all programs which use the BIOS for printing.

Tom Almy
toma@tekgvs.labs.tek.com
Standard Disclaimers Apply

miller@b-mrda.ca.boeing.com (Mark Miller) (02/24/90)

Michael:
	Most printers have either an escape sequence (a code sent to the
printer) or a switch that will tell the printer whether or not to print a 
linefeed when a carriage return is recieved. In addition, most word 
processors or print programs can be told to send a CR only or a CR/LF 
combination. It would surprise me if you had to write some sort of 
printer driver, but if you do, simply send the escape code to initialize
the printer and set it to the proper CR/LF mode before the file is printed.


======================================================================
Mark R. Miller                     +    Disclaimer: Opinions expressed  
Boeing Commercial Airplane Co.     +    are mine and mine alone, and    
Seattle, WA                        +    not necessarily those of my     
Internet: miller@b-mrda.boeing.com +    employer.                       
Voicenet: (206) 237-0960           +                                   
                                   +       +++ Phillipians 4:13 +++    
======================================================================

davis@rm1.UUCP (Gary A. Davis) (02/27/90)

From article <1990Feb21.122448.22508@lilink.com>, by mikej@lilink.com (Michael R. Johnston):
> I have some printers here locally that I used to use with a TRS80 computer.
> These printers ASSUME a linefeed when they see a carraige return.

Yes, I have the same problem. I use an Epson MX80 and have to flip the
toggle dip switch that I can (with difficulty) reach thru the back
using a pen. In general, I leave it set up for the PC and have
modified some of my CoCo programs to ask how the printer is set up and
if in IBM mode, it sends the LF.

It is interesting that the printer supports either case but that
neither operating system (MS-DOS, RS-DOS) does. On the other hand,
when running OS9 on the CoCo, I can specify that the printer port is
in IBM mode (like stty on UNIX), so OS9 software does not have to
change.

I haven't been using MS-DOS for very long so maybe there is a way to
tell the printer driver to drop LFs when paired with CR.

Gary

-- 
  Gary A. Davis
  Racal-Milgo, P.O. Box 407044, Fort Lauderdale, Fl 33340, (305) 476-4393

  {{mailrus,gatech}!uflorida,ucf-cs}!novavax!rm1!davis