; zx48 system variables
    STRUCT ZX48_VARS
KSTATE      BLOCK   8
LAST_K      BYTE
REPDEL      BYTE
REPPER      BYTE
DEFADD      WORD
K_DATA      BYTE
TVDATA      WORD
STRMS       BLOCK   38
CHARS       WORD
RASP        BYTE
PIP         BYTE
ERRNR       BYTE
FLAGS       BYTE
TVFLAG      BYTE
ERR_SP      WORD
LIST_SP     WORD
MODE        BYTE
NEWPPC      WORD
NSPPC       BYTE
PPC         WORD
SUBPPC      BYTE
BORDCR      BYTE
E_PPC       WORD
VARS        WORD
DEST        WORD
CHANS       WORD
CURCHL      WORD
PROG        WORD
NXTLIN      WORD
DATADD      WORD
E_LINE      WORD
K_CUR       WORD
CH_ADD      WORD
X_PTR       WORD
WORKSP      WORD
STKBOT      WORD
STKEND      WORD
BREG        BYTE
MEM         WORD
FLAGS2      BYTE
DF_SZ       BYTE
S_TOP       WORD
OLDPPC      WORD
OSPPC       BYTE
FLAGX       BYTE
STRLEN      WORD
T_ADDR      WORD
SEED        WORD
FRAMES      BLOCK   3
UDG         WORD
COORDS      BLOCK   2
P_POSN      BYTE
PRCC        WORD
ECHO_E      WORD
DF_CC       WORD
DF_CCL      WORD
S_POSN      BLOCK   2
SPOSNL      BLOCK   2
SCR_CT      BYTE
ATTR_P      BYTE
MASK_P      BYTE
ATTR_T      BYTE
MASK_T      BYTE
P_FLAG      BYTE
MEMBOT      BLOCK   30
NMIADD      WORD
RAMTOP      WORD
P_RAMT      WORD
CHANNEL_INF BLOCK   21
    ENDS

SYSVARS     ZX48_VARS = $5C00
IY_VARS     ZX48_VARS = SYSVARS - SYSVARS.ERRNR
