Re: [cc65] Apple 2 Memory Layout

From: Oliver Schmidt <>
Date: 2011-05-21 10:17:56

> BTW, what's the location of the Apple 2's Language Card,

The docs I pointed you to say:

"Enabling the Language Card allows to use it as additional memory for
cc65 generated code. However code is never automatically placed there.
Rather code needs to be explicitly placed in the Language Card either
per file by compiling with --code-name HIGHCODE or per function by
enclosing in #pragma codeseg (push, "HIGHCODE") and #pragma codeseg

You see - there's no need to know it as the runtime system takes care
of abstracting it by providing you with the segment HIGHCODE for

If you want to know the location anyway you can check out the Apple II
linker configs for the attributes of the memory area the segment
HIGHCODE is placed in.

> and how do I use it
> for data and load information into it from disk?

The docs I pointed you to say:

"In either case the cc65 runtime system takes care of actually moving
the code into the Language Card."

I don't see anything to be added in general.

The docs I pointer you to say:

"While running main() the Language Card bank 2 is enabled for read access."

So you see you can't use for data as it is read-only.

The bottom line is: You don't use it explicitly but you move parts of
your code into it as documented. This frees up "ordinary" RAM you can
then use in all "usual" ways. This approach is much easier and much
more portable.

To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat May 21 10:18:04 2011

This archive was generated by hypermail 2.1.8 : 2011-05-21 10:18:07 CEST