Documentation for AppleSoft & command hook?

From: Vintage Computer Festival <vcf_at_siconic.com>
Date: Sun Nov 30 21:14:01 2003

On Sun, 30 Nov 2003, Patrick Rigney wrote:

> There doesn't appear to be much if any special parsing. I could explain how
> the parser tokenizes the program, and then how the runtime interpets the
> tokens, but I think that's apparent.

Yes, and I'm aware of how all that works. What I'm really asking for is a
document, preferably somewhere on the web, that explains all the entry
points for all the various AppleSoft ROM routines, so I don't have to
re-write code that may already be there to parse parameters and such.

I have one (it's called "What's Where in the Apple" or something like
that) but I can't find it at the moment.

> The parser recognizes "PRINT" as a keyword and tokenizes it, so the stored
> representation is the token. In contrast, "SPOOL" isn't recognized as a
> keyword, so it's stored as raw ASCII. Note that the first two bytes of each
> line are the statement line number, which is stored in binary two-byte
> representation. However, even for the noble GOTO command, the target line
> number is NOT parsed. The statement "120 GOTO 100" is simply stored as:
>
> 78 00 AB 31 30 30 00
>
> Which is the statement line number (in binary), the GOTO token $AB, and the
> ASCII representation of "1" "0" "0" (NOT binary).

<HISTORICAL_COMMENT>
Which is dumb, because since in AppleSoft BASIC the highest line number is
63999 (why?), they could have easily used a reserved values to represent a
GOTO to a variable. Instead, they stored the line number as ASCII, which
is ultimately lame because a) it takes up more space, b) it requires more
time to parse and process during runtime and c) is wholly inefficient.
</HISTORICAL_COMMENT>

-- 
Sellam Ismail                                        Vintage Computer Festival
------------------------------------------------------------------------------
International Man of Intrigue and Danger                http://www.vintage.org
[ Old computing resources for business || Buy/Sell/Trade Vintage Computers   ]
[ and academia at www.VintageTech.com  || at http://marketplace.vintage.org  ]
Received on Sun Nov 30 2003 - 21:14:01 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:36:21 BST