001. Initial files

Create the initial emulator source files.

Lesson 1 of 356 · tests/chapter_01_cpu/test_001_initial_files.py

Files to create

emulator/cpu/cpu.py
emulator/cpu/addressing_modes.py
emulator/cpu/instructions.py
emulator/bus/cpu_bus.py
emulator/memory/ram.py

Why this step exists

Establish the first source-code boundaries before implementing behavior. CPU state, address calculations, instruction behavior, bus routing, and memory storage should not begin in one monolithic file.

Steps to reproduce

1. Create emulator/cpu, emulator/bus, and emulator/memory if they do not exist.
2. Create the five empty Python files listed above.
3. Add __init__.py files to package directories when required by the environment.
4. Run this test and confirm that every expected path exists.

No implementation is required yet. Empty files are the intended result of this step.

Common misconception

Creating separate files does not require designing every future class now. This step defines only physical locations; later tests introduce responsibilities incrementally.

Out of scope

  • RAM behavior
  • CPU registers
  • bus address mapping
  • instruction execution

Run this lesson

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