[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange problem (Magic window)



In article <DJMGyy.4sD.0.queen@torfree.net> bo144@torfree.net (David Arnett)
writes:
>I don't expect a fix, but perhaps someone can clear my curiosity with a 
>simple explanation:
>
>I'll get right to the problem which I had to track down.  The Magic 
>Window would not print to the printer, only to the screen, but this 
>problem only occurs when all three of the following conditions exist at 
>the same time:
>
>1) Enhanced IIe.  No problem with unenhanced IIe.
>2) 80 column mode.  No problem in 40 column mode.
>3) File to be printed begins with ESC $15.  This tells my printer not
>   to print a line feed with a CR.  No problem if no control codes
>   present.
>
>It's the fact that all three conditions need to be present that is the 
>most puzzling.  The problem isn't major; just switch to 40 col. before 
>printing.  I'm more curious than anything. (BTW Magic Window is an old 
>word processor that has some advantages over appleworks)

The following guess doesn't explain condition 1 from your list; it shouldn't
matter whether or not the IIe is enhanced, as long as they both have
80-column cards.  Unless perhaps the two computers are using different
printer interfaces--one configured to echo printed characters to the screen,
and one configured not to do so.

I'm presuming that when you say "ESC $15", you're referring to the character
whose ASCII code is $15?

It's probably not a coincidence that ASCII code $15 happens to be the 80-column
firmware's code to turn off 80 column mode and shut down.  In the process
of shutting down the 80-column firmware, it does the equivalent of a PR#0
command.

So here's the theoretical scenario:

     1.  Magic Window initializes the printer, by the traditional PR#1
         method.
     2.  Magic Window sends the first character, ESC, to the printer
         interface.  The printer interface firmware sends it along to the
         printer, and also echos it to the screen.
     3.  The 80-column firmware picks up the echoed ESC, and responds by
         enabling MouseText mode.  This is probably harmless.
     4.  Magic Window sends the second character, $15, to the printer
         interface.  The firmware sends it to the printer and the screen.
     5.  The 80-column firmware picks up the echoed $15, and responds by
         switching to 40-column mode, and doing an implicit PR#0.  This
         takes the printer "out of the loop," so that all subsequent
         characters are printed only to the 40-column screen.

Suggested cure:  Try to find a way to prevent your printer card from
echoing characters to the screen.  Sometimes a command like "control-I 80N"
at the top of the file to be printed does the trick.

                    - Neil Parker
-- 
Neil Parker, nparker@{cie-2,cie}.uoregon.edu, http://cie-2.uoregon.edu/~nparker

                     "Bad move, Neil!"  -- The Tick