Hi! When I program in cc65 C, I usually use an optimization technique. It states that I can use parts of the OS's memory, a.k.a. Low memory, that aren't used during the course of a cc65 program can be used for a program's code and data. I like this technique, as it buys me a little extra space. AFAIK, the range from $0200-$02FF is used to read a line of keyboard input and can be used if a program doesn't use the ROM's routines for such, and the range $0300-$03FF is used by DOS 3.3 and is available when using ProDOS. Am I right? Where can I find a memory map for the Apple2 series?
Anonymous
User login
Please support the defense of Ukraine.
Direct or via Unclutter App
Active forum topics
Recent content
Navigation
No Ads.
No Trackers.
No Social Media.
All Content Locally Hosted.
Built on Free Software.
We have complied with zero government requests for information.
Apple ][+ or //e Reference Manual and the ProDOS Reference Manual will have memory maps. Also Beneath Apple ProDOS is a good read. You can find those here:
http://cini.classiccmp.org/pdf/Apple/Apple%20II%20Reference%20Manual%20-%20Woz.pdf
https://archive.org/details/Apple_ProDOS_8_Technical_Reference_Manual
https://prodos8.com/docs/techref/
http://www.easy68k.com/paulrsm/6502/PDOS8TRM.HTM
https://archive.org/details/beneath-apple-dos-prodos-2020
https://commodore.bombjack.org/apple/apple-books.htm
+1 to SJ's suggestions, in addition if you want a good understanding of how the system works on a hardware level gotta take a look at James Sather's books on the II, and IIe. It's hardware but he does have some good examples of code that shows how to take advantage of the hardware in software. Likely WAAAAY more than you need but seriously, this is my go-to. Beneath Apple ProDos is another of my go tos.
Understanding the Apple II : Sather, James Fielding : Free Download, Borrow, and Streaming : Internet Archive
Understanding the Apple IIe : Sather, James Fielding : Free Download, Borrow, and Streaming : Internet Archive
Thank you. :)
Right now, I'm looking for a memory map of all the used zeropage and Low memory locations. This is for a port of my AdvSkel65 program, which is a "skeleton" code around which one can create a text adventure. It is created with cc65 and uses my A2SimpleIO library. Now, I want to optimize it better. I don't quite remember the location aliased by "tabx," but I want to do better than functions such as gotoy() and wherey(). WHere can I find such a memory map? I prefer both a short description and full documentation but in two different files. I also want the addresses of the Apple2's OS routines. I have them for DOS 3.3 and ProDOS and so don't need them. Thank you.
Some refinement of those address ranges:
$0200-$02FF - yes this is the keyboard line-input buffer, so your subroutines can use it for temporary scratch memory that may probably be overwritten after your routine returns. You can use it even in programs that use the ROM's input routines, so long as you're done parsing that last line of input. The input routines fill it from the lowest address first, so user input will eventually overwrite the higher addresses if the user types a LOT on a single input line.
$0300-$03FF - The first three-quarters is free, but the last quarter is used by the ROM, DOS 3.3, ProDOS, and Applesoft BASIC. (eg: JMP vectors for cold-start, warm-start, USR, interrupts, etc.) The boundary is a little fuzzy, but free to use the range $0300-$03C0.
S.Elliott: I thank you for your information. However, I also want to work on my A2SimpleIO library and AdvSkel65, both for cc65, and want to optimize them a little better. I'm obsessed with optimizing. :) BTW, the next version of AdvSkel65 is almost ready: I just need to fix a bug with the Atari8 version not displaying the cursor, make sure it's working then finish the manual and info file, then I should be ready to upload it. :)