[stella] A possible use for indexed indirect addressing on the VCS.
Dennis Debro
dennis at debrofamily.com
Wed Oct 11 06:15:35 CDT 2006
Hi there,
> But it can be optimized to an overhead of 7 bytes like this:
>
> BRKvector:
> plp ; remove flags from stack (not needed with RTI)
> tsx ; load x with stackpointer
> ;; inx ; x++ (not needed)
> dec $01,x ; adjust return address to point at break-id
> lda ($01,x) ; read break-id...
> tay ; ...and store in y
> Subroutine:
> ; Do stuff
> rts
Yep, this is the way it's done in Reactor.
Take care,
Dennis
More information about the Stella
mailing list