Re: [stella] sta.w

Subject: Re: [stella] sta.w
From: "Eckhard Stolberg" <Eckhard_Stolberg@xxxxxx>
Date: Sat, 17 Feb 2001 22:22:03 +0100
> Since zero page only includes the first $FF addresses, it can dispense
with
> bothering with the first byte of the address (in a two byte addressing the
> Atari uses).  This implicit first byte is essentially $00, but not having
to
> explicitly deal with it saves the processor a cycle.  When you want
> something from an address like $FF00, there's no way to use the shortcut.
>
> By using sta.w, you force grabbing the address with two bytes (a word?
> Sounds more like a snack-sized Snicker bar, but that's harder to say), eg
> making $A1 (just as an example) into "$00A1" and forcing the processor to
> use up the cycle to deal with $00, so to speak.
>
> That didn't make much sense the way I wrote it, but that sounds right.  Am
I
> close?

Perfect. BTW that's why addresses are stored with the low byte first
($ff00 is stored as $00 $ff). The 6502 can always read two bytes per
instruction. Only when the instruction is for an addressing mode that
needs the high byte too, the third byte gets read, using another cycle.


Ciao, Eckhard Stolberg


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

Current Thread