[cc65] local .res ?

From: Anders Åstrand <andast1kth.se>
Date: 2007-11-23 13:51:19
Hello all.

I'm using the great ca65 assembler and have a question. Is it possible to
make some kind of local .res for parts of code that just use memory
temporarily? At the moment I do something like this.

.segment "ZEROPAGE": zeropage
zp_temp: .res 32

And then functions can use those 32 bytes for whatever they want,
something like this:

.import zp_temp
.proc stuff
   tempAddr = zp_temp + $00
   tempAddr2 = zp_temp + $02

   ...

.endproc

Now, it would be nice to not having to do the increments manually and let
the linker find out what size the temp-mem needs to be (by checking how
much whatever proc that uses most temp-mem uses). Is this at all possible?
If not, which way do you recommend for handling this?

Sincerely,
Anders

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Nov 23 13:51:30 2007

This archive was generated by hypermail 2.1.8 : 2007-11-23 13:51:33 CET