Tracing a program means playing the CPU yourself. Start from the reset state and, for each instruction the PC reaches, write down what changes.
A Tiny8 trace line usually records the PC, the ACC, Z and any memory word written. Habits that prevent slips:
- PC after an instruction = its address + 1, unless a jump is taken.
- Only LOAD, ADD and SUB change Z. STORE and jumps leave it alone.
- 8-bit results wrap: 200 + 100 gives 44; 3 − 5 gives 254.
- A word runs if the PC reaches it, whatever the programmer meant.
00is HALT. - Data in listings is hex:
0Ais 10,14is 20. - For a program loop, trace one pass carefully, spot the pattern, then check the last pass separately.
At the clock level you can also trace one register transfer per cycle, but for whole programs one instruction per line is enough.