Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
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: 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)
2003-07-17 15: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.
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: 5094
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: 902
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
Andy/AEG
Hydrogen/Glance
leonofsgr/Singular C..
Scrap/Genesis Project
Asphodel
Guests online: 101
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 Tim  (9.7)

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