Re: A83: IS>(


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

Re: A83: IS>(




Thanks a lot!  The only problem I see with this is that the 'a' register is
only an 8 bit register thereby leaving me to have only the numbers from
0-255 in my system variables I and N.  For the purposes of my program, I am
going to need to be able to use numbers greater than 10,000.  I appreciate
your response though and for the time being, 0-255 should work fine!

Thanks again!

Jake
----- Original Message -----
From: <Edub311@aol.com>
To: <assembly-83@lists.ticalc.org>
Sent: Friday, February 18, 2000 6:06 PM
Subject: Re: A83: IS>(


>
> JakeGuilbo asked:
>
> > What would be a good way to implement the basic loop:
> >
> >IS>(I,N)
> >
> >in asm? >
> >
>
> This is probably really inefficient but it should get the job done. Help
me
> out if I forgot anything.
>
> #DEFINE varI 8265h
> #DEFINE varN 8267h
>
> .org 9327h
>
> call _zerooop1  ;Get sysvar N
> ld hl,op1+1
> ld (hl),'N'
> call _rclvarsym
> call _convop1
> ld a,e
> ld (varN),a
>
> call _zerooop1  ;Get sysvar I
> ld hl,op1+1
> ld (hl),'I'
> call _rclvarsym
> call _convop1
> ld a,e
>
> inc a           ;IS>(I,N)
> ld bc,(varN)
> sub a,c
> jp z,IislessthanorequaltoN
> jp sp,IisgreaterthanN
> IislessthanorequaltoN:
>                 ;command here if I is less than or equal to N
> jp Done
> IisgreaterthanN:
>                 ;command here if I is greater than N
> Done:
> rest of prog
>
>
> The only difference is that if I< or =N, it will execute the needed
command
> and skip the next, whereas IS> would execute both. This can be remedied by
> taking out the "jp Done".
>
> btw Linus Wrote:
> >
> >> sorry i can't answer that for you
> >
> >
> >
> >ROTFLMHO!.. Thanks, I needed that laugh...
> >
> >Linus
>
> You think that's funny, you should see his AOL profile.
>
>                                                                 Bud
>



Follow-Ups: References: