Re: Re: A86: Where's my bug?


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

Re: Re: A86: Where's my bug?




> >  ld (Xcounter),a
> >XLOOP:
> >  ld a,(Xcounter)      ;2.5+(x/84), OP1=Xcounter
> this isn't the problem, but this is smaller & faster (i think.  you also
> load hl below, so it works)
>   ld hl,Xcounter
>   ld (hl),a
> XLOOP:
>   ld a,(hl)
>
I could but if I speed up anything it should be the CALC loop, not the
XLOOP.

> >  ld a,50
> >  cp b                         ;if Iterations>100 goto Plot
> >  call nc, Plot
> this could be it: you were counting the other way before, maybe this
> should be
>   call c, Plot
>
> i haven't tested that, but i think that might fix it
>
No, I tried it just to be sure and it didn't work.  If you think about
it, you have done 100 iterations when B is less than 50 (if I am
starting at 150).  Consequently, when B is subtracted from 50, the only
time that there wouldn't be a carry is when B is less than 50 (when be
is greater than 50 the result is negative).  It just doesn't make sense
to me.  I hope someone can find my error.  Thanks for all or the help!

--Blake Johnson



Follow-Ups: