[comp.sys.apple] RESCUE SQUAD

patth@dasys1.UUCP (Patt Haring) (09/03/87)

RESCUE SQUAD

by

Gary B. Little


PRINTER REFERENCE

Q.  Do you know of any reference book that has a listing of the
commands that work with various printers and printer-interface
cards?  I need this information so that the graphs and charts
created by physics programs I develop for the local high school
can print out properly with the many printer configurations
the students use.

						Phil Southworth
						Florence, WI


A.  There is a series of just such books, The Programmers'
Handbook of Computer Printer Commands (Volumes I, II, and III),
and it's available from Cardinal Point Inc., P. O. Box 596,
Ellettsville, IN  47429 ([812] 876-7811).  Even with the book
however, you're going to have a hard time testing the seemingly
infinite number of configurations you might encounter.  A
convenient alternative is to insist that the school invest in
The Printographer (Roger Wagner Publishing, 10761 Woodside
Avenue, Suite E, Santee, CA  92071; [619] 562-3670).  This nifty
little program works with hundreds of printer configurations, and
you can use it to print graphic and text images in a variety of
convenient formats.


APPLESOFT AS TEXT FILE

Q. Is it possible for me to save an Applesoft BASIC program to
disk as an ASCII text file so I can load it into my
word-processing program?

						Anthony J. Oresteen
						Batavia, IL

A.  Unlike some dialects of BASIC for other comptuers, neither
Applesoft not its BASIC.SYSTEM ProDOS interface has a command
for saving a program to disk as lines of readable text.  When
you use the Save command, the program is stored in a compressed,
tokenized form in a BAS file, a form that only the Applesoft
interpreter understands.  To convert the program to text form,
you must first create a text file called BAS.TO.TXT that
contains the following three lines:

?"Transferring program to 'BASIC.TXT'"

0  D$=CHR$(4): ?D$;"OPENBASIC.TXT":
   ?D$;"CLOSE": ?D$;"DELETEBASIC.TXT":
   ?D$;"OPENBASIC.TXT":
   ?D$;"WRITEBASIC.TEXT":?"NEW":LIST 1,63999:
   ?D$;"CLOSE":END
RUN

You can use a word-processing program to create this file, but
be sure to save it to disk as a text file.  To convert your
Applesoft program to text, load it into memory and then enter
the command BAS.TO.TXT.

	BAS.TO.TXT works by first adding a line #0 to the program
and then running the program.  Line #0 gets control first, opens
a text file called BASIC.TXT, lists the program into the file,
and then closes the file.  You can then deal with the text file
as you would with any other.  BAS.TO.TXT works with any
Applesoft program that does not contain a line #0, illegal line
numbers, or embedded (and hidden) assembly-language routines.


MANUAL SEARCH

Q. I'm trying to learn how to program in BASIC and have been
referred to a book called BASIC Programming and ProDOS.  Where
can I find this book?

						Robert J. Molessa
						Fort Wayne, IN

A.  BASIC Programming with ProDOS is an official Apple reference
manual and is now published and distributed by Addison-Wesley
Publishing Company, Inc., 6 Jacob Way, Reading, MA.  You should
be able to order it through any bookstore, since Addison-Wesley
is one of the largest book publishers of textbooks in the world. 
Addison-Wesley now handles almost all of Apple's manuals,
including those related to the Macintosh and the Apple IIGS.

-----------------------------------------------------------------

Please send your questions and problems to Rescue Squad, A +, 11
Davis Drive, Belmont, CA 94002.  Because of limited space, we
aren't able to publish repsonses to all inquiries we receive.

-- 
Patt Haring                       UUCP:    ..cmcl2!phri!dasys1!patth
Big Electric Cat                  Compu$erve: 76566,2510
New York, NY, USA                 MCI Mail: 306-1255;  GEnie: PHaring
                                  FidoNet Mail: 1:107/132 or 107/222

lwv@n8emr.UUCP (09/06/87)

Patt, I am concerned at this point about copyright infringement.  Since
I have not seen in this or in the Genie newsletter postings any indication
that you obtained such permission, is it safe to assume that you are just
posting stuff that you typed in by hand?  This is, in general, not legal.
In fact, even the AUTHOR cannot do such a thing without specific negotiations
with the publisher.  If you have not obtained such permission, please notify
us ASAP so that we can delete these msgs before we get into legal trouble.
-- 
Larry W. Virden	 75046,606 (CIS)
674 Falls Place, Reynoldsburg, OH 43068 (614) 864-8817
cbosgd!n8emr!lwv HAM/SWL BBS (HBBS) 614-457-4227.. 300/1200 bps
We haven't inherited the world from our parents, but borrowed it from our children.

kamath@reed.UUCP (Sean Kamath) (09/08/87)

In article <1177@dasys1.UUCP> patth@dasys1.UUCP (Patt Haring) writes:
>APPLESOFT AS TEXT FILE

>A.  Unlike some dialects of BASIC for other comptuers, neither
>Applesoft not its BASIC.SYSTEM ProDOS interface has a command
>for saving a program to disk as lines of readable text.  When

nor DOS 3.3

>you use the Save command, the program is stored in a compressed,
>tokenized form in a BAS file, a form that only the Applesoft
>interpreter understands.  To convert the program to text form,
>you must first create a text file called BAS.TO.TXT that
>contains the following three lines:

YOu don't *have* to!

