{"abstract":"(zp,X) with a pointer at 0xFF reads its high byte from 0x100.","category":"Instruction set emulation","checks":13,"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.","evaluation_group":"w2-instruction-set-emulation-effective-address","failed_approach":"Wrapping correctly but assembling the pointer big-endian swaps the address bytes.","family":"w2-instruction-set-emulation-effective-address-indexed-indirect-pointer-wrap","id":"FA-89426","implementations":{"attempt":{"sha256":"ab56697c7df520382494ebbd8c295636c49e6d8740ef3dfd8368f3defb237f5a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(*args):\n    mode, operand, x, y, mem = args\n    def rd(a):\n        return mem.get(str(a & 0xFFFF), 0)\n    if mode == 'zp': return operand & 0xFF\n    if mode == 'zpx': return (operand + x) & 0xFF\n    if mode == 'abs': return operand\n    if mode == 'absx': return (operand + x) & 0xFFFF\n    if mode == 'absy': return (operand + y) & 0xFFFF\n    if mode == 'ind':\n        lo = rd(operand)\n        hi = rd((operand & 0xFF00) | ((operand + 1) & 0xFF))\n        return hi << 8 | lo\n    if mode == 'indx':\n        p = (operand + x) & 0xFF\n        return rd(p) << 8 | rd((p + 1) & 0xFF)\n    if mode == 'indy':\n        p = operand & 0xFF\n        base = rd((p + 1) & 0xFF) << 8 | rd(p)\n        return (base + y) & 0xFFFF\n    return None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('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)]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"c51dc8ed08c7321b46841aa5e0b4dd1cc4f2bb284188865a491321e2d5cba5ae","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(*args):\n    mode, operand, x, y, mem = args\n    def rd(a):\n        return mem.get(str(a & 0xFFFF), 0)\n    if mode == 'zp': return operand & 0xFF\n    if mode == 'zpx': return (operand + x) & 0xFF\n    if mode == 'abs': return operand\n    if mode == 'absx': return (operand + x) & 0xFFFF\n    if mode == 'absy': return (operand + y) & 0xFFFF\n    if mode == 'ind':\n        lo = rd(operand)\n        hi = rd((operand & 0xFF00) | ((operand + 1) & 0xFF))\n        return hi << 8 | lo\n    if mode == 'indx':\n        p = (operand + x) & 0xFF\n        return rd(p + 1) << 8 | rd(p)\n    if mode == 'indy':\n        p = operand & 0xFF\n        base = rd((p + 1) & 0xFF) << 8 | rd(p)\n        return (base + y) & 0xFFFF\n    return None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('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)]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"6b4721ce1c1d5d79891fed31a54ec8ca18fc97a8eabafcb6f201e02c44b3c252","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(*args):\n    mode, operand, x, y, mem = args\n    def rd(a):\n        return mem.get(str(a & 0xFFFF), 0)\n    if mode == 'zp': return operand & 0xFF\n    if mode == 'zpx': return (operand + x) & 0xFF\n    if mode == 'abs': return operand\n    if mode == 'absx': return (operand + x) & 0xFFFF\n    if mode == 'absy': return (operand + y) & 0xFFFF\n    if mode == 'ind':\n        lo = rd(operand)\n        hi = rd((operand & 0xFF00) | ((operand + 1) & 0xFF))\n        return hi << 8 | lo\n    if mode == 'indx':\n        p = (operand + x) & 0xFF\n        return rd((p + 1) & 0xFF) << 8 | rd(p)\n    if mode == 'indy':\n        p = operand & 0xFF\n        base = rd((p + 1) & 0xFF) << 8 | rd(p)\n        return (base + y) & 0xFFFF\n    return None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('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)]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-instruction-set-emulation-effective-address-indexed-indirect-pointer-wrap","generated_at":"2026-09-29T14:51:17.341017+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Addressing-mode decoding is the core of any 8-bit CPU emulator; page-wrap quirks are observable program behaviour.","repair":"Read the high byte from (p + 1) & 0xFF.","root_cause":"The pointer high-byte address is not wrapped within zero page.","sha256":"2d4cd7e3a414f1f6abcd50176e35be45e72727c1f889f5f1d2a771d36b85d209","title":"Indexed indirect pointer high byte read from page one · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":46.846,"exit_code":1,"observations":[{"actual":17,"check":"zero page indexed wraps","expected":17,"passed":true},{"actual":4369,"check":"absolute indexed crosses page","expected":4369,"passed":true},{"actual":33,"check":"absolute indexed wraps top","expected":33,"passed":true},{"actual":25889,"check":"indirect jump page bug","expected":25889,"passed":true},{"actual":119,"check":"indirect jump normal","expected":119,"passed":true},{"actual":30772,"check":"indexed indirect pointer wraps","expected":13432,"passed":false},{"actual":52651,"check":"indexed indirect plain","expected":43981,"passed":false},{"actual":43998,"check":"indirect indexed adds after load","expected":43998,"passed":true},{"actual":13672,"check":"indirect indexed pointer wraps and crosses","expected":13672,"passed":true},{"actual":17,"check":"indirect indexed result wraps","expected":17,"passed":true},{"actual":255,"check":"zero page plain","expected":255,"passed":true},{"actual":8193,"check":"absolute Y with X set","expected":8193,"passed":true},{"actual":12561,"check":"absolute Y indexed","expected":12561,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"zero page indexed wraps\", \"actual\": 17, \"expected\": 17, \"passed\": true}, {\"check\": \"absolute indexed crosses page\", \"actual\": 4369, \"expected\": 4369, \"passed\": true}, {\"check\": \"absolute indexed wraps top\", \"actual\": 33, \"expected\": 33, \"passed\": true}, {\"check\": \"indirect jump page bug\", \"actual\": 25889, \"expected\": 25889, \"passed\": true}, {\"check\": \"indirect jump normal\", \"actual\": 119, \"expected\": 119, \"passed\": true}, {\"check\": \"indexed indirect pointer wraps\", \"actual\": 30772, \"expected\": 13432, \"passed\": false}, {\"check\": \"indexed indirect plain\", \"actual\": 52651, \"expected\": 43981, \"passed\": false}, {\"check\": \"indirect indexed adds after load\", \"actual\": 43998, \"expected\": 43998, \"passed\": true}, {\"check\": \"indirect indexed pointer wraps and crosses\", \"actual\": 13672, \"expected\": 13672, \"passed\": true}, {\"check\": \"indirect indexed result wraps\", \"actual\": 17, \"expected\": 17, \"passed\": true}, {\"check\": \"zero page plain\", \"actual\": 255, \"expected\": 255, \"passed\": true}, {\"check\": \"absolute Y with X set\", \"actual\": 8193, \"expected\": 8193, \"passed\": true}, {\"check\": \"absolute Y indexed\", \"actual\": 12561, \"expected\": 12561, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":46.553,"exit_code":1,"observations":[{"actual":17,"check":"zero page indexed wraps","expected":17,"passed":true},{"actual":4369,"check":"absolute indexed crosses page","expected":4369,"passed":true},{"actual":33,"check":"absolute indexed wraps top","expected":33,"passed":true},{"actual":25889,"check":"indirect jump page bug","expected":25889,"passed":true},{"actual":119,"check":"indirect jump normal","expected":119,"passed":true},{"actual":120,"check":"indexed indirect pointer wraps","expected":13432,"passed":false},{"actual":43981,"check":"indexed indirect plain","expected":43981,"passed":true},{"actual":43998,"check":"indirect indexed adds after load","expected":43998,"passed":true},{"actual":13672,"check":"indirect indexed pointer wraps and crosses","expected":13672,"passed":true},{"actual":17,"check":"indirect indexed result wraps","expected":17,"passed":true},{"actual":255,"check":"zero page plain","expected":255,"passed":true},{"actual":8193,"check":"absolute Y with X set","expected":8193,"passed":true},{"actual":12561,"check":"absolute Y indexed","expected":12561,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"zero page indexed wraps\", \"actual\": 17, \"expected\": 17, \"passed\": true}, {\"check\": \"absolute indexed crosses page\", \"actual\": 4369, \"expected\": 4369, \"passed\": true}, {\"check\": \"absolute indexed wraps top\", \"actual\": 33, \"expected\": 33, \"passed\": true}, {\"check\": \"indirect jump page bug\", \"actual\": 25889, \"expected\": 25889, \"passed\": true}, {\"check\": \"indirect jump normal\", \"actual\": 119, \"expected\": 119, \"passed\": true}, {\"check\": \"indexed indirect pointer wraps\", \"actual\": 120, \"expected\": 13432, \"passed\": false}, {\"check\": \"indexed indirect plain\", \"actual\": 43981, \"expected\": 43981, \"passed\": true}, {\"check\": \"indirect indexed adds after load\", \"actual\": 43998, \"expected\": 43998, \"passed\": true}, {\"check\": \"indirect indexed pointer wraps and crosses\", \"actual\": 13672, \"expected\": 13672, \"passed\": true}, {\"check\": \"indirect indexed result wraps\", \"actual\": 17, \"expected\": 17, \"passed\": true}, {\"check\": \"zero page plain\", \"actual\": 255, \"expected\": 255, \"passed\": true}, {\"check\": \"absolute Y with X set\", \"actual\": 8193, \"expected\": 8193, \"passed\": true}, {\"check\": \"absolute Y indexed\", \"actual\": 12561, \"expected\": 12561, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":46.493,"exit_code":0,"observations":[{"actual":17,"check":"zero page indexed wraps","expected":17,"passed":true},{"actual":4369,"check":"absolute indexed crosses page","expected":4369,"passed":true},{"actual":33,"check":"absolute indexed wraps top","expected":33,"passed":true},{"actual":25889,"check":"indirect jump page bug","expected":25889,"passed":true},{"actual":119,"check":"indirect jump normal","expected":119,"passed":true},{"actual":13432,"check":"indexed indirect pointer wraps","expected":13432,"passed":true},{"actual":43981,"check":"indexed indirect plain","expected":43981,"passed":true},{"actual":43998,"check":"indirect indexed adds after load","expected":43998,"passed":true},{"actual":13672,"check":"indirect indexed pointer wraps and crosses","expected":13672,"passed":true},{"actual":17,"check":"indirect indexed result wraps","expected":17,"passed":true},{"actual":255,"check":"zero page plain","expected":255,"passed":true},{"actual":8193,"check":"absolute Y with X set","expected":8193,"passed":true},{"actual":12561,"check":"absolute Y indexed","expected":12561,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"zero page indexed wraps\", \"actual\": 17, \"expected\": 17, \"passed\": true}, {\"check\": \"absolute indexed crosses page\", \"actual\": 4369, \"expected\": 4369, \"passed\": true}, {\"check\": \"absolute indexed wraps top\", \"actual\": 33, \"expected\": 33, \"passed\": true}, {\"check\": \"indirect jump page bug\", \"actual\": 25889, \"expected\": 25889, \"passed\": true}, {\"check\": \"indirect jump normal\", \"actual\": 119, \"expected\": 119, \"passed\": true}, {\"check\": \"indexed indirect pointer wraps\", \"actual\": 13432, \"expected\": 13432, \"passed\": true}, {\"check\": \"indexed indirect plain\", \"actual\": 43981, \"expected\": 43981, \"passed\": true}, {\"check\": \"indirect indexed adds after load\", \"actual\": 43998, \"expected\": 43998, \"passed\": true}, {\"check\": \"indirect indexed pointer wraps and crosses\", \"actual\": 13672, \"expected\": 13672, \"passed\": true}, {\"check\": \"indirect indexed result wraps\", \"actual\": 17, \"expected\": 17, \"passed\": true}, {\"check\": \"zero page plain\", \"actual\": 255, \"expected\": 255, \"passed\": true}, {\"check\": \"absolute Y with X set\", \"actual\": 8193, \"expected\": 8193, \"passed\": true}, {\"check\": \"absolute Y indexed\", \"actual\": 12561, \"expected\": 12561, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}