FAILURE MAP
← Case archive

FA-89393 / Instruction set emulation / Member archive

Push decrements before storing · case 03

Pushed bytes land one slot below where pulls read them.

Member previewVariant 3 · 3 implementations · 7 checks per implementation

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 fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
call and return[[[1792, 251, null], [1793, 251, null], [7, 253, null]], [[507, 2], [508, 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 ↗