You're limited to 64k on the AppleII, but one of the extensions to standard Pascal that Apple Pascal supports is "segments", where you can break a larger program into multiple code segments, which can replace each other in memory.
Apple Pascal on the Apple II was restricted to 64 K memory; this limitation was due to the 6502's 16-bit address bus. The Apple III with it's 6502A could address 256 K, but only by bank switching; pointers remained 16-bit. The later Pascal versions (after Apple III) did no longer use P-code, but compiled to native code.
There was a 128k version of Apple Pascal available on the Apple II. My question, applicable to both this and the Apple III version, is: Was the bank switching managed by the developer or by the Pascal runtime? If it's managed by the runtime, the addresses must have been encodable with >16 bits.
All versions of Apple Pascal use 16-bit pointers, so data was always limited to a 64 KB address space. On the 128K Apple II, p-code was located in aux memory, and data was located in main memory.
Apple III Pascal had similar limitations, with separate 64K address spaces for p-code and data. On machines with more than 128 KB of RAM, there were assembly routines available for allocating additional memory and swapping data memory.
https://secondboyet.com/articles/publishedarticles/theslithy...
Apple III Pascal had similar limitations, with separate 64K address spaces for p-code and data. On machines with more than 128 KB of RAM, there were assembly routines available for allocating additional memory and swapping data memory.