FA-89405 / Instruction set emulation / Member archive
Return resumes at the pulled address · case 05
Execution returns onto the last byte of the call instruction.
Case contract
Input [pc, sp, ops] for an 8-bit stack pointer addressing page 0x100. push stores at 0x100+sp then decrements sp (wrapping in 8 bits); pull increments sp (wrapping) then reads (unwritten bytes read 0). jsr t (3 bytes at pc) pushes (pc+2) high byte then low byte and jumps; rts pulls low then high and resumes at that address + 1 (16-bit wrap). pha v pushes v, pla pulls; both and nop advance pc by 1. Return [[pc, sp, pulled value or None] per op, sorted [address, byte] of written stack memory].
Why this case matters
Emulated call/return must reproduce the exact stack image because programs inspect and manipulate return addresses on the stack.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| call and return | [[[1792, 251, null], [1793, 251, null], [1538, 253, null]], [[508, 2], [509, 6]]] | [[[1792, 251, null], [1793, 251, null], [1539, 253, null]], [[508, 2], [509, 6]]] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