; TASM cross-assembler definitions

#define db .byte
#define dw .word
#define defb .byte
#define defw .word
#define ds .block
#define org .org
#define equ .equ
#define end .end

; SYSVARS which aren't saved

ERR_NR		equ	$4000
FLAGS		equ	$4001
ERR_SP		equ	$4002
RAMTOP		equ	$4004
;MODE		equ	$4006
PPC		equ	$4007

		org	$4009

; SYSVARS which are. This is the start of the .P

VERSN:		db	0
E_PPC:		dw	0
D_FILE:		dw	dfile
DF_CC:		dw	dfile+1
VARS:		dw	vars
DEST:		dw	0
E_LINE:		dw	vars+1
CH_ADD:		dw	last-1
X_PTR:		dw	0
STKBOT:		dw	last
STKEND:		dw	last
BERG:		db	0
MEM:		dw	MEMBOT
		db	0
DF_SZ:		db	2
S_TOP:		dw	1
LAST_K:		db	$FF,$FF,$FF
MARGIN:		db	55
NXTLIN:		dw	AUTORUN		; #define this in your main asm file
                                        ; use 'line0', etc. 'dfile' if no autorun.
OLDPPC:		dw	0
FLAGX:		db	0
STRLEN:		dw	0
T_ADDR:		dw	$0C8D
SEED:		dw	0
FRAMES:		dw	$FFFF
COORDS:		db	0,0
PR_CC:		db	$BC
S_POSN:		db	33,24
CDFLAG:		db	01000000B

PRTBUF:		ds	33

MEMBOT:		ds	30			      ; calculator's scratch
		ds	2

; some useful ROM routines

RESET		equ	$0000
SLOWFAST	equ	$0207
KSCAN           equ     $02bb
SETFAST		equ	$02E7
SAVE            equ     $02F6
NEXTLINE	equ	$0676
DECODEKEY	equ	$07bd
PRINTAT		equ	$08f5
MAKEROOM	equ	$099e
CLS		equ	$0a2a
STACK2BC	equ	$0bf5
STACK2A		equ	$0c02
CLASS6		equ	$0d92
FINDINT		equ	$0ea7
FAST		equ	$0f23
SLOW		equ	$0f2b
DEBOUNCE	equ	$0f4b
SETMIN		equ	$14BC
