Hi! On Mon, Nov 29, 2010 at 09:46:09PM +0100, Ullrich von Bassewitz wrote: > > Hi! > > On Mon, Nov 29, 2010 at 03:48:39PM +0100, Gábor Lénárt wrote: > > 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? > > I'm not aware of any such requirement. I cannot rule out that there are a very > few library modules that use something like > > tsx > lda $104,x > > but if so, I would assume that they are platform specific anyway. > > There may also be accesses to the zero page using non zero page addressing > modes, but I cannot currently imagine when this could happen. At least there > are no such tricks in the compiler. > > So while I cannot completely rule out the possibility that there are such > constructs, I do assume that chances are very good that your code will run > without problems. Ok, thanks for the help! Currently I am not planning to use platform specific libraries anyway so I can hope that the compiler itself is not a problem so I won't have any problem because of these issues. > > 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. > > The C128 has a MMU that does actual memory remapping. So on this machine, when > the zero page is remapped, accessing it using absolute addressing will still > work. Ah yes, stupid me, the address "translation" is done outside of the CPU on C128 afaik (my excuse that I have never met C128), so it's not addressing mode dependent there, only the address is seen by the MMU which is produced by the CPU regardless of the opcode/addressing mode it was produced by ... Surely the issue with DTV is different since there the zero page is renamed as "base page" and you can move its location to other places, so there can be situations where STA $F0 and STA $00F0 would write into different memory regions for example ... Similar rules applies about the stack too (on DTV). - 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 Tue Nov 30 13:23:13 2010
This archive was generated by hypermail 2.1.8 : 2010-11-30 13:23:15 CET