diff --git a/reference.htm b/reference.htm
index 95d716c..c251f7e 100644
--- a/reference.htm
+++ b/reference.htm
@@ -51,7 +51,7 @@ This is intended as a quick reference for the Applesoft BASI
Statements ("commands" in the above grammar) are parsed with distinct cases for each statement type.
+ Due to the irregular structure of the BASIC language, statements ("commands" in the above grammar)
+are parsed with distinct cases for each statement type.
Most statements compile into a function call to a library of Applesoft routines. Expressions are parsed
with a standard recursive descent parser. The parser generates JavaScript expressions for each expression,
which are used as arguments for the library calls.
@@ -59,16 +59,16 @@ This is intended as a quick reference for the Applesoft BASI
Flow Control
-
GOSUB
into a GOTO
IF expr GOTO line
IF expr GOTO lineError Handling
ONERR GOTO
Input/Output
-
;
concatenates,
+ ,
advances to next tab stop. A trailing ;
suppresses line break.
+ Miscellaneous
-
@@ -109,8 +110,8 @@ This is intended as a quick reference for the Applesoft BASI
Inline Data
-
Lo-Res Graphics
-
Hi-Res Graphics
-
@@ -196,10 +197,10 @@ This is intended as a quick reference for the Applesoft BASI
POKE 49200,0
- toggle speaker (no-op)
POKE 49232,0
- graphics mode
POKE 49233,0
- text mode
- POKE 49234,0
- full graphics
- POKE 49235,0
- split screen
- POKE 49238,0
- lores
- POKE 49239,0
- hires
+ POKE 49234,0
- full graphics mode
+ POKE 49235,0
- mixed text/graphics mode
+ POKE 49238,0
- lores graphics mode
+ POKE 49239,0
- hires graphics mode
Since Applesoft supports re-entrant error handling and synchronous input, -the output of the compiler is an array of statement-functions plus a driver +the output of the compiler is an array of statement-functions plus an executor function which implements the logic for walking over the array.
@@ -568,19 +569,21 @@ function which implements the logic for walking over the array.
DEF FN
supports string and integer functions
+ DEF FN
supports string and integer functions
e.g. DEF FN IN$(X$) = " " + X$
- (but return type must still match argument type)
+ - the return type must match the argument type, so string-to-number or number-to-string functions
+ can not be implemented.
==
is supported for equality comparisons, in addition to =
+ "Double equals" ==
is supported for equality comparisons, with the same meaning as "single equals" =
CHR$()
values greater than 255 generate glyphs that might be useful for certain maze games.
+ When printing characters, CHR$()
values greater than 255 generate glyphs that might be useful for implementing certain maze games. (An earlier version of this page allowed arbitrary Unicode characters to be displayed, but the text is now displayed using bitmaps so that is not possible.)
HSCRN(x,y)
is added to allow reading the
- hires screen. On a real Apple this required a machine-language routine (or a shape table and XDRAW
).
-HSCRN(x,y)
is added to allow reading the
+ hires screen. On a real Apple this required a machine-language routine (or a shape table and XDRAW
) and
+ extensive knowledge of the Apple's color generation scheme.
+