codeaddr	equ	03000h
dataaddr	equ	03400h
fileaddr	equ	04000h
filestop	equ	04400h
;
sys_warm	equ	0103h		; monitor entry
sys_getc	equ	0109h		; get a character from input device
sys_print	equ	010fh		; send to output device
sys_phex	equ	0115h		; print A in hex
sys_crlf	equ	012dh		; cr and lf to output device
runlite		equ	p3.5

flags	data	21h
ctrl	bit	21h.0
parity	bit	21h.1
parms	bit	21h.2

; parameter offsets in param array
P_maxl	equ	0
P_time	equ	1
P_npad	equ	2
P_padc	equ	3
P_eol	equ	4
P_qctl	equ	5
P_qbin	equ	6
P_chkt	equ	7
;
cksum	data	10h
EOL	data	11h
CTL	DATA	12H
T	data	13h
N	data	14h
try	data	15h
I	data	16h
T7	data	17h
Ptr	data	18h
;
tochar	macro
	add	a,#32
	endm
;
unchar	macro
	clr	c
	subb	a,#32
	endm
;
tuctl	macro
	xrl	a,#64
	endm

Mrk	data	24h
Len	data	25h
Seq	data	26h
Typ	data	27h
Chk	data	28h

fph	data	42h		; monitor src
fpl	data	43h
feh	data	44h		; monitor dst
fel	data	45h

