Re: A83: User selected list


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

Re: A83: User selected list




inside

On 18-Oct-98, Henry Davidowich wrote:

>I need to do two things: load a list (L1-L6) and then make sure its 
>dimensions are between 1 and 254.  I'm having trouble.  Could someone 
>lead me the right way?

>get list name into op1:
>lda,TL1
>ld(op1+2),a
>lda,OT_REALLIST;01h = object type:real list
>ld(op1),a
>lda,TVARLST
>ld(op1+1),a

>get the address of the list:
>call_chkfindsym;look up list
>jpc,_errundefined;no list! quit!

>check dimensions of list:
>ldhl,(VAR_STARTLIST);get the list ptr back from RAM

when did you store something to VAR_STARTLIST?

>ldc,(hl)
>inchl
>ldb,(hl)
>inchl
>ld(VAR_COUNT),bc;store this for later

>incbc;this needs to be 1 larger for djnz use (as far as I can tell)

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

>lda,c;acc = low byte of size
>ora;compare low byte to 0
>jpz,_errdimension;too small

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

>Any help?  Thanks.

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

Linus


References: