3 ms·
"Use fixed zero page locations for locals and parameter passing, simulating a conventional CPU with a large register file. This eliminates most stack operations
by cmrdporcupine 10y ago
"Use fixed zero page locations for
locals and parameter passing, simulating a
conventional CPU with a large register file. This
eliminates most stack operations, except for
saving/restoring the zero page"
The 65c816 allows the "zero page" (called the direct page there) to be relocated anywhere in the lower 64k. So if one targets that platform the saving/restoring operation could simply be one of pushing/popping the direct page location to/from the stack when entering or exiting function stack frames. Then just keep all program code above the 64k boundary.