# Timing: every cycle, with its address Units: SPC700 cycles (1.024 MHz at the normal TEST setting; see [start-here.md](start-here.md) "Clocks"). Sources: anomie's SPC700 cycle doc (`docs/anomie-spc700-cycles.txt`, rev 1126, 2007-04-21: per-cycle address and data for each addressing-mode group, with notes saying which cycles blargg verified on hardware), anomie's opcode table (`docs/anomie-spc700.txt`, rev 1162, as `tests/anomie_opcodes.json`), ares `component/processor/spc700/ instructions.cpp` (byuu's microcode, the source SingleStepTests' generator says it took its timings from: "the timings are taken from Higan"; ISC), fullsnes "SPC700 Waitstates on Internal Cycles", and SingleStepTests spc700 (`src/spc700/v1`). Tiers and agreement are in [validation.md](validation.md). ## Agreement already measured (2026-10-21) `scripts/sst_survey.py` over all 256 SingleStepTests files (256,000 cases): - **Cycle counts agree with anomie's table on 254 of 256 opcodes, on every case, both paths of every conditional.** The two exceptions are `SLEEP` and `STOP`, which anomie leaves as `?` and the corpus records as 7 cycles, a generator artefact (C5). - MAME 0.285's per-instruction cycle deltas agree with the same table on **all 4,671,187 measurable instructions** of a 20-second run of gilyon's `spctest` (254 opcodes executed; [mame-oracle.md](mame-oracle.md)). MAME's core is instruction-level and independent of byuu's, so the counts rest on three sources that do not copy one another (anomie/blargg, higan via SST, MAME), all research-documentation or emulator tier; no hardware-captured per-instruction corpus exists. - **Bus kinds**: 228 opcodes show one kind sequence on all 1,000 cases; the other 28 are the conditionals, with exactly two (taken, not taken). No opcode's sequence depends on operands, page crossings or P. - **Read-before-write**: every case of `8F C4 C5 C6 C7 D4 D5 D7` reads the destination before writing it; `AF` never does; `FA` does only in the 6 cases where source and destination are the same address (the read is the source read); `DA` reads the low byte only. This matches anomie and fullsnes word for word. The corpus and anomie **disagree on the order of some cycles** (same count, different position of the internal cycle or of the stack/vector accesses): C4, C6, C7 in [undocumented-behavior.md](undocumented-behavior.md). The corpus gives internal cycles no address (C1). ## Notation `R@x` read, `D@x` dummy read (a read whose value is discarded; SST records data `null` except where its generator happened to read the address before, e.g. TCALL's), `W@x` write, `I` internal cycle (SST `wait`, no address). `dp` = `P*$100`; `(d+X)` means `dp + ((d + X) & $FF)`. Every row starts with the opcode fetch `R@PC`. The column "anomie" names the group in `anomie-spc700-cycles.txt` and its own confidence note. ## By addressing-mode group The sequences are SingleStepTests' (= ares/higan), with addresses from ares' `instructions.cpp`, checked against the corpus' recorded addresses. | Group | Example | Cyc | Cycles after the opcode fetch | anomie | | --- | --- | --- | --- | --- | | implied, register | `NOP`, `MOV A,X`, `INC A`, `ASL A`, `CLRC`, `SETP` | 2 | `D@PC` | 2, 25: "IO ??"; "should be accurate" | | implied, 3 cycles | `NOTC`, `DAA`, `DAS`, `EI`, `DI` | 3 | `D@PC`, `I` | 25 | | `XCN` | | 5 | `D@PC`, `I`, `I`, `I` | 25 | | `MUL YA` | | 9 | `D@PC`, 7 × `I` | 25 | | `DIV YA,X` | | 12 | `D@PC`, 10 × `I` | 25 | | immediate | `ADC A,#i` | 2 | `R@PC+1` | 1, "should be accurate" | | direct | `ADC A,d` | 3 | `R@PC+1` (d), `R@dp+d` | 3, verified by blargg | | direct indexed | `ADC A,d+X` | 4 | `R@PC+1`, `I`, `R@(d+X)` | 4, data on 4 verified | | `(X)` | `ADC A,(X)` | 3 | `D@PC`, `R@dp+X` | 5a, verified | | `(X)+` load | `MOV A,(X)+` | 4 | `D@PC`, `R@dp+X`, `I` (X++) | 5b, verified | | `[d+X]` | `ADC A,[d+X]` | 6 | `R@PC+1`, `I`, `R@(d+X)`, `R@(d+X+1)`, `R@ptr` | 6, data on 6 verified | | `[d]+Y` | `ADC A,[d]+Y` | 6 | `R@PC+1`, **`I`**, `R@dp+d`, `R@dp+(d+1)`, `R@ptr+Y` | 7: `I` on cycle 5, "most likely" (C4) | | absolute | `ADC A,!a` | 4 | `R@PC+1`, `R@PC+2`, `R@a` | 8, verified | | absolute indexed | `ADC A,!a+X` | 5 | `R@PC+1`, `R@PC+2`, `I`, `R@a+X` | 9, data on 5 verified | | `d,#i` RMW | `ADC d,#i`, `MOV d,#i` | 5 | `R@PC+1` (i), `R@PC+2` (d), `R@dp+d`, `W@dp+d` | 10, verified; "RMW even for MOV" | | `d,#i` compare | `CMP d,#i` | 5 | `R@PC+1`, `R@PC+2`, `R@dp+d`, `I` | 10: "does it IO or read again?" (C8) | | `dd,ds` RMW | `ADC dd,ds` | 6 | `R@PC+1` (ds), `R@ds`, `R@PC+2` (dd), `R@dd`, `W@dd` | 18, verified | | `dd,ds` compare | `CMP dd,ds` | 6 | ..., `R@dd`, `I` | 18: "IO or read again?" (C8) | | `MOV dd,ds` | `FA` | 5 | `R@PC+1`, `R@ds`, `R@PC+2`, `W@dd` | 18, "skip cycle 5 for MOV" | | `(X),(Y)` | `ADC (X),(Y)` | 5 | `D@PC`, `R@dp+Y`, `R@dp+X`, `W@dp+X` | 19, verified; CMP: `I` last | | store direct | `MOV d,A` | 4 | `R@PC+1`, `R@dp+d`, `W@dp+d` | 11, verified | | store direct indexed | `MOV d+X,A` | 5 | `R@PC+1`, `I`, `R@(d+X)`, `W@(d+X)` | 12, verified | | store `(X)` | `MOV (X),A` | 4 | `D@PC`, `R@dp+X`, `W@dp+X` | 13a, verified | | store `(X)+` | `MOV (X)+,A` | 4 | `D@PC`, `I`, `W@dp+X` (X++) | 13b, verified, "No RMW here" | | store `[d+X]` | `MOV [d+X],A` | 7 | `R@PC+1`, `I`, `R@(d+X)`, `R@(d+X+1)`, `R@ptr`, `W@ptr` | 14, 6-7 verified | | store `[d]+Y` | `MOV [d]+Y,A` | 7 | `R@PC+1`, `R@dp+d`, `R@dp+(d+1)`, **`I`**, `R@ptr+Y`, `W@ptr+Y` | 15, 6-7 verified | | store absolute | `MOV !a,A` | 5 | `R@PC+1`, `R@PC+2`, `R@a`, `W@a` | 16, verified | | store absolute indexed | `MOV !a+X,A` | 6 | `R@PC+1`, `R@PC+2`, `I`, `R@a+X`, `W@a+X` | 17, 5-6 verified | | RMW direct | `INC d`, `SET1 d.b` | 4 | `R@PC+1`, `R@dp+d`, `W@dp+d` | 20a, verified | | RMW direct indexed | `INC d+X` | 5 | `R@PC+1`, `I`, `R@(d+X)`, `W@(d+X)` | 21, 4-5 verified | | RMW absolute | `INC !a` | 5 | `R@PC+1`, `R@PC+2`, `R@a`, `W@a` | 22, verified | | `TSET1`/`TCLR1 !a` | | 6 | `R@PC+1`, `R@PC+2`, `R@a`, `R@a`, `W@a` | 22: the second read "only for TSET1 and TCLR1" | | `NOT1 m.b` | | 5 | `R@PC+1`, `R@PC+2`, `R@m`, `W@m` | 20b, verified | | `MOV1 C,m.b`, `AND1` | | 4 | `R@PC+1`, `R@PC+2`, `R@m` | 23, verified | | `OR1`, `EOR1` | | 5 | `R@PC+1`, `R@PC+2`, `R@m`, `I` | 23, "cycle 5 only in EOR1 and OR1" | | `MOV1 m.b,C` | `CA` | 6 | `R@PC+1`, `R@PC+2`, `R@m`, `I`, `W@m` | 24, verified | | `MOVW YA,d`, `ADDW`, `SUBW` | | 5 | `R@PC+1`, `R@dp+d`, `I`, `R@dp+(d+1)` | 26, verified | | `CMPW YA,d` | | 4 | `R@PC+1`, `R@dp+d`, `R@dp+(d+1)` | 26, "no cycle 4 for CMPW" | | `MOVW d,YA` | `DA` | 5 | `R@PC+1`, `R@dp+d`, `W@dp+d` (A), `W@dp+(d+1)` (Y) | 27, verified, "RMW on low byte only" | | `INCW`/`DECW d` | | 6 | `R@PC+1`, `R@dp+d`, `W@dp+d`, `R@dp+(d+1)`, `W@dp+(d+1)` | 28, verified | | `PUSH r` | | 4 | `D@PC`, `W@$100+SP` (SP--), `I` | 29: "IO, S, IO"; "Or is it Data-IO-IO or IO-IO-Data?" (C6) | | `POP r` | | 4 | `D@PC`, `I`, `R@$100+SP+1` | 29 (C6) | | `JMP !a` | `5F` | 3 | `R@PC+1`, `R@PC+2` | 30a, "should be accurate" | | `JMP [!a+X]` | `1F` | 6 | `R@PC+1`, `R@PC+2`, `I`, `R@a+X`, `R@a+X+1` | 30b, "fairly accurate" | | branch | `BNE r` | 2/4 | `R@PC+1`; taken: `I`, `I` | 31a, "should be accurate" | | `BBS/BBC d.b,r`, `CBNE d,r` | | 5/7 | `R@PC+1` (d), `R@dp+d`, `I`, `R@PC+2` (r); taken: `I`, `I` | 31b: `R` on 4, `I` on 5; 1-3 verified (C7) | | `CBNE d+X,r` | `DE` | 6/8 | `R@PC+1`, `I`, `R@(d+X)`, `I`, `R@PC+2`; taken: `I`, `I` | 31c: "the rest is guesswork" (C7) | | `DBNZ d,r` | `6E` | 5/7 | `R@PC+1`, `R@dp+d`, `W@dp+d`, `R@PC+2`; taken: `I`, `I` | 31d, 3-4 verified | | `DBNZ Y,r` | `FE` | 4/6 | `D@PC`, `I`, `R@PC` (r); taken: `I`, `I` | 31e: `R` on 2, `I` 3-4 (C7) | | `CALL !a` | `3F` | 8 | `R@PC+1`, `R@PC+2`, `I`, `W@SP` (PCH), `W@SP-1` (PCL), `I`, `I` | 32a: pushes on 2-3, "may be wrong" (C6) | | `PCALL u` | `4F` | 6 | `R@PC+1`, `I`, `W@SP` (PCH), `W@SP-1` (PCL), `I` | 32b: pushes on 2-3, read u on 4, vector reads (C6, C3) | | `TCALL n` | `n1` | 8 | `D@PC`, `I`, `W@SP` (PCH), `W@SP-1` (PCL), `I`, `R@$FFDE-2n`, `R@+1` | 32c (C6) | | `BRK` | `0F` | 8 | `D@PC`, `W@SP` (PCH), `W@SP-1` (PCL), `W@SP-2` (PSW), `I`, `R@$FFDE`, `R@$FFDF` | 32d; ares the same (`instructionBreak`); anomie has IO for the `D` (C6) | | `RET` | `6F` | 5 | `D@PC`, `I`, `R@SP+1` (PCL), `R@SP+2` (PCH) | 33a: pops on 2-3, `I` 4-5 (C6) | | `RET1` | `7F` | 6 | `D@PC`, `I`, `R@SP+1` (PSW), `R@SP+2`, `R@SP+3` | 33b (C6) | | `SLEEP`, `STOP` | `EF`, `FF` | ∞ | ares: (`D@PC`, `I`) forever; SST: 3 pairs then stops (C5) | `?` | "PC" in a row is the address of the byte after the opcode (the opcode fetch has already advanced it); stack addresses are `$0100 + SP` at the time of the access, SP decremented after each push and incremented before each pull. The TCALL/CALL/PCALL return address pushed is that of the next instruction. ## S-SMP timing the board applies None of this is the core's, but the core's callbacks must let the board do it: - **Base**: one SPC700 cycle = 2 S-SMP input clocks = 24 crystal clocks (24.576 MHz ÷ 12 ÷ 2), at TEST = `$0A`. - **Wait states** (TEST bits 4-5 for RAM, 6-7 for I/O `$F0`-`$FF` and the mapped IPL ROM): an access takes 1/2/5/10 cycles for settings 0-3 (fullsnes). ares prices them as 2/4/10/20 input clocks for the CPU but advance the timers by 2/4/8/16 ("due to an unknown hardware issue, clock dividers of 8 and 16 are glitchy ... the SMP will deadlock"), ares `sfc/smp/timing.cpp`. blargg's `notes.txt` (2010 archive) holds the measurements byuu's model was fitted to (blargg's prose; the notes are run as data, not code). - **Internal cycles' wait class**: ares gives every internal cycle the I/O wait states; fullsnes gives, per opcode, the number of internal cycles that take I/O waits (the rest take RAM waits) (C3). The table below lists fullsnes' count beside each opcode. - **`$F4`-`$F7` reads** are split in two half-cycles in ares (`sfc/smp/memory.cpp` l.15-22: "reads from $00f4-$00f7 require more time than internal reads": `wait(1)`, read, `wait(1)`), so the S-CPU's port write lands mid-cycle. Board detail. - **Timers**: stage 1 is 128 cycles (timers 0, 1: 8 kHz) or 16 cycles (timer 2: 64 kHz) at 1.024 MHz (anomie "$00fa"), clocked from the same cycle stream, so the board advances them inside the core's callbacks. ## Every opcode Generated from `tests/anomie_opcodes.json`, the SingleStepTests files and fullsnes' internal-cycle wait table (`R` read, `D` dummy read with null data in the corpus, `W` write, `I` internal). Where two sequences appear they are the not-taken and taken paths. One cross-check fails: fullsnes counts 3 I/O-wait internal cycles for `PCALL` (4F), more than the 2 internal cycles the corpus has (C6); for every other opcode fullsnes' count fits within the taken path's internal and dummy-read cycles (TCALL counting its first-cycle dummy read, which the corpus records with data). | Op | Instruction | Cycles (anomie) | SST kinds (not taken / taken) | I/O-wait internal cycles (fullsnes) | | --- | --- | --- | --- | --- | | 00 | `NOP` | 2 | `RD` | 0 | | 01 | `TCALL 0` | 8 | `RRIWWIRR` | 3 | | 02 | `SET1 d.0` | 4 | `RRRW` | 0 | | 03 | `BBS d.0, r` | 5/7 | `RRRIR` / `RRRIRII` | 1 | | 04 | `OR A, d` | 3 | `RRR` | 0 | | 05 | `OR A, !a` | 4 | `RRRR` | 0 | | 06 | `OR A, (X)` | 3 | `RDR` | 0 | | 07 | `OR A, [d+X]` | 6 | `RRIRRR` | 1 | | 08 | `OR A, #i` | 2 | `RR` | 0 | | 09 | `OR dd, ds` | 6 | `RRRRRW` | 0 | | 0A | `OR1 C, m.b` | 5 | `RRRRI` | 1 | | 0B | `ASL d` | 4 | `RRRW` | 0 | | 0C | `ASL !a` | 5 | `RRRRW` | 0 | | 0D | `PUSH PSW` | 4 | `RDWI` | 1 | | 0E | `TSET1 !a` | 6 | `RRRRRW` | 0 | | 0F | `BRK` | 8 | `RDWWWIRR` | 2 | | 10 | `BPL r` | 2/4 | `RR` / `RRII` | 2 | | 11 | `TCALL 1` | 8 | `RRIWWIRR` | 3 | | 12 | `CLR1 d.0` | 4 | `RRRW` | 0 | | 13 | `BBC d.0, r` | 5/7 | `RRRIR` / `RRRIRII` | 3 | | 14 | `OR A, d+X` | 4 | `RRIR` | 1 | | 15 | `OR A, !a+X` | 5 | `RRRIR` | 1 | | 16 | `OR A, !a+Y` | 5 | `RRRIR` | 1 | | 17 | `OR A, [d]+Y` | 6 | `RRIRRR` | 1 | | 18 | `OR d, #i` | 5 | `RRRRW` | 0 | | 19 | `OR (X), (Y)` | 5 | `RDRRW` | 0 | | 1A | `DECW d` | 6 | `RRRWRW` | 0 | | 1B | `ASL d+X` | 5 | `RRIRW` | 1 | | 1C | `ASL A` | 2 | `RD` | 0 | | 1D | `DEC X` | 2 | `RD` | 0 | | 1E | `CMP X, !a` | 4 | `RRRR` | 0 | | 1F | `JMP [!a+X]` | 6 | `RRRIRR` | 1 | | 20 | `CLRP` | 2 | `RD` | 0 | | 21 | `TCALL 2` | 8 | `RRIWWIRR` | 3 | | 22 | `SET1 d.1` | 4 | `RRRW` | 0 | | 23 | `BBS d.1, r` | 5/7 | `RRRIR` / `RRRIRII` | 1 | | 24 | `AND A, d` | 3 | `RRR` | 0 | | 25 | `AND A, !a` | 4 | `RRRR` | 0 | | 26 | `AND A, (X)` | 3 | `RDR` | 0 | | 27 | `AND A, [d+X]` | 6 | `RRIRRR` | 1 | | 28 | `AND A, #i` | 2 | `RR` | 0 | | 29 | `AND dd, ds` | 6 | `RRRRRW` | 0 | | 2A | `OR1 C, /m.b` | 5 | `RRRRI` | 1 | | 2B | `ROL d` | 4 | `RRRW` | 0 | | 2C | `ROL !a` | 5 | `RRRRW` | 0 | | 2D | `PUSH A` | 4 | `RDWI` | 1 | | 2E | `CBNE d, r` | 5/7 | `RRRIR` / `RRRIRII` | 3 | | 2F | `BRA r` | 4 | `RRII` | 2 | | 30 | `BMI r` | 2/4 | `RR` / `RRII` | 0 | | 31 | `TCALL 3` | 8 | `RRIWWIRR` | 3 | | 32 | `CLR1 d.1` | 4 | `RRRW` | 0 | | 33 | `BBC d.1, r` | 5/7 | `RRRIR` / `RRRIRII` | 3 | | 34 | `AND A, d+X` | 4 | `RRIR` | 1 | | 35 | `AND A, !a+X` | 5 | `RRRIR` | 1 | | 36 | `AND A, !a+Y` | 5 | `RRRIR` | 1 | | 37 | `AND A, [d]+Y` | 6 | `RRIRRR` | 1 | | 38 | `AND d, #i` | 5 | `RRRRW` | 0 | | 39 | `AND (X), (Y)` | 5 | `RDRRW` | 0 | | 3A | `INCW d` | 6 | `RRRWRW` | 0 | | 3B | `ROL d+X` | 5 | `RRIRW` | 1 | | 3C | `ROL A` | 2 | `RD` | 0 | | 3D | `INC X` | 2 | `RD` | 0 | | 3E | `CMP X, d` | 3 | `RRR` | 0 | | 3F | `CALL !a` | 8 | `RRRIWWII` | 3 | | 40 | `SETP` | 2 | `RD` | 0 | | 41 | `TCALL 4` | 8 | `RRIWWIRR` | 3 | | 42 | `SET1 d.2` | 4 | `RRRW` | 0 | | 43 | `BBS d.2, r` | 5/7 | `RRRIR` / `RRRIRII` | 1 | | 44 | `EOR A, d` | 3 | `RRR` | 0 | | 45 | `EOR A, !a` | 4 | `RRRR` | 0 | | 46 | `EOR A, (X)` | 3 | `RDR` | 0 | | 47 | `EOR A, [d+X]` | 6 | `RRIRRR` | 1 | | 48 | `EOR A, #i` | 2 | `RR` | 0 | | 49 | `EOR dd, ds` | 6 | `RRRRRW` | 0 | | 4A | `AND1 C, m.b` | 4 | `RRRR` | 0 | | 4B | `LSR d` | 4 | `RRRW` | 0 | | 4C | `LSR !a` | 5 | `RRRRW` | 0 | | 4D | `PUSH X` | 4 | `RDWI` | 1 | | 4E | `TCLR1 !a` | 6 | `RRRRRW` | 0 | | 4F | `PCALL u` | 6 | `RRIWWI` | 3 | | 50 | `BVC r` | 2/4 | `RR` / `RRII` | 2 | | 51 | `TCALL 5` | 8 | `RRIWWIRR` | 3 | | 52 | `CLR1 d.2` | 4 | `RRRW` | 0 | | 53 | `BBC d.2, r` | 5/7 | `RRRIR` / `RRRIRII` | 3 | | 54 | `EOR A, d+X` | 4 | `RRIR` | 1 | | 55 | `EOR A, !a+X` | 5 | `RRRIR` | 1 | | 56 | `EOR A, !a+Y` | 5 | `RRRIR` | 1 | | 57 | `EOR A, [d]+Y` | 6 | `RRIRRR` | 1 | | 58 | `EOR d, #i` | 5 | `RRRRW` | 0 | | 59 | `EOR (X), (Y)` | 5 | `RDRRW` | 0 | | 5A | `CMPW YA, d` | 4 | `RRRR` | 0 | | 5B | `LSR d+X` | 5 | `RRIRW` | 1 | | 5C | `LSR A` | 2 | `RD` | 0 | | 5D | `MOV X, A` | 2 | `RD` | 0 | | 5E | `CMP Y, !a` | 4 | `RRRR` | 0 | | 5F | `JMP !a` | 3 | `RRR` | 0 | | 60 | `CLRC` | 2 | `RD` | 0 | | 61 | `TCALL 6` | 8 | `RRIWWIRR` | 3 | | 62 | `SET1 d.3` | 4 | `RRRW` | 0 | | 63 | `BBS d.3, r` | 5/7 | `RRRIR` / `RRRIRII` | 1 | | 64 | `CMP A, d` | 3 | `RRR` | 0 | | 65 | `CMP A, !a` | 4 | `RRRR` | 0 | | 66 | `CMP A, (X)` | 3 | `RDR` | 0 | | 67 | `CMP A, [d+X]` | 6 | `RRIRRR` | 1 | | 68 | `CMP A, #i` | 2 | `RR` | 0 | | 69 | `CMP dd, ds` | 6 | `RRRRRI` | 1 | | 6A | `AND1 C, /m.b` | 4 | `RRRR` | 0 | | 6B | `ROR d` | 4 | `RRRW` | 0 | | 6C | `ROR !a` | 5 | `RRRRW` | 0 | | 6D | `PUSH Y` | 4 | `RDWI` | 1 | | 6E | `DBNZ d, r` | 5/7 | `RRRWR` / `RRRWRII` | 2 | | 6F | `RET` | 5 | `RDIRR` | 1 | | 70 | `BVS r` | 2/4 | `RR` / `RRII` | 0 | | 71 | `TCALL 7` | 8 | `RRIWWIRR` | 3 | | 72 | `CLR1 d.3` | 4 | `RRRW` | 0 | | 73 | `BBC d.3, r` | 5/7 | `RRRIR` / `RRRIRII` | 3 | | 74 | `CMP A, d+X` | 4 | `RRIR` | 1 | | 75 | `CMP A, !a+X` | 5 | `RRRIR` | 1 | | 76 | `CMP A, !a+Y` | 5 | `RRRIR` | 1 | | 77 | `CMP A, [d]+Y` | 6 | `RRIRRR` | 1 | | 78 | `CMP d, #i` | 5 | `RRRRI` | 1 | | 79 | `CMP (X), (Y)` | 5 | `RDRRI` | 1 | | 7A | `ADDW YA, d` | 5 | `RRRIR` | 1 | | 7B | `ROR d+X` | 5 | `RRIRW` | 1 | | 7C | `ROR A` | 2 | `RD` | 0 | | 7D | `MOV A, X` | 2 | `RD` | 0 | | 7E | `CMP Y, d` | 3 | `RRR` | 0 | | 7F | `RET1` | 6 | `RDIRRR` | 1 | | 80 | `SETC` | 2 | `RD` | 0 | | 81 | `TCALL 8` | 8 | `RRIWWIRR` | 3 | | 82 | `SET1 d.4` | 4 | `RRRW` | 0 | | 83 | `BBS d.4, r` | 5/7 | `RRRIR` / `RRRIRII` | 1 | | 84 | `ADC A, d` | 3 | `RRR` | 0 | | 85 | `ADC A, !a` | 4 | `RRRR` | 0 | | 86 | `ADC A, (X)` | 3 | `RDR` | 0 | | 87 | `ADC A, [d+X]` | 6 | `RRIRRR` | 1 | | 88 | `ADC A, #i` | 2 | `RR` | 0 | | 89 | `ADC dd, ds` | 6 | `RRRRRW` | 0 | | 8A | `EOR1 C, m.b` | 5 | `RRRRI` | 1 | | 8B | `DEC d` | 4 | `RRRW` | 0 | | 8C | `DEC !a` | 5 | `RRRRW` | 0 | | 8D | `MOV Y, #i` | 2 | `RR` | 0 | | 8E | `POP PSW` | 4 | `RDIR` | 1 | | 8F | `MOV d, #i` | 5 | `RRRRW` | 0 | | 90 | `BCC r` | 2/4 | `RR` / `RRII` | 2 | | 91 | `TCALL 9` | 8 | `RRIWWIRR` | 3 | | 92 | `CLR1 d.4` | 4 | `RRRW` | 0 | | 93 | `BBC d.4, r` | 5/7 | `RRRIR` / `RRRIRII` | 3 | | 94 | `ADC A, d+X` | 4 | `RRIR` | 1 | | 95 | `ADC A, !a+X` | 5 | `RRRIR` | 1 | | 96 | `ADC A, !a+Y` | 5 | `RRRIR` | 1 | | 97 | `ADC A, [d]+Y` | 6 | `RRIRRR` | 1 | | 98 | `ADC d, #i` | 5 | `RRRRW` | 0 | | 99 | `ADC (X), (Y)` | 5 | `RDRRW` | 0 | | 9A | `SUBW YA, d` | 5 | `RRRIR` | 1 | | 9B | `DEC d+X` | 5 | `RRIRW` | 1 | | 9C | `DEC A` | 2 | `RD` | 0 | | 9D | `MOV X, SP` | 2 | `RD` | 0 | | 9E | `DIV YA, X` | 12 | `RDIIIIIIIIII` | 10 | | 9F | `XCN A` | 5 | `RDIII` | 3 | | A0 | `EI` | 3 | `RDI` | 1 | | A1 | `TCALL 10` | 8 | `RRIWWIRR` | 3 | | A2 | `SET1 d.5` | 4 | `RRRW` | 0 | | A3 | `BBS d.5, r` | 5/7 | `RRRIR` / `RRRIRII` | 1 | | A4 | `SBC A, d` | 3 | `RRR` | 0 | | A5 | `SBC A, !a` | 4 | `RRRR` | 0 | | A6 | `SBC A, (X)` | 3 | `RDR` | 0 | | A7 | `SBC A, [d+X]` | 6 | `RRIRRR` | 1 | | A8 | `SBC A, #i` | 2 | `RR` | 0 | | A9 | `SBC dd, ds` | 6 | `RRRRRW` | 0 | | AA | `MOV1 C, m.b` | 4 | `RRRR` | 0 | | AB | `INC d` | 4 | `RRRW` | 0 | | AC | `INC !a` | 5 | `RRRRW` | 0 | | AD | `CMP Y, #i` | 2 | `RR` | 0 | | AE | `POP A` | 4 | `RDIR` | 1 | | AF | `MOV (X)+, A` | 4 | `RDIW` | 1 | | B0 | `BCS r` | 2/4 | `RR` / `RRII` | 0 | | B1 | `TCALL 11` | 8 | `RRIWWIRR` | 3 | | B2 | `CLR1 d.5` | 4 | `RRRW` | 0 | | B3 | `BBC d.5, r` | 5/7 | `RRRIR` / `RRRIRII` | 3 | | B4 | `SBC A, d+X` | 4 | `RRIR` | 1 | | B5 | `SBC A, !a+X` | 5 | `RRRIR` | 1 | | B6 | `SBC A, !a+Y` | 5 | `RRRIR` | 1 | | B7 | `SBC A, [d]+Y` | 6 | `RRIRRR` | 1 | | B8 | `SBC d, #i` | 5 | `RRRRW` | 0 | | B9 | `SBC (X), (Y)` | 5 | `RDRRW` | 0 | | BA | `MOVW YA, d` | 5 | `RRRIR` | 1 | | BB | `INC d+X` | 5 | `RRIRW` | 1 | | BC | `INC A` | 2 | `RD` | 0 | | BD | `MOV SP, X` | 2 | `RD` | 0 | | BE | `DAS A` | 3 | `RDI` | 1 | | BF | `MOV A, (X)+` | 4 | `RDRI` | 1 | | C0 | `DI` | 3 | `RDI` | 1 | | C1 | `TCALL 12` | 8 | `RRIWWIRR` | 3 | | C2 | `SET1 d.6` | 4 | `RRRW` | 0 | | C3 | `BBS d.6, r` | 5/7 | `RRRIR` / `RRRIRII` | 1 | | C4 | `MOV d, A` | 4 | `RRRW` | 0 | | C5 | `MOV !a, A` | 5 | `RRRRW` | 0 | | C6 | `MOV (X), A` | 4 | `RDRW` | 0 | | C7 | `MOV [d+X], A` | 7 | `RRIRRRW` | 1 | | C8 | `CMP X, #i` | 2 | `RR` | 0 | | C9 | `MOV !a, X` | 5 | `RRRRW` | 0 | | CA | `MOV1 m.b, C` | 6 | `RRRRIW` | 1 | | CB | `MOV d, Y` | 4 | `RRRW` | 0 | | CC | `MOV !a, Y` | 5 | `RRRRW` | 0 | | CD | `MOV X, #i` | 2 | `RR` | 0 | | CE | `POP X` | 4 | `RDIR` | 1 | | CF | `MUL YA` | 9 | `RDIIIIIII` | 7 | | D0 | `BNE r` | 2/4 | `RR` / `RRII` | 2 | | D1 | `TCALL 13` | 8 | `RRIWWIRR` | 3 | | D2 | `CLR1 d.6` | 4 | `RRRW` | 0 | | D3 | `BBC d.6, r` | 5/7 | `RRRIR` / `RRRIRII` | 3 | | D4 | `MOV d+X, A` | 5 | `RRIRW` | 1 | | D5 | `MOV !a+X, A` | 6 | `RRRIRW` | 1 | | D6 | `MOV !a+Y, A` | 6 | `RRRIRW` | 1 | | D7 | `MOV [d]+Y, A` | 7 | `RRRRIRW` | 1 | | D8 | `MOV d, X` | 4 | `RRRW` | 0 | | D9 | `MOV d+Y, X` | 5 | `RRIRW` | 1 | | DA | `MOVW d, YA` | 5 | `RRRWW` | 0 | | DB | `MOV d+X, Y` | 5 | `RRIRW` | 1 | | DC | `DEC Y` | 2 | `RD` | 0 | | DD | `MOV A, Y` | 2 | `RD` | 0 | | DE | `CBNE d+X, r` | 6/8 | `RRIRIR` / `RRIRIRII` | 4 | | DF | `DAA A` | 3 | `RDI` | 1 | | E0 | `CLRV` | 2 | `RD` | 0 | | E1 | `TCALL 14` | 8 | `RRIWWIRR` | 3 | | E2 | `SET1 d.7` | 4 | `RRRW` | 0 | | E3 | `BBS d.7, r` | 5/7 | `RRRIR` / `RRRIRII` | 1 | | E4 | `MOV A, d` | 3 | `RRR` | 0 | | E5 | `MOV A, !a` | 4 | `RRRR` | 0 | | E6 | `MOV A, (X)` | 3 | `RDR` | 0 | | E7 | `MOV A, [d+X]` | 6 | `RRIRRR` | 1 | | E8 | `MOV A, #i` | 2 | `RR` | 0 | | E9 | `MOV X, !a` | 4 | `RRRR` | 0 | | EA | `NOT1 m.b` | 5 | `RRRRW` | 0 | | EB | `MOV Y, d` | 3 | `RRR` | 0 | | EC | `MOV Y, !a` | 4 | `RRRR` | 0 | | ED | `NOTC` | 3 | `RDI` | 1 | | EE | `POP Y` | 4 | `RDIR` | 1 | | EF | `SLEEP` | ? | `RDIDIDI` | 0 | | F0 | `BEQ r` | 2/4 | `RR` / `RRII` | 0 | | F1 | `TCALL 15` | 8 | `RRIWWIRR` | 3 | | F2 | `CLR1 d.7` | 4 | `RRRW` | 0 | | F3 | `BBC d.7, r` | 5/7 | `RRRIR` / `RRRIRII` | 3 | | F4 | `MOV A, d+X` | 4 | `RRIR` | 1 | | F5 | `MOV A, !a+X` | 5 | `RRRIR` | 1 | | F6 | `MOV A, !a+Y` | 5 | `RRRIR` | 1 | | F7 | `MOV A, [d]+Y` | 6 | `RRIRRR` | 1 | | F8 | `MOV X, d` | 3 | `RRR` | 0 | | F9 | `MOV X, d+Y` | 4 | `RRIR` | 1 | | FA | `MOV dd, ds` | 5 | `RRRRW` | 0 | | FB | `MOV Y, d+X` | 4 | `RRIR` | 1 | | FC | `INC Y` | 2 | `RD` | 0 | | FD | `MOV Y, A` | 2 | `RD` | 0 | | FE | `DBNZ Y, r` | 4/6 | `RDIR` / `RDIRII` | 3 | | FF | `STOP` | ? | `RDIDIDI` | 0 |