Re: [cc65] Permanent & Temporary Reservation of Memory

From: thefox xofeht <>
Date: 2012-09-09 11:55:24
On Sun, Sep 9, 2012 at 1:23 AM, Michael Bazzinotti
<> wrote:
> My question relates to permanent and temporary reservation of memory.
> (for symbols).

What I usually do (in a gist :)), is allocate a chunk of RAM using
.res, and then reference it using .struct symbols. E.g.:

.segment "BSS"

locals:   .res 16

.segment "CODE"

.proc func1
    foo  .byte
    bar  .byte
  lda locals+foo
  sta locals+bar

.proc func2
    goo  .byte
  bit locals+goo

As far as I know, the only way to otherwise reuse the same memory
areas is to have multiple memory/segment definitions for the same
memory area in the linker config file.

To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Sep 9 11:56:13 2012

This archive was generated by hypermail 2.1.8 : 2012-09-09 11:56:18 CEST