| |
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.. |
|
| |
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. |
| |
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. |
| |
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. |
| |
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 |