All tutorials

Intermediate · 20 min

Debug across BASIC and Z80

Stop at a source breakpoint and keep the editor, PC, registers and disassembly aligned.

STEP 01

Set the breakpoint

Use a BASIC line breakpoint or place an assembly-source breakpoint on the entry label.

STEP 02

Start Debug

Build provenance must match the current source. Reassemble if the module is marked stale.

STEP 03

Step with intent

Use Step BASIC Line at language level, Step Instruction for opcodes, Step Over for calls and Run to Return for a bounded routine exit.

STEP 04

Capture evidence

Inspect variables, registers, stack, memory and SCREEN$ evidence before changing the program.

DZX STUDIO paused at a real BASIC line 110 breakpoint on the 128K target, with the source line highlighted, emulator output and line-profile entries for music_1.bas mapped to BASIC lines 8000–8006.
Stop at the line. Follow the call.

The 128K project stopped at BASIC line 110, after GO SUB 8000 returned. The line profile maps the linked music routine back to music_1.bas.

Expected result

Stop at a source breakpoint and keep the editor, PC, registers and disassembly aligned.