; default parameters:

D_maxl	equ	80	; 80 bytes

D_time	equ	10	; 10 seconds

D_npad	equ	0	; none

D_padc	equ	0	; nul

D_eol	equ	13	; cr terminator

D_qctl	equ	'#'	; literal

D_qbin	equ	'N'	; No 8 bit prefix

D_chkt	equ	'1'	; normal 6 bit checksum



; this routine creates a data string as well as a parameter table

set_parms:

	mov	dptr,#GDA

	mov	p2,#high param

	mov	r0,#low param

	clr	a

	movx	@dptr,a		; D = ""

;1

	mov	a,#D_maxl

	movx	@r0,a

	inc	r0

	tochar

	movx	@dptr,a

	inc	dptr

;2

	mov	a,#D_time

	movx	@r0,a

	inc	r0

	tochar

	movx	@dptr,a

	inc	dptr

;3

	mov	a,#D_npad

	movx	@r0,a

	inc	r0

	tochar

	movx	@dptr,a

	inc	dptr

;4

	mov	a,#D_padc

	movx	@r0,a

	inc	r0

	tuctl

	movx	@dptr,a

	inc	dptr

;5

	mov	a,#D_eol

	movx	@r0,a

	inc	r0

	tochar

	movx	@dptr,a

	inc	dptr

;6

	mov	a,#D_qctl

	movx	@r0,a

	inc	r0

	movx	@dptr,a

	inc	dptr

;7

	mov	a,#D_qbin

	movx	@r0,a

	inc	r0

	movx	@dptr,a

	inc	dptr

;8

	mov	a,#D_chkt

	movx	@r0,a

	inc	r0

	movx	@dptr,a

	inc	dptr

;

	clr	a

	movx	@dptr,a		; string terminator



	jnb	parms,no_change

; insert user interface here





no_change:

	ret



