- CPU core: 65C02-compatible with HuC6280 extensions
- Registers affected: A, X, Y, S, P, PC
- Flags in P: N V T B D I Z C
- Cycle counts are base values; page-cross penalties are noted when applicable
- Bytes include opcode and operands
- Bytes: 2–3
- Cycles: 2–6
- Modes: IMM, ZP, ZP,X, (ZP), (ZP,X), (ZP),Y, ABS, ABS,X, ABS,Y
- Operation: A ← A + M + C
- Flags: N V Z C
- Bytes: 2–3
- Cycles: 2–6
- Modes: IMM, ZP, ZP,X, (ZP), (ZP,X), (ZP),Y, ABS, ABS,X, ABS,Y
- Operation: A ← A − M − (1 − C)
- Flags: N V Z C
- Bytes: 1–3
- Cycles: 2–7
- Modes: ACC, ZP, ZP,X, ABS, ABS,X
- Operation: M or A ← M or A + 1
- Flags: N Z
- Bytes: 1–3
- Cycles: 2–7
- Modes: ACC, ZP, ZP,X, ABS, ABS,X
- Operation: M or A ← M or A − 1
- Flags: N Z
- Bytes: 1
- Cycles: 2
- Operation: X or Y ← X or Y + 1
- Flags: N Z
- Bytes: 1
- Cycles: 2
- Operation: X or Y ← X or Y − 1
- Flags: N Z
- Bytes: 2–3
- Cycles: 2–6
- Modes: IMM, ZP, ZP,X, (ZP), (ZP,X), (ZP),Y, ABS, ABS,X, ABS,Y
- Operation:
- AND: A ← A ∧ M
- ORA: A ← A ∨ M
- EOR: A ← A ⊕ M
- Flags: N Z
- Bytes: 2–3
- Cycles: 2–4
- Modes: IMM, ZP, ZP,X, ABS, ABS,X
- Operation: Test bits of M against A
- Flags: Z from A ∧ M, N and V from M
- Bytes: 1–3
- Cycles: 2–7
- Modes: ACC, ZP, ZP,X, ABS, ABS,X
- Operation:
- ASL: shift left, bit 7 → C
- LSR: shift right, bit 0 → C
- Flags: N Z C
- Bytes: 1–3
- Cycles: 2–7
- Modes: ACC, ZP, ZP,X, ABS, ABS,X
- Operation:
- Rotate through carry
- Flags: N Z C
- Bytes: 2–3
- Cycles: 2–6
- Modes:
- LDA: IMM, ZP, ZP,X, (ZP), (ZP,X), (ZP),Y, ABS, ABS,X, ABS,Y
- LDX: IMM, ZP, ZP,Y, ABS, ABS,Y
- LDY: IMM, ZP, ZP,X, ABS, ABS,X
- Operation: Load register from memory
- Flags: N Z
- Bytes: 2–3
- Cycles: 2–6
- Modes:
- STA: ZP, ZP,X, (ZP), (ZP,X), (ZP),Y, ABS, ABS,X, ABS,Y
- STX: ZP, ZP,Y, ABS
- STY: ZP, ZP,X, ABS
- STZ: ZP, ZP,X, ABS, ABS,X
- Operation: Store register or zero to memory
- Flags: none
- Bytes: 1
- Cycles: 2
- Operation: Transfer between A, X, Y
- Flags: N Z
- Bytes: 1
- Cycles: 2
- Operation: Transfer between S and X
- Flags: TSX sets N Z; TXS affects no flags
- Bytes: 1
- Cycles: 3
- Operation: Swap registers
- Flags: N Z
- Bytes: 1
- Cycles: 3
- Operation: Push register onto stack
- Flags: none
- Bytes: 1
- Cycles: 4
- Operation: Pull register from stack
- Flags: Loaded from value
- Bytes: 2
- Cycles: 2 (+1 if branch taken, +1 if page crossed)
- Instructions:
- BCC, BCS
- BEQ, BNE
- BMI, BPL
- BVC, BVS
- Operation: PC ← PC + offset if condition true
- Bytes: 2
- Cycles: 3
- Operation: PC ← PC + offset
- Bytes: 3
- Cycles: 5
- Operation:
- Test bit i of zero-page memory and branch on reset/set
- Bytes: 3
- Cycles: 3
- Modes: ABS, (ABS), (ABS,X)
- Operation: PC ← address
- Bytes: 3
- Cycles: 6
- Operation: Push return address; PC ← target
- Bytes: 1
- Cycles: 6
- Operation: Pull return address; PC ← PC + 1
- Bytes: 2
- Cycles: 8
- Operation: Relative subroutine call
- Bytes: 1
- Cycles: 7
- Operation: Restore P and PC from stack
| Instruction | Bytes | Cycles | Effect |
|---|---|---|---|
| CLC | 1 | 2 | C ← 0 |
| SEC | 1 | 2 | C ← 1 |
| CLI | 1 | 2 | I ← 0 |
| SEI | 1 | 2 | I ← 1 |
| CLD | 1 | 2 | D ← 0 |
| SED | 1 | 2 | D ← 1 |
| CLV | 1 | 2 | V ← 0 |
| SET | 1 | 2 | T ← 1 |
- Bytes: 2
- Cycles: 5
- Operation: Reset / Set bit i in zero-page memory
- Flags: none
- Bytes: 2–3
- Cycles: 5–6
- Modes: ZP, ABS
- Operation:
- TRB: M ← M & ~A
- TSB: M ← M | A
- Flags: Z from A ∧ M
- Bytes: 3–4
- Cycles: 5–7
- Modes: IMM ZP, IMM ZP,X, IMM ABS, IMM ABS,X
- Operation: Test memory against immediate
- Flags: Z, N, V
- Bytes: 7
- Cycles: Variable (per transferred word)
- Operation:
- Memory block transfer
- Source, destination, length from registers
- Registers used: A, X, Y, SH, DH, LH
- Flags: none
- Source increments
- Destination increments
- Source increments
- Destination alternates between increment and fixed
- Source alternates between increment and fixed
- Destination increments
- Source decrements
- Destination decrements
- Source fixed
- Destination increments
- Bytes: 2
- Cycles: 4
- Operation: Transfer A to mapping register i. Each bit set in the immediate operand selects one MPR (0–7).
- Bytes: 2
- Cycles: 4
- Operation: Transfer mapping register i to A
- Flags: N Z
- Bytes: 2
- Cycles: 4
- Operation: Store immediate value to HuC6270 control ports
- Target address determined by opcode
These instructions store an immediate value to fixed VDC I/O addresses:
| Instruction | Target |
|---|---|
| ST0 | VDC register select |
| ST1 | VDC data (low byte) |
| ST2 | VDC data (high byte) |
The target address is encoded in the opcode.
Flags affected:
- None
- Bytes: 1
- Cycles: 7
- Addressing: Implied
- Program Counter is incremented by 2
- High byte of PC is pushed to stack
- Low byte of PC is pushed to stack
- Status register P is pushed to stack with:
- B flag set
- T flag cleared
- Interrupt Disable flag (I) is set
- Program Counter is loaded from vector at $FFF6 (IRQ2/BRK)
BRK shares the IRQ2 vector.
Flags affected:
- B set in stacked value
- I set in P
- Bytes: 1
- Cycles: 2
- Operation: No operation
- Bytes: 1
- Cycles: 2
- Operation: A ← 0
- Flags: N Z
- Bytes: 1
- Cycles: 2
- Operation: X ← 0
- Flags: N Z
- Bytes: 1
- Cycles: 2
- Operation: Y ← 0
- Flags: N Z