ZX BASIC

RAM: 0x4000 to 0x7FFF

Dec. Hex. Mnemonic System Variables: ZX BASIC
16384 4000 ERR-NR The report code. Incremented before printing.
16385 4001 FLAGS Bit 0: Suppression of leading space.
Bit 1: Control Flag for the printer.
Bit 2: Selects K or F mode; or, F or G
Bit 6: FP no. or string parameters.
Bit 7: Reset during syntax checking.
16386 4002 ERR-SP Ptr. to the GOSUB stack.
16388 4004 RAMTOP The top of available RAM, or as specified.
16390 4006 MODE Holds the code for K or F
16391 4007 PPC Line number of the current statement.
16393 4009 VERSN Marks the start of the RAM that is saved.
16394 400A E-PPC The BASIC line with the cursor
16396 400C D-FILE Ptr. to Display file
16398 400E DF-CC Addr. for PRINT AT position
16400 4010 VARS Ptr. to variable area
16402 4012 DEST Addr. of current variable in program area
16404 4014 E-LINE Ptr. to workspace
16406 4016 CH-ADD Ptr. for scanning a line, in program or workspace
16408 4018 X-PTR Ptr. to syntax error.
16410 401A STKBOT Ptr. to calculator stack bottom.
16412 401C STKEND Ptr. to calculator stack end.
16414 401E BERG Used for many different counting purposes
16415 401F MEM Ptr. to base of table of fp. nos, either in calc. stack or variable area.
16417 4021 -- Unused by ZX BASIC. Or FLAG Y for G007
16418 4022 DF-SZ Number of lines in the lower screen
16419 4023 S-TOP Current line number of automatic listing
16421 4025 LAST-K Last Key pressed
16423 4027 DEBOUNCE The debounce status
16424 4028 MARGIN Adjusts for differing TV standards
16425 4029 NXTLIN Next BASIC line to be interpreted
16427 402B OLDPPC Last line number, in case needed.
16429 402D FLAGX Bit 0: Reset indicates an arrayed variable
Bit 1: Reset indicates a given variable exists
Bit 5: Set during INPUT mode
Bit 7: Set when INPUT is to be numeric
16430 402E STRLEN Length of a string, or a BASIC line
16432 4030 T-ADDR Ptr. to 'parameter table. & distinguishes between PLOT & UNPLOT
16434 4032 SEED For RANDOM function
16436 4034 FRAMES Frame counter
16438 4036 COORDS X & Y for PLOT
16440 4038 PR-CC Print buffer counter
16441 4039 S-POSN Line & Column for PRINT AT
16443 403B CDFLAG Bit 6 - the true fast/slow flag
Bit 7 - copy of the fast/slow flag. RESET when FAST needed
16444 403C PRBUFF Printer buffer
16477 405D MEMBOT room for 5 floating point numbers (meme-0 to mem- 5???)
16507 407B -- unused. Or RESTART to G007
16509 407D PROGRAM The BASIC program starts here