[comp.lang.postscript] NEC LC-890 printer and serial input

glenn@heaven.woodside.ca.us (Glenn Reid) (03/08/90)

In article <1049@chinacat.Lonestar.ORG> woody@chinacat.Lonestar.ORG (Woodrow Baker) writes:
|In article <153@heaven.woodside.ca.us>, glenn@heaven.woodside.ca.us (Glenn Reid) writes:
|| In article <1035@chinacat.Lonestar.ORG> woody@chinacat.Lonestar.ORG (Woodrow Baker) writes:
|| 
|| |Remember that the NEC 890 throws the comments away at the
|| |serial input routine.  That is, if you test a line for a
|| |comment, you will never see it on the NEC 890.
|| 
|| Nonsense.  The language scanner throws away comments, not the serial
|| processor.  If you read the input stream as DATA (as with "readline"
|| or "readstring"), you will get every single byte, including comments.
|
|Sorry about this..but...I recently had to deal with a client with a local
|printshop. This lady has a NEC-890.  She had just purchased ALL of
|Cassidy and Greene's fonts.  Nearly $1000.00.  She could not get them to
|work.  What would happen was this..The first time you downloaded a font
|it would work.  After that if you downloaded ANY other Cassidy & Greene
|font it failed.  It would hang.  I finaly traced the problem to the
|following.  There was a preamble in the font.  It was ended with aline
|like
|%%%%%% end preamble
|In order to avoid haveing to download the preamble the fonts would scan
|the incoming stream, throwing away everything until it got to the
|%%%%%% string.  This had the effect of throwing the preamble out.  Why
|they did this, is anyones guess.  What happened was this:  on a QMS
|or Apple printer, you could download fonts all day long, and everything
|worked fine.  BUT on the NEC-890 the %%%%%%% line never was found.  Infact
|NONE of the comment lines got through.  The preamble code would not find them
|and just kept throwing the font away.  The preamble code first of all
|checked for it's self in memory.  if it was not there, then it skipped
|this routine and downloaded the font.  IF this sounds strange, it is.
|I finaly worked around it.  This has been reported to C&G, and I
|reported it to Adobe via usenet.  I got a message back to the effect that
|the "bug report" (even though I didn't call it a bug) had been passed on
|to the appropriate person.
|
|As unbelievable as it sounds, it's true.
|Glenn, please check things out first before labeling things as nonsense.
|I can provide verification of this problem.  It DOES exist.
|Cheers
|Woody
|
|P.S.  As far as I know, C&G has fixed the problem on thier end, though I
|could not swear to it.

I can't figure out how to edit this discussion down to save bandwidth
without making it hard to follow, so I hope you will all forgive me for
including the whole mess.

What you have described is a program (Cassady & Green font) that doesn't
work properly on the NEC LC-890.  What you have not done is to convince
me that the NEC LC-890 throws away comments in the serial I/O processor,
which is what you said in the first place.

If that were true, a large number of other things would not work,
including emulators, printing some images, and other things that read
bytes directly from the input stream.

A far more likely explanation is that the font relied on a subtlety of
serial communications that may not have been quite the same on that
printer.  For example, if it counted bytes, and it was downloaded from
a computer that appended both CR and LF to the end of each line, then
it would not work correctly.  Also, a few of the very old printers
only accepted LF, not CR, as end-of-line terminators, so if it was
an old printer and the program used "readline", it also might not work.

I would find it very hard to believe that anyone would have changed
the LC-890 to have the serial driver strip out comments, since that
would be
	a) a departure from the language specification
	b) a fair amount of tricky work

Anyway, since I don't have an LC-890 there's no way for me to check,
but I used to use one every day at Adobe and this problem did not
arise.

Maybe somebody from Adobe can confirm this.

Glenn

P.S. Another thought is for someone with an LC-890 to try the following
program and tell us if it prints anything.  Note that this is a
brain-dead emulator and it will print one long line instead of printing
the multiple lines that are in the input stream.  However, if it prints
anything at all, then the printer is working correctly and does not
strip comments out of the input stream.  If it does not print anything
at all, then the jury is still out, because I haven't tested this program
very extensively :-)

%!
% printing comments

/buff 128 string def
/emulate1 { %def
	{ %loop
		currentfile buff readstring
		exch show not { exit } if
	} loop
	showpage
} bind def
36 700 moveto
/Courier findfont 12 scalefont setfont
emulate1
% a comment
% another comment
%%EndComments
%%%%%%%% comment
%%EOF

jalsop@seachg.UUCP (John Alsop) (03/09/90)

In article <154@heaven.woodside.ca.us> glenn@heaven.UUCP (Glenn Reid) writes:
>P.S. Another thought is for someone with an LC-890 to try the following
>program and tell us if it prints anything.  Note that this is a
>brain-dead emulator and it will print one long line instead of printing

On my LC-890, the example program prints one long line, as predicted by
Glenn.


-- 
John Alsop

Sea Change Corporation
1100 Central Parkway W., Suite 38
Mississauga, Ontario, Canada L5C 4E5
Tel: 416-272-3881 Fax: 416-272-1555
UUCP: ...!uunet!attcan!darkover!seachg!jalsop

jipping@smaug.cs.hope.edu (Mike &) (03/10/90)

From article <154@heaven.woodside.ca.us>, by glenn@heaven.woodside.ca.us (Glenn Reid):
> 
> P.S. Another thought is for someone with an LC-890 to try the following
> program and tell us if it prints anything.  Note that this is a
> brain-dead emulator and it will print one long line instead of printing
> the multiple lines that are in the input stream.  However, if it prints
> anything at all, then the printer is working correctly and does not
> strip comments out of the input stream.  If it does not print anything
> at all, then the jury is still out, because I haven't tested this program
> very extensively :-)
     [ program code deleted ]

On our LC-890, the code produced one long line of data -- all comments.
I guess it doesn't strip comments out of the input stram after all...

      Mike Jipping                        Internet: jipping@cs.hope.edu
      Hope College                          BITNET: JIPPING@HOPE
      Department of Computer Science         Voice: Hey!

--
      Mike Jipping                        Internet: jipping@cs.hope.edu
      Hope College                          BITNET: JIPPING@HOPE
      Department of Computer Science         Voice: Hey!

woody@chinacat.Lonestar.ORG (Woody Baker @ Eagle Signal) (03/12/90)

I just got back from a long weekend at a flint knappers convention (the art
of making stone tools).  I have noticed the test program and the results.
I have gone and gotten a copy of the font in question and edited it highly
and will stick the file out here.  I took out all the character shapes
except for the ! mark.  Basicaly the core of the problem is something like 


Casa1 known
	{
		currentfile (   ) readstring
		(%%%) eq
			{
			exit
			}
			{
			pop
			} ifelse
	} if

	.
	.
	.
	.
%%%

or something similar.  I'll put the real thing out here later.  The above
fragment is just out of my memory after looking at the font lastnight,
so it is probably mostly right.

Cheers
Woody
r