Re: A83: User selected list


[Prev][Next][Index][Thread]

Re: A83: User selected list




Linus, VAR_STARTLIST is sound.  I stored from de it right after calling 
_chkfindsym.  Take a look.



;------------------------------->Get a user selected list
	call	_userChooseList	;user picks a list (my function)
	call	_chkfindsym	;look up list
	jp	c,_errundefined	;no list! quit!
	ld	(VAR_STARTLIST),de;store this for later
	call	_newLine	;does this kill hl?

;------------------------------->get list size into VAR_COUNTUSE, hl = 
1st item of list
;------------------------------->also check dimensions of list (less 
than 256, more than 1)
	ld	hl,(VAR_STARTLIST);get the list back
	ld	c,(hl)
	inc	hl
	ld	b,(hl)
	inc	hl
	ld	(VAR_COUNT),bc	;store this for later

	inc	bc		;this needs to be 1 larger for djnz use?

	ld	a,b		;acc = high byte of size
	or	a		;compare high byte to 0
	jp	nz,_erroverflow	;too big

	ld	a,c		;compare low byte to 0
	or	a
	jp	z,_errdimension	;too small

	ld	a,c		;store useable count
	ld	(VAR_COUNTUSE),a


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


Follow-Ups: