Program Too Large
Apple Apple II
Severity: ModerateWhat Does This Error Mean?
Program Too Large means your Applesoft BASIC program has grown too big to fit in available memory. The Apple II had 48K RAM (64K on the IIe/IIc), and BASIC shares that space with variables, the stack, and the high-res graphics pages.
Affected Models
- Apple II
- Apple II Plus
- Apple IIe
- Apple IIc
- Apple IIc Plus
- Apple IIgs (in BASIC mode)
Common Causes
- BASIC program uses all available free memory
- Graphics pages (HGR, HGR2) occupying RAM that could be used by the program
- Many string variables consuming extra heap space
- Running a program on a machine with less RAM than intended
How to Fix It
-
Type MEM and press Enter to see free memory.
This tells you exactly how many bytes are available. If it's very low, you need to either shrink the program or free up RAM.
-
Use LOMEM: to move the program start if needed.
Advanced: LOMEM: sets where BASIC stores variables. Lowering it gives more room for variables but reduces program space.
-
Remove unused line numbers and REMs.
REM statements consume memory. Delete any REM lines you don't need. Consolidate multiple short lines.
-
Use shorter variable names.
Applesoft only distinguishes the first two characters of variable names anyway (A1 and A1X are the same variable). Using short names saves bytes.
-
Split the program across multiple parts loaded from disk.
Large Apple II programs were often written as chained modules. Use CHAIN or RUN to load the next section from disk when needed.
Frequently Asked Questions
How much memory did the Apple II have?
The original Apple II and II Plus had 48KB RAM. The IIe and IIc had 64KB standard, expandable to 128KB with an extended 80-column card. The IIgs could address up to 8MB.