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: 1377
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: 2839
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: 5017
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: 1377
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: 1989
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
Pad/G★P
Alakran_64
Oswald/Resource
iAN CooG/HVSC
Frostbyte/Artline De..
Matt
Grue/Extend
Guests online: 81
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 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
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 Coders
1 Axis  (9.8)
2 Graham  (9.8)
3 Lft  (9.8)
4 Crossbow  (9.8)
5 HCL  (9.8)

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