>?"Transferring program to 'BASIC.TXT'"
>
>0  D$=CHR$(4): ?D$;"OPENBASIC.TXT":
>   ?D$;"CLOSE": ?D$;"DELETEBASIC.TXT":
>   ?D$;"OPENBASIC.TXT":
>   ?D$;"WRITEBASIC.TEXT":?"NEW":LIST 1,63999:
      ---------------^
>   ?D$;"CLOSE":END
>RUN

If you do that, you will end up with two files, one of which is still
open.  Remove to e from test in that line.

>You can use a word-processing program to create this file, but
>be sure to save it to disk as a text file.  To convert your
>Applesoft program to text, load it into memory and then enter
>the command BAS.TO.TXT.

Note that if you create the above text file, you cannot "enter the
command BAS.TO.TXT" rather "-BAS.TO.TXT".

I think it is a much better thing to do it manually.  I don't like
running the above, because A) you might have a line 0 in the program,
and B) you end up with two open files at once, which I like to avoid.
It is possible that things might get swizzeled and you can only have 1
open.  Also, note that this leaves you with a  modified BASIC program.
I like this method:

find last line.
63000 d$=chr$(4):?d$"openfile":?d$"deletefile":?d$"writefile":list,62999
:?d$"closefile"
goto 63000.

Amoung other things, you can tailer it to the task at hand, such as
listing only sectiones you want, and changing file name.  Also, note
that the close and second open are not necesarry, as a write opens the
file if it is not openned already (I KNOW DOS 3.3 does this, and I have
heard ProDOS does it do.).

>-- 
>Patt Haring                       UUCP:    ..cmcl2!phri!dasys1!patth
>Big Electric Cat                  Compu$erve: 76566,2510
>New York, NY, USA                 MCI Mail: 306-1255;  GEnie: PHaring

I don't usually like to rag on the magazine people, as I know they have
certain restrictions.  But sometimes they are just plain _wrong_.
Recently, in an InCider+, in an article about creating a blank checkbook
template (is there any other kind?  My mistake :-) for appleworks, the
author responded to the fact that one section of the spreadsheet
wouldn't calculate correctly because (I quote) 

"  Recalculation was so fast that the formula in E43 didn't have a
chance to copy the closing balance from I29, which sometimes happens
with AppleWorks.  The solution is the calculate again, so press OA-K."

Now, come _*ON*_ folks!!!!!  To "fast" for the computer?  Jeez.

Think I'm nitpicking?  You say, so what, _we_ know it's the method of
calculation here, and that specifying new calculation rules (just like
the manual explains!) fixes this.  But the points are A) A lot of new
users read this, and it leads to misunderstandings, and B) it happens
all over the place in these mags, and they rarely correct this type of
error.  I've seen these errors done by Roger Wagner, Mr. Little, and
other people who probably know better, and are told not to go far into
detail.

I subscribe to these magazines almost more out of habbit than because I
value their ideas, which is sad.  Today, it seems that more people are
worried about AppleWorks templates and dialing "on-line" than using
them.  I realize that a _lot_ of people use Apples with AppleWorks, I
do!  But I also program.  I _like_ to program.  But these days computers
are just tools. They always have been, but you really need to understand
how a tool is created, or at least the theory of how it works, to really
use it, and understand it's limitations.  "too fast" calculation is a
perfect example.  If the woman had ever written a line of code that did
anything remotely similar to a spreadsheet, she would realize this, or
at least do a little more to question it than say it was "too fast".  Or
maybe she just didn't have the space.

Well, enough of my diatribe.  I think you get the point.  It's sad.


Sean Kamath
-- 
UUCP:  {decvax allegra ucbcad ucbvax hplabs ihnp4}!tektronix!reed!kamath
CSNET: reed!kamath@Tektronix.CSNET  ||  BITNET:  reed!kamath@Berkeley.BITNET
ARPA:  tektronix!reed!kamath@Berkeley <or> reed!kamath@hplabs
US Snail: 3934 SE Boise, Portland, OR  97202 (I hate 4 line .sigs!)

rre@ihlpg.ATT.COM (Roger Espinosa) (09/10/87)

> I subscribe to these magazines almost more out of habbit than because I
> value their ideas, which is sad.  Today, it seems that more people are
> worried about AppleWorks templates and dialing "on-line" than using
> them.  I realize that a _lot_ of people use Apples with AppleWorks, I
> do!  But I also program.  I _like_ to program.  But these days computers
> are just tools. They always have been, but you really need to understand
> how a tool is created, or at least the theory of how it works, to really
> use it, and understand it's limitations.  "too fast" calculation is a
> Well, enough of my diatribe.  I think you get the point.  It's sad.
> 
> 
> Sean Kamath
> -- 

Yes!

You can see this "trend" in all computer magazines: just look at back issues
in Byte, or in Creative Computing, when the only people who had computers 
on their desks were the ones who really wanted to get into the computer
(anyone ever see the Apple ads which showed great inventors of the past 
and "What do you think they could have done had they had an Apple II?"). Now
all the advertising is geared to "Hey! Look! We have more software than the
next guy!"

Why are all the programming books which go beyond "Look! Here's the RETURN
key!" dated 1983 and before? Hasn't there been *more* innovation since
then? Why is it so hard to find books on programming the Apple, instead of
books on AppleWorks?  AAAAAAARRRGGH!

Oh well. Sigh. So it goes.

Hasta,
Roger

-- 
		Roger R. Espinosa
		Live from the Rabbit Ranch
		ihnp4!ihlpg!rre