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 > ca65 and zero page initialised data
2019-12-31 09:57
ChristopherJam

Registered: Aug 2004
Posts: 1409
ca65 and zero page initialised data

Has anyone managed to convince ca65 to assemble code to zero page, with it actually treating zero page addresses appropriately?

If I mark a segment as being of type "zp" it then assumes it's uninitialized.

My current hack is to assemble it with a destination of $0900 (which is where I'll be copying it from anyway), and just use

blah=<*

anywhere I want to define a label, but of course I'll have to not do that for any branch destinations. It's not ideal..
2019-12-31 10:56
Krill

Registered: Apr 2002
Posts: 2980
Have you tried .org $xy? =)

That said, assuming you're working on a small project (4K ICC intro) that doesn't really need all that segment/linking stuff, i recommend using 64tass instead of ca65.
2019-12-31 11:27
Oswald

Registered: Apr 2002
Posts: 5094
64tass:

.logical <expression>
.here
Changes the program counter only, the compile offset is not changed. When finished all continues where it was left off before.
2019-12-31 12:01
ChristopherJam

Registered: Aug 2004
Posts: 1409
Ooh, I've not tried setting .org directly yet - it doesn't always work that well with this assembler, but might be worth a try in this instance.

Probably a little late in the day to try switching assemblers (yes, it's for an ICC entry), and besides, I'm fairly reliant on interleaving source for different .prgs at the moment, and being able to casually refer to lables from different areas.
2020-01-11 16:53
JackAsser

Registered: Jun 2002
Posts: 2014
Did you try mark the segment with ZP-adressing? I.e. not type=ZP but in the code you write:

.segment "ZP": zeropage
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
Guests online: 70
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 No Listen  (9.6)
3 Party Elk 2  (9.6)
4 Cubic Dream  (9.6)
5 Copper Booze  (9.6)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 Fungus  (9.8)
5 S!R  (9.8)

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