[cc65] C64DTV: different stack and zero page position + cc65

From: Gábor Lénárt <lgb1lgb.hu>
Date: 2010-11-29 15:48:39

I'm thinking to try some coding on my little C64-DTV3. However a question
has come into my mind: is there any requirement (of cc65) that zero page is
always at location $0000 and stack at $0100? It's a question because on DTV
you can relocate them (but as far as I know it's true for C128 too?), so for
example STA $00 and STA $0000 won't mean the same memory location anymore.
Similar "problem" (actually it's a feature, I can write my little OS for DTV
with fast task context switching without slow copying stack and zero page
but still I can have separated full 256 bytes long page of them for each of
my proecesses) is there with the stack too.

My question is simply about this: is there any place where cc65 relies on
the original 6502/6510 behaviour that stack and zero page is at a fixed
location, or are there tricks in the compiler code (or the generated code
uses some kind optimization which relies on these locations) which eg
addresses a zero page location with non-zero page addressing mode (which
won't work on DTV with different stack location) or similar issue with the
(hardware, not the parameter "software" stack of cc65) stack (load/store
values in it with other opcodes than the stack oriented ones)?

Thanks a lot in advance,

- Gábor
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Nov 29 15:48:48 2010

This archive was generated by hypermail 2.1.8 : 2010-11-29 15:48:49 CET