129. Ora absolute

add ORA absolute opcode ``0x0D``.

Lesson 129 of 356 · tests/chapter_01_cpu/test_129_ORA_absolute.py

Why this step exists

Absolute ORA extends the operation beyond zero page by decoding a full little-endian address and reading its value before updating A and Z/N.

In this step, `or_a and the immediate/zero-page handlers already exist, so add exactly the following to emulator/cpu/opcodes.py`:

def ora_absolute(cpu: CPU):
    addr = absolute(cpu)
    value = cpu.bus.read(addr)
    or_a(cpu, value)

OPCODE_TABLE = {
    ...
    0x0D: ora_absolute,
}

`emulator/cpu/addressing_modes.py::absolute obtains a little-endian word through CPU.fetch_word. Therefore 0D 00 02 reads $0200 and sends that value to instructions.or_a`. A and Z/N change; Carry/Overflow and memory are invariant; opcode plus word advances PC three bytes.

Misconception: the operand word is an address, not an immediate value, and its low byte comes first. Out of scope: indexed absolute and indirect ORA modes (lessons 130-133).

Run this lesson

uv run pytest tests/chapter_01_cpu/test_129_ORA_absolute.py -v