[net.micro.apple] review of ProDOS BASIC manual

todd@islenet.UUCP (Todd Ogasawara) (05/25/84)

"BASIC Programming With ProDOS" is well worth its $30 price tag.  A great
number of changes and additions have been made to the ProDOS enhanced
Applesoft.  So much so that it is worth your while to switch to ProDOS if you
must do any significant amount of work/programming in BASIC on the Apple
(please, no flames about using BASIC!...Even though I mostly program in C
and APL these days, BASIC still has a place in my toolbox).
 
Here are a few things I did not know until reading the manual.

     -you can store all variable values in an active program by issuing
      a STORE instruction
      e.g., PRINT D$;"STORE /MYDISK/VARFILE"
     -the RESTORE instruction retrieves the STOREd variables from a disk
     -BLOAD can now load the binary image of ANY filetype (Applesoft,
      text, random access, etc.)
     -READ and WRITE can now access any filetype.  It can also grab the
      directory since the directory is treated as a filetype too (does
      this sound familiar UN*X fans?)

Along with the book you receive a disk full of sample programs and data
files.  One of the more interesting programs is APA.  This is the ProDOS
version of the APA (Applesoft Programmer's Aid) that was part of the Apple
DOS Tool Kit for DOS 3.3.  This utility adds auto line numbering,
renumbering, REM removal, and other useful programming aids.

There seems to be a problem with the XREF function in APA though.  If you
issue an XREF right after BRUNning APA, it sends the Apple into never-never
land.  I found that the following technique is needed to use XREF

     (note that '-' is a universal execute command in ProDOS...It will
      RUN, BRUN, or EXEC as appropriate)

     -APA
     LOAD BASPROG
     COMPRESS
     XREF

I don't know why COMPRESSing (removing REMarks) lets the XREF to work, but if
you issue a COMPRESS once, XREF will work every time thereafter.

This technique was tried on three different Apple configurations.  The same
results were found.  Machines used were:

     Apple II 64K (with old monitor ROMs.  Applesoft ROMs were swapped in
                   how many of you remember the Applesoft ROM board?)
     Apple II+ 64K
     Apple //e 128K

I also took a quick look at the ProDOS Tool Kit ($75) although I did not buy
it.  The Tool Kit contains a 6502 assembler and what appears to be a very
sophisticated editor.  The editor is capable of split screen simultaneous
multiple file editing (say, doesn't all this REALLY remind you of something
you are all familiar with?)

Now, unfortunately, another long wait is in store for me as I wait for the
manual which will tell me how to hook machine language programs into ProDOS
and where to hide them in RAM.

Todd Ogasawara -- University of Hawaii -- Dept. of Psychology
          { dual,vortex,uhpgvax,ihnp4 }!islenet!todd