Source Navigation And ROM Source

A successful build gives Debug80 a current source map. That map lets VS Code navigate assembly symbols, show compact symbol details and open source that belongs to the TEC-1G monitor.

Go To Definition

Place the cursor on a symbol in a .asm or .z80 file and press F12. Debug80 opens the definition recorded in the last successful build.

Go to Definition on an assembly symbol

Build again after changing labels, constants or include files.

Workspace symbol search lists symbols from the active target: labels, constants, routines and data symbols.

Open the VS Code Command Palette with Shift-Command-P on macOS or Shift-Control-P on Windows and Linux, then run Debug80: Search Workspace Symbols. You can also press Command-T on macOS or Control-T on Windows and Linux to open VS Code’s symbol picker directly.

Command Palette entry for Debug80 workspace symbol search

Workspace symbol picker showing a Debug80 symbol

This is target-based search. Select the target, build it, then search the symbols from that target.

Symbol Hover

Hover over a known assembly symbol to see its source-map summary: name, kind, address or value, source file and line.

For routines with nearby AZMDoc register contract comments, Debug80 can also show a one-line contract summary:

in: A,HL    out: carry    clobbers: B,C    preserves: DE,IX

Hover appears for symbols that resolve through the source map. Build the target when hover needs current symbol data.

Symbol hover showing source-map details

ROM Source

The TEC-1G / MON-3 platform runs with monitor ROM in the emulated machine. User programs normally start at 0x4000; reset code and monitor routines live in ROM. Debug80 supplies the platform monitor ROM internally for ordinary TEC-1 and TEC-1G projects.

When execution enters monitor code, the current PC may point outside your source file. Use Debug80: Open Auxiliary Source from the Command Palette when a monitor call changes registers unexpectedly or when the Call Stack shows an address inside ROM.

Command Palette entry for Open Auxiliary Source

Auxiliary source picker showing MON-3 source files

Opening auxiliary source gives you the monitor code around routines such as MON-3 display, disk, clock and sound support.

When you want to edit or debug the monitor itself, copy the monitor ROM source into the project. Copy Monitor ROM Source describes that workflow.