FAILURE MAP
← Case archive

FA-89421 / Instruction set emulation / Open access

Indirect jump pointer high byte read from the next page · case 01

JMP (xxFF) fetches its high byte from the following page instead of wrapping within the page.

Verified by executionVariant 1 · 13 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The emulator increments the full pointer address.

THE FAILURE

The emulator increments the full pointer address.

Unsuccessful approach: Keeping only the low byte of operand+1 reads from page zero.

Case contract

Input [mode, operand, x, y, mem] with mem mapping decimal-string addresses to bytes (missing = 0). zp: operand & 0xFF. zpx: (operand + x) & 0xFF. abs: operand. absx: (operand + x) & 0xFFFF. absy: (operand + y) & 0xFFFF. ind: little-endian pointer at operand, where the high byte is fetched from the same page ((operand & 0xFF00) | ((operand + 1) & 0xFF)). indx: pointer at zero-page (operand + x) & 0xFF, high byte from the next zero-page byte (wrapping). indy: pointer at zero-page operand (high byte wrapping in zero page), plus y, wrapped to 16 bits.

Why this case matters

Addressing-mode decoding is the core of any 8-bit CPU emulator; page-wrap quirks are observable program behaviour.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(*args):
    mode, operand, x, y, mem = args
    def rd(a):
        return mem.get(str(a & 0xFFFF), 0)
    if mode == 'zp': return operand & 0xFF
    if mode == 'zpx': return (operand + x) & 0xFF
    if mode == 'abs': return operand
    if mode == 'absx': return (operand + x) & 0xFFFF
    if mode == 'absy': return (operand + y) & 0xFFFF
    if mode == 'ind':
        lo = rd(operand)
        hi = rd(operand + 1)
        return hi << 8 | lo
    if mode == 'indx':
        p = (operand + x) & 0xFF
        return rd((p + 1) & 0xFF) << 8 | rd(p)
    if mode == 'indy':
        p = operand & 0xFF
        base = rd((p + 1) & 0xFF) << 8 | rd(p)
        return (base + y) & 0xFFFF
    return None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('zero page indexed wraps', ['zpx', 241, 32, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 17), ('absolute indexed crosses page', ['absx', 4336, 33, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 4369), ('absolute indexed wraps top', ['absx', 65520, 49, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 33), ('indirect jump page bug', ['ind', 4351, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 25889), ('indirect jump normal', ['ind', 8448, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 119), ('indexed indirect pointer wraps', ['indx', 254, 1, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13432), ('indexed indirect plain', ['indx', 14, 2, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 43981), ('indirect indexed adds after load', ['indy', 16, 0, 17, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 43998), ('indirect indexed pointer wraps and crosses', ['indy', 255, 0, 240, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13672), ('indirect indexed result wraps', ['indy', 128, 0, 33, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 17), ('zero page plain', ['zp', 511, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 255), ('absolute Y with X set', ['absy', 8193, 17, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 8193), ('absolute Y indexed', ['absy', 12528, 5, 33, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 12561)], [('zero page indexed wraps', ['zpx', 242, 32, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 18), ('absolute indexed crosses page', ['absx', 4336, 34, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 4370), ('absolute indexed wraps top', ['absx', 65520, 50, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 34), ('indirect jump page bug', ['ind', 4351, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 25889), ('indirect jump normal', ['ind', 16, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 43981), ('indexed indirect pointer wraps', ['indx', 254, 1, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13432), ('indexed indirect plain', ['indx', 14, 2, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 43981), ('indirect indexed adds after load', ['indy', 16, 0, 18, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 43999), ('indirect indexed pointer wraps and crosses', ['indy', 255, 0, 240, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13672), ('indirect indexed result wraps', ['indy', 128, 0, 34, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 18), ('zero page plain', ['zp', 511, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 255), ('absolute Y with X set', ['absy', 8194, 17, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 8194), ('absolute Y indexed', ['absy', 12528, 5, 34, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 12562)], [('zero page indexed wraps', ['zpx', 243, 32, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 19), ('absolute indexed crosses page', ['absx', 4336, 35, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 4371), ('absolute indexed wraps top', ['absx', 65520, 51, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 35), ('indirect jump page bug', ['ind', 4351, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 25889), ('indirect jump normal', ['ind', 8448, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 119), ('indexed indirect pointer wraps', ['indx', 254, 1, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13432), ('indexed indirect plain', ['indx', 14, 2, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 43981), ('indirect indexed adds after load', ['indy', 16, 0, 19, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 44000), ('indirect indexed pointer wraps and crosses', ['indy', 255, 0, 240, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13672), ('indirect indexed result wraps', ['indy', 128, 0, 35, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 19), ('zero page plain', ['zp', 511, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 255), ('absolute Y with X set', ['absy', 8195, 17, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 8195), ('absolute Y indexed', ['absy', 12528, 5, 35, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 12563)], [('zero page indexed wraps', ['zpx', 244, 32, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 20), ('absolute indexed crosses page', ['absx', 4336, 36, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 4372), ('absolute indexed wraps top', ['absx', 65520, 52, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 36), ('indirect jump page bug', ['ind', 4351, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 25889), ('indirect jump normal', ['ind', 16, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 43981), ('indexed indirect pointer wraps', ['indx', 254, 1, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13432), ('indexed indirect plain', ['indx', 14, 2, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 43981), ('indirect indexed adds after load', ['indy', 16, 0, 20, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 44001), ('indirect indexed pointer wraps and crosses', ['indy', 255, 0, 240, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13672), ('indirect indexed result wraps', ['indy', 128, 0, 36, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 20), ('zero page plain', ['zp', 511, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 255), ('absolute Y with X set', ['absy', 8196, 17, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 8196), ('absolute Y indexed', ['absy', 12528, 5, 36, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 12564)], [('zero page indexed wraps', ['zpx', 245, 32, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 21), ('absolute indexed crosses page', ['absx', 4336, 37, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 4373), ('absolute indexed wraps top', ['absx', 65520, 53, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 37), ('indirect jump page bug', ['ind', 4351, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 25889), ('indirect jump normal', ['ind', 8448, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 119), ('indexed indirect pointer wraps', ['indx', 254, 1, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13432), ('indexed indirect plain', ['indx', 14, 2, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 43981), ('indirect indexed adds after load', ['indy', 16, 0, 21, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 44002), ('indirect indexed pointer wraps and crosses', ['indy', 255, 0, 240, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13672), ('indirect indexed result wraps', ['indy', 128, 0, 37, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 21), ('zero page plain', ['zp', 511, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 255), ('absolute Y with X set', ['absy', 8197, 17, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 8197), ('absolute Y indexed', ['absy', 12528, 5, 37, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 12565)]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
zero page indexed wraps1717Passed
absolute indexed crosses page43694369Passed
absolute indexed wraps top3333Passed
indirect jump page bug1718525889Failed
indirect jump normal119119Passed
indexed indirect pointer wraps1343213432Passed
indexed indirect plain4398143981Passed
indirect indexed adds after load4399843998Passed
indirect indexed pointer wraps and crosses1367213672Passed
indirect indexed result wraps1717Passed
zero page plain255255Passed
absolute Y with X set81938193Passed
absolute Y indexed1256112561Passed

SHA-256 / 4ebb9d71c1defc080201e0f002a9fbff49643dffa34d9e335e31cc1bcb1e2ff3

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(*args):
    mode, operand, x, y, mem = args
    def rd(a):
        return mem.get(str(a & 0xFFFF), 0)
    if mode == 'zp': return operand & 0xFF
    if mode == 'zpx': return (operand + x) & 0xFF
    if mode == 'abs': return operand
    if mode == 'absx': return (operand + x) & 0xFFFF
    if mode == 'absy': return (operand + y) & 0xFFFF
    if mode == 'ind':
        lo = rd(operand)
        hi = rd((operand + 1) & 0xFF)
        return hi << 8 | lo
    if mode == 'indx':
        p = (operand + x) & 0xFF
        return rd((p + 1) & 0xFF) << 8 | rd(p)
    if mode == 'indy':
        p = operand & 0xFF
        base = rd((p + 1) & 0xFF) << 8 | rd(p)
        return (base + y) & 0xFFFF
    return None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('zero page indexed wraps', ['zpx', 241, 32, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 17), ('absolute indexed crosses page', ['absx', 4336, 33, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 4369), ('absolute indexed wraps top', ['absx', 65520, 49, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 33), ('indirect jump page bug', ['ind', 4351, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 25889), ('indirect jump normal', ['ind', 8448, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 119), ('indexed indirect pointer wraps', ['indx', 254, 1, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13432), ('indexed indirect plain', ['indx', 14, 2, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 43981), ('indirect indexed adds after load', ['indy', 16, 0, 17, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 43998), ('indirect indexed pointer wraps and crosses', ['indy', 255, 0, 240, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13672), ('indirect indexed result wraps', ['indy', 128, 0, 33, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 17), ('zero page plain', ['zp', 511, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 255), ('absolute Y with X set', ['absy', 8193, 17, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 8193), ('absolute Y indexed', ['absy', 12528, 5, 33, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 12561)], [('zero page indexed wraps', ['zpx', 242, 32, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 18), ('absolute indexed crosses page', ['absx', 4336, 34, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 4370), ('absolute indexed wraps top', ['absx', 65520, 50, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 34), ('indirect jump page bug', ['ind', 4351, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 25889), ('indirect jump normal', ['ind', 16, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 43981), ('indexed indirect pointer wraps', ['indx', 254, 1, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13432), ('indexed indirect plain', ['indx', 14, 2, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 43981), ('indirect indexed adds after load', ['indy', 16, 0, 18, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 43999), ('indirect indexed pointer wraps and crosses', ['indy', 255, 0, 240, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13672), ('indirect indexed result wraps', ['indy', 128, 0, 34, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 18), ('zero page plain', ['zp', 511, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 255), ('absolute Y with X set', ['absy', 8194, 17, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 8194), ('absolute Y indexed', ['absy', 12528, 5, 34, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 12562)], [('zero page indexed wraps', ['zpx', 243, 32, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 19), ('absolute indexed crosses page', ['absx', 4336, 35, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 4371), ('absolute indexed wraps top', ['absx', 65520, 51, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 35), ('indirect jump page bug', ['ind', 4351, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 25889), ('indirect jump normal', ['ind', 8448, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 119), ('indexed indirect pointer wraps', ['indx', 254, 1, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13432), ('indexed indirect plain', ['indx', 14, 2, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 43981), ('indirect indexed adds after load', ['indy', 16, 0, 19, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 44000), ('indirect indexed pointer wraps and crosses', ['indy', 255, 0, 240, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13672), ('indirect indexed result wraps', ['indy', 128, 0, 35, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 19), ('zero page plain', ['zp', 511, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 255), ('absolute Y with X set', ['absy', 8195, 17, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 8195), ('absolute Y indexed', ['absy', 12528, 5, 35, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 12563)], [('zero page indexed wraps', ['zpx', 244, 32, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 20), ('absolute indexed crosses page', ['absx', 4336, 36, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 4372), ('absolute indexed wraps top', ['absx', 65520, 52, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 36), ('indirect jump page bug', ['ind', 4351, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 25889), ('indirect jump normal', ['ind', 16, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 43981), ('indexed indirect pointer wraps', ['indx', 254, 1, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13432), ('indexed indirect plain', ['indx', 14, 2, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 43981), ('indirect indexed adds after load', ['indy', 16, 0, 20, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 44001), ('indirect indexed pointer wraps and crosses', ['indy', 255, 0, 240, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13672), ('indirect indexed result wraps', ['indy', 128, 0, 36, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 20), ('zero page plain', ['zp', 511, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 255), ('absolute Y with X set', ['absy', 8196, 17, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 8196), ('absolute Y indexed', ['absy', 12528, 5, 36, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 12564)], [('zero page indexed wraps', ['zpx', 245, 32, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 21), ('absolute indexed crosses page', ['absx', 4336, 37, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 4373), ('absolute indexed wraps top', ['absx', 65520, 53, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 37), ('indirect jump page bug', ['ind', 4351, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 25889), ('indirect jump normal', ['ind', 8448, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 119), ('indexed indirect pointer wraps', ['indx', 254, 1, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13432), ('indexed indirect plain', ['indx', 14, 2, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 43981), ('indirect indexed adds after load', ['indy', 16, 0, 21, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 44002), ('indirect indexed pointer wraps and crosses', ['indy', 255, 0, 240, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 13672), ('indirect indexed result wraps', ['indy', 128, 0, 37, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 21), ('zero page plain', ['zp', 511, 0, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 255), ('absolute Y with X set', ['absy', 8197, 17, 0, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 8197), ('absolute Y indexed', ['absy', 12528, 5, 37, {'0': 52, '1': 18, '255': 120, '254': 86, '16': 205, '17': 171, '4351': 33, '4352': 67, '4096': 101, '8447': 153, '8192': 136, '8448': 119, '128': 240, '129': 255}], 12565)]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
zero page indexed wraps1717Passed
absolute indexed crosses page43694369Passed
absolute indexed wraps top3333Passed
indirect jump page bug1334525889Failed
indirect jump normal4727119Failed
indexed indirect pointer wraps1343213432Passed
indexed indirect plain4398143981Passed
indirect indexed adds after load4399843998Passed
indirect indexed pointer wraps and crosses1367213672Passed
indirect indexed result wraps1717Passed
zero page plain255255Passed
absolute Y with X set81938193Passed
absolute Y indexed1256112561Passed

SHA-256 / 1f5eb9be415b9446869bbf84e3752a72394e60340b4b6799bf898f75e456faad

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 13 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

A deterministic bounded teaching model of one emulator rule; the instruction semantics are a stipulated contract inspired by common ISAs and are not a claim of cycle-exact or architectural conformance. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:51:17.371624+00:00.

Case digest / e472cc9b4b56a9a5b1fb35f607f454feca68bf06b1925facccd1a5060bc4a8af