Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user maak ! (Registered 2024-04-18) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > zp indexed adressing
2003-07-17 12:46
Oswald

Registered: Apr 2002
Posts: 5017
zp indexed adressing

Hi coderz!

just a shortie...

if

x=$10

then

lda $f8,x

will read from $0108 rite ? :) (and not from $08)
2003-07-17 15:08
Perff
Administrator

Posts: 1665
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.
2003-07-17 18:14
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.
2003-07-18 08:05
Oswald

Registered: Apr 2002
Posts: 5017
arrgh.. :( hoped to save 1 byte in a speedcode using this... but cant use it as it works this way :(
2003-07-28 19:40
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.
2003-07-29 16:57
WVL

Registered: Mar 2002
Posts: 885
he wants to save a byte, not a cycle! saving bytes is necessary in speedcode :) sometimes you got like 200 blocks of it!
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Fred/Channel 4
Freddie
bexxx
rexbeng
Knut Clausen/SHAPE/F..
Chico/Civitas
Guests online: 139
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.9)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.8)
4 Acidchild  (9.7)
5 Starlight  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.057 sec.