- restructure memory dim/initialization to support QBasic which
requires all DIMs to be earlier in the code than references to the
DIM'd variables (unlike C64 which just requires the DIMs to be
called first logically).
- Fix printed header ("C64 QBasic" -> "QBasic")
- simplify DO_CONCAT.
- inline MAL_READ/PRINT.
- comment out memory debug/sanity checks.
- more aggressive space removal.
Saves over 900 bytes.
Increase Z% value memory by 374 to 9216 (8192+1024).
- Use variables A1, A2, B2 for Z%(A+1), Z%(A+2), Z%(B+2) respectively.
- Replace Z%(R)=Z%(R)+32 with GOSUB INC_REF_R
- Add functions TYPE_A and TYPE_F for (Z%(A)AND 31) and (Z%(F)AND 31)
respectively.
- Inline NATIVE_FUNCTION and MAL_FUNCTION.
All together saves over 500 bytes so increase Z% value memory by 250
entries.
Use a one dimensional array for the Z% value array. This enables
lists, vectors, environments and metadata pointers to all save off
1 word (2 bytes) of space.
Split the memory init and functions into mem.in.bas.
In addition, change type 14 to be metdata rather than any type 16-31.
This change saves about 560 bytes (no second array dimension
subscripts) and reduces Z% value usage by 10%-15%.
Bump the number of Z% words by 200 (to 8591). This enables
self-hosting up to step7 (without step8-stepA functions in core.mal).