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 > 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: 18
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
Sulevi/Virtual Dreams
KAL_123
Guests online: 102
Top Demos
1 Next Level  (9.8)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 No Bounds  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 Layers  (9.7)
2 It's More Fun to Com..  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Rainbow Connection  (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 Booze Design  (9.3)
3 Censor Design  (9.3)
4 Crest  (9.3)
5 Performers  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 MWS  (9.6)

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