Monitor and Disassembler

A machine code monitor and Z80 disassembler for the TS2068. It disassembles memory, displays and edits the processor registers, substitutes code, and moves blocks of memory. Its single-letter commands cover Assign, Break, Copy, Disassemble, Edit, Find, Go to, Jump relative, Convert, Message, Print, Registers, Substitute, Tabulate, Verify, Exit and Zero, and a breakpoint shows all the registers, including the alternate set, IX, IY, SP and the flags.

The loading screen reads “TS 2068 Hi-mem. MONITOR AND DISASSEMBLER” and “© 1982 Crystal Computing”. This is the high-memory version: it loads 4,040 bytes at 61186 and is entered with PRINT USR 62137. The same code, together with a low-memory version, is on #51830 Zeus Disassembler. The download has the tape as a TAP, with the loader and code recorded three times in a row.

Program Analysis

The loader mon is a 15-line BASIC program. Line 2 does CLEAR 61185, shows a loading message and loads the code block m; lines 3–11 show the title, the copyright line and the entry address in a drawn box, and line 12 waits for a key. Lines 13–15 are left over from making the tape: they load code and save the loader and the code again in a loop.

Notable Techniques

  • Line 12 calls USR 26715, inside the REM on line 1: on the TS2068 the BASIC program starts at 26710, so the first bytes after the REM token hold a tiny machine code routine, used here to wait at the “Press any key” prompt.

Potential Issues

  • There is no STOP after line 12, so if the routine at 26715 returns, the loader appears to go straight on to line 13, wait for another code block, and then save itself again in an endless loop.

Related Products

Allows for disassembly, the display and editing of the processor registers, as well as code substitution and the ability to move blocks of memory.

Image Gallery

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.