[net.micro.amiga] ESC sequences to turn on NLQ

waycott@mot.UUCP (06/14/86)

I am trying to send an ESC sequence to set up letter qual mode
when I send the sequence specified in ROM man  page 3-199
that is <ESC>[2"z  it just prints the z and stays in draft mode.
What am I doing wrong?

Thanks for checking on this in advance!

Bob Leivian mot!waycott  602-820-6859

-- 
John Waycott, Motorola Microsystems, Tempe, AZ, (602) 438-3164
{seismo!terak, trwrb!flkvax, utzoo!mnetor, ihnp4, attunix}!mot!waycott
oakhill!mot!waycott@ut-sally.ARPA

carolyn@cbmvax.cbm.UUCP (Carolyn Scheppner) (06/16/86)

In article <533@mot.UUCP> waycott@mot.UUCP (John Waycott) writes:
>
>I am trying to send an ESC sequence to set up letter qual mode
>when I send the sequence specified in ROM man  page 3-199
>that is <ESC>[2"z  it just prints the z and stays in draft mode.
>What am I doing wrong?
>

   If you are using AmigaBasic, I just posted an example that works fine
on my printer (MPS-1000).  It uses prt:.  This example is similar.

OPEN "prt:" FOR OUTPUT AS #4
esc$ = CHR$(27)+"["
den2$ = esc$+"2"+chr$(34)+"z"
PRINT#4, den2$;"hello"    'Prints hello in NLQ
CLOSE 4

   I use prt: because LPT1: (used by LPRINT) eats initial sequences.

   If you are using C, then you are either doing something wrong or
your printer doesn't support NLQ.  Make sure you have the correct
printer-specific driver selected in Preferences.  It is the driver
which converts the ISO sequences to printer-specific ones.

   You can test the sequences from CLI.  Try typing the following.
Everything typed between the first and last line will go to prt:.
(Note: <RET> is the return key, <ESC> is the escape key)

copy * to prt:<RET>     
<ESC>[2"zhello<RET>
<ESC>[1"zhello<RET>
CTRL-\                  (Note - Hold CTRL and type \)

   With my MPS-1000, this prints "hello" twice, first in NLQ then normally.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Carolyn Scheppner -- CBM   >>Amiga Technical Support<<
                     UUCP  ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn 
                     PHONE 215-431-9180
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

waycott@mot.UUCP (06/20/86)

> In article <533@mot.UUCP> waycott@mot.UUCP (John Waycott) writes:
> > (actually Bob Leivian -- a guest on Johns account)

> >I am trying to send an ESC sequence to set up letter qual mode
> >when I send the sequence specified in ROM man  page 3-199
> >that is <ESC>[2"z  it just prints the z and stays in draft mode.
> >What am I doing wrong?
> 
>    I use prt: because LPT1: (used by LPRINT) eats initial sequences.

Aha,  the line eater strikes again. Thanks for the hint Carolyn
I was uing Aztec C of the form:
	fh = fopen("prt:", "w");
	fputs("\x1b[2\"z", fh);

but I found out that if I use:
	fputs("some data for the line eater\x1b[2\"z", fh);

it worked!

I did some experimenting and found out that nulls didn't satisfy the old
line eaters (or should I say ESC eater) appetite but linefeeds did.
So be warned -- and Amiga printer driver guru's take note!

BTW my printer program now works and if enough people are interested
I can post it.  It prints multiple files in background with wildcard
selection and options for line numbers, headers, non-printing chars and
other features.  For example:
 pr -h *.c *.h -l manpage

will print all c and h files with headers and the manpage in letter quality mode
-- thanks for the help and send mail to Bob Leivian 
guest on mot!waycott
-- 
John Waycott, Motorola Microsystems, Tempe, AZ, (602) 438-3164
{seismo!terak, trwrb!flkvax, utzoo!mnetor, ihnp4, attunix}!mot!waycott
oakhill!mot!waycott@ut-sally.ARPA