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


Forums > CSDb Discussions > HELP!!! I need help with the CA65-Assembler (part of CC65)
2002-08-12 19:42
CyberBrain
Administrator

Posts: 392
HELP!!! I need help with the CA65-Assembler (part of CC65)

At the moment i'm writing an 1K-game in CA65 (part of the CC65-compiler package), but i have a problem:

When i use instructions that adresses zeropage, it doesn't assemble them into zeropage instructions. (this is *VERY* critical when writing an 1K-game!! :) )
example: when i write: LDA $FF
it assembles it into: LDA $00FF ($AD $FF $00)

I've looking at the documentation but didn't find anything that could help me. :( SO PLEASE HELP IF YOU CAN!!

(Has it got something to do with "segments"? - whatever that means. If you know what segments is, then please explain it to me too.)
2002-08-13 09:03
CyberBrain
Administrator

Posts: 392
Groepaz told me on IRC, that if i write LDA <bla it should allways work (a side effect of how the assembler scans files in one pass) - as cool as CA65 is, this is pretty bad.

(Btw, it didn't bug with "LDA $FF" i just discovered :), it bugs with "ZP=$FF, LDA ZP" (and only sometimes) - so from now on i guess a have to write "LDA <ZP")




2002-08-14 06:56
bubis
Account closed

Registered: Apr 2002
Posts: 19
I have the same problem (and others) with that assembler. The problem can be solved in most cases if you declare your variables in zeropage segment. Like this:

.zeropage
zp = $ff

.code
lda zp

bubis/RSC
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
Digger/Elysium
Vent
katon/Lepsi De
Rodrigo Yeow../Hokut..
Hexhog
REBEL 1/HF
t0m3000/hf^boom!^ibx
Krill/Plush
Steffan/BOOM!
bugjam
Airwolf/F4CG
lotus_skylight
4gentE/ΤRIΛD
Electric/Extend
Hoogo/Padua
Shake/Role
Facet/G★P ^ Bonzai
Pantaloon/Fairlight
DanPhillips
The Syndrom/TIA/Pret..
Genius/Xenon
Hairdog/BOOM!^Dream
VanessaE/Digital Aud..
Brush/Elysium
Trap/Bonzai
Guests online: 570
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.6)
4 Mojo  (9.6)
5 Edge of Disgrace  (9.6)
6 Uncensored  (9.6)
7 Wonderland XIV  (9.6)
8 Comaland 100%  (9.6)
9 Unboxed  (9.5)
10 Memento Mori  (9.5)
Top onefile Demos
1 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Libertongo  (9.5)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Barry Boomer - Trapp..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Booze Design  (9.3)
3 Performers  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.2)
Top Coders
1 Axis  (9.8)
2 Sailor  (9.8)
3 Graham  (9.8)
4 Lft  (9.8)
5 Crossbow  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.054 sec.