| |
Oswald
Registered: Apr 2002 Posts: 5094 |
zp indexed adressing
Hi coderz!
just a shortie...
if
x=$10
then
lda $f8,x
will read from $0108 rite ? :) (and not from $08) |
|
| |
Perff Administrator
Posts: 1680 |
I would say: $108, but a short test I made says $08
The testcode:
lda #$01
sta $08
lda #$02
sta $108
ldx #$10
lda $f8,x
sta $d020
doing this make the border white - thus reading from $08.
|
| |
Graham Account closed
Registered: Dec 2002 Posts: 990 |
LDX #$10
LDA $F8,X
will read from $08... also ZP,Y and (ZP,X) do the same. another adressing bug: JMP ($12FF) will read the low byte off the adress from $12FF and the high byte from $1200 and not $1300. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
arrgh.. :( hoped to save 1 byte in a speedcode using this... but cant use it as it works this way :( |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
Quote: arrgh.. :( hoped to save 1 byte in a speedcode using this... but cant use it as it works this way :(
No sweat, afaik is lda zp,x not even faster than lda xxxx,x - both takes 4 cycles. |
| |
WVL
Registered: Mar 2002 Posts: 902 |
he wants to save a byte, not a cycle! saving bytes is necessary in speedcode :) sometimes you got like 200 blocks of it! |