Re: [stella] Arrrg, Arrrg, and Double Arrrg!!!

Subject: Re: [stella] Arrrg, Arrrg, and Double Arrrg!!!
From: Chris Wilkson <cwilkson@xxxxxxxxxxxxx>
Date: Wed, 15 Apr 1998 14:48:51 -0700 (PDT)
> How the heckety heck did you figure out that the branch wasn't being
> taken after $7F? 
> 
> Changing the BPL to BNE fixed the problem, although I don't know why the
> problem existed in the first place. I can't see what would make the
> BLOW routine stop at $7F with a BPL in there, unless there is something
> about the nature of BPL that I just don't understand. Doesn't it just
> branch if the result is a positive number? BEQ branches if the result is
> zero, BMI branches if the result is a negative number, and BNE branches if
> the result is anything other than zero.

Well, you're right.  BPL does branch if the result is a positive number.
But this is a BINARY positive/negative.  Bit 7 is the sign bit: 0=pos 1=neg.
(and $FF= -1, and $FE= -2, etc).

And don't feel bad...I've got a good one along the same lines.  I'll post it
to the list later...

-Chris

--
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/stella.html
Don't post pirate BINs to Stellalist.  Be a programmer, not a pirate.
Write the best game, win framed autographs of famous Atari alumni!!

Current Thread