Re: A83: User selected list


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

Re: A83: User selected list




Hmm, that code seems ok. You don't need to inc bc, however.

Linus

On 18-Oct-98, Henry Davidowich wrote:

>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
>jpc,_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)
>ldhl,(VAR_STARTLIST);get the list back
>ldc,(hl)
>inchl
>ldb,(hl)
>inchl
>ld(VAR_COUNT),bc;store this for later

>incbc;this needs to be 1 larger for djnz use?

>lda,b;acc = high byte of size
>ora;compare high byte to 0
>jpnz,_erroverflow;too big

>lda,c;compare low byte to 0
>ora
>jpz,_errdimension;too small

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


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



References: