[comp.sys.apple2] Grumble, grumble, grumble. . .

WKF2298@RITVAX.ISC.RIT.EDU (Wonko the Sane) (12/04/90)

	A friend and I have been working on an AppleSoft BASIC program
which has turned out to be much more trouble than it is worth.

	Essentially, it is doing some graphic work on the ImageWriter II,
but after we issue the command to accept "the following data" as a graphic
line, at certain times, midway trough a line, it will stop the program.
	This is completely, completely, completely bizarre because the program
if an infinite loop. . . there is absolutely no way whatsoever that the program
can end.
	Finally we traced the problem down to the actual print statement to the
printer. . . it prints a character and then kindly leaves us. . . still in
PR#1 mode. . . outside in BASIC.
	I was quite certain that it was probably just some CTRL characters that
were being misinterpreted through the PRINT statement, so I set off to write
a short, little machine language program which would bypass the need for the
use of print (therefor preventing the interpretations of the PRINT command for
ProDOS commands).
	Well, it wasn't that easy though.  My machine language program was
nothing more than to load the accumulator and call COUT.  Failure!  Although
we are in PR#1. . . it ignores that and prints to the screen.  So, I then
learned about memory locations $36 and $37 which store the output hooks.
	Okay, so I took the address found at $C107. . . which is supposed to
be the location of the output for slot 1 (Cx07) and plugged it into $36/$37.
	No help!  When I check those locations, they are always set back to
their original value. . . it never stays set to my new value.

	Errrrrrrr. . . if anyone could give any advice on how I can get
around this problem, I would be forever in your debt!  It has been a nightmare!
	All I need is a way to pass a value to the printer without "BASIC"
interpreting it.

	Thanks in advance.

						William K. Fry
						wkf2298@ritvax.isc.rit.edu

twdorr01@ulkyvx.BITNET (ThomasD) (12/05/90)

In some article WKF2298@RITVAX.ISC.RIT.EDU (Wonko the Sane) writes:
>       Okay, so I took the address found at $C107. . . which is supposed to
>be the location of the output for slot 1 (Cx07) and plugged it into $36/$37.
>       No help!  When I check those locations, they are always set back to
>their original value. . . it never stays set to my new value.

I don't know if this is going to help or not, but I used to mess around with
changing that stuff too and quickly learned that under ProDOS (I assume that's
what you're using), any changes made to $36 and $37 by anything other than
ProDOS itself are never really made.  The reason (I guess.  I could never find
docs on it) is that ProDOS keeps it's own location for that stuff and
consistantly changes $36/$37 to contain those other values.  After a little
disassembly I found the locations to be like $BE38/$BE39.  I can't remember
exactly for sure, but it's somewhere around there.  And immediately following
that is the values that get placed into $38/$39.  Let me know if this helps.

ThomasD

fadden@cory.Berkeley.EDU (Andy McFadden) (12/05/90)

In article <9012050038.AA19541@lilac.berkeley.edu> twdorr01@ulkyvx.BITNET (ThomasD) writes:
>In some article WKF2298@RITVAX.ISC.RIT.EDU (Wonko the Sane) writes:
>>       No help!  When I check those locations, they are always set back to
>>their original value. . . it never stays set to my new value.
>
>I don't know if this is going to help or not, but I used to mess around with
>changing that stuff too and quickly learned that under ProDOS (I assume that's
>what you're using), any changes made to $36 and $37 by anything other than
>ProDOS itself are never really made.

Try "PR#a$c107"

>ThomasD

-- 
fadden@cory.berkeley.edu (Andy McFadden)
..!ucbvax!cory!fadden
fadden@hermes.berkeley.edu (when cory throws up)