Hacker News new | ask | show | jobs
by noobermin 756 days ago
The NES has 2K ram, where you can get carts with mappers that allow you to use prg as ram as well though, this is still limited. Also, the "stack" as it exists must fit on a page (256 bytes). Putting a runtime or sorts onto an NES itself is a big feat given this and requires a lot of manual twiddling.
1 comments

The hardware stack pointer is restricted to indexing within [$0100, $01ff] but, lacking a stack-pointer-relative addressing mode, it is more preferable to realize a parameter stack using a zero-page pointer indexed with the (zp),Y addressing mode, as cc65 does.