087. Dey implied
Wire the DEY implied opcode.
Lesson 87 of 356 · tests/chapter_01_cpu/test_087_DEY_implied.py
In this step, use instructions.dey from Test 086 and add only its opcode integration.
Production location and symbols
emulator/cpu/opcodes.py: imported `dey` and `OPCODE_TABLE[0x88]`Why this step exists
DEY's Y-register operand is implicit, allowing direct table dispatch with no addressing-mode wrapper.
Suggested implementation for this step
# emulator/cpu/opcodes.py
from emulator.cpu.instructions import dey # alongside existing imports
OPCODE_TABLE = {
# ... existing entries ...
0x88: dey,
}Important invariants
- opcode 0x88 dispatches to the exact
dey(cpu)function - no operand is consumed and PC advances by one byte
- Y wrapping and Z/N updates remain owned by test 086's
dey
Common misconception
Do not build a memory-decrement wrapper around dec; DEY modifies the register and performs no bus read or write.
Out of scope
- prior INY behavior/mapping from tests 084-085
- ASL behavior and opcodes beginning at test 088
- cycle timing
Run this lesson
uv run pytest tests/chapter_01_cpu/test_087_DEY_implied.py -v