Re: [stella] behold, i am become shiva, destroyer of kernals!

Subject: Re: [stella] behold, i am become shiva, destroyer of kernals!
From: "Andrew Davie" <atari2600@xxxxxxxxxxxxx>
Date: Fri, 26 Mar 2004 11:29:12 +1100
> Is code like
> lda (pointerP0Graphic),y
> (used in JoustPong's skipDraw) potentially vulnerable?

Only if pointerP0Graphic was at location $FF, in which case it would
retrieve the low byte of the address from $FF and the high byte from $00
(instead of $100).
Since your stack is normally growing down from $FF, it's incredibly unlikely
that you'd ever try to put a two-byte zero-page address at $FF anyway  ;)

Thus:

    lda ($FF),y            ; retrieves a 16-bit address from location
$FF(low) and 0 (high) and then adds Y to it, and THEN retrieves the data
from memory
    lda ($FE),y            ; gets low byte from $FE, high from $FF (OK)

In answer to your question, no, it's not something you need to worry about.
Yes, it's a POTENTIAL problem, but one you will never encounter.

Cheers
A

----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread