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
Acidchild/Padua
Rico/Pretzel Logic
Linus/MSL
FABS/HF
CA$H/TRiAD
Oswald/Resource
Fred/Channel 4
csabanw
Guests online: 123
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 Bromance  (9.6)
10 Memento Mori  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
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 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (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 Crackers
1 Mr. Z  (9.9)
2 S!R  (9.9)
3 Antitrack  (9.8)
4 Mr Zero Page  (9.8)
5 OTD  (9.8)

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