Day 10: Cathode-Ray Tube
Day 10 involves simulating a CPU with a simple instruction set and a CRT display.
Problem Overview
You need to fix a small handheld device with a CPU and CRT screen. The task involves:
- Simulating a CPU that executes instructions with different timing
- Monitoring the X register at specific cycles
- Drawing pixels on a CRT screen based on the X register's value
This problem tests your ability to implement a simple processor simulation and track the state over time, as well as generating visual output based on that state.
Navigation
- Problem Description: Detailed description of the day's challenge
- Solution Explanation: Walkthrough of the approach used
- Code: The complete implementation with comments