ZX-Guaranteed
Geoff A. Bobker
1987
Programming: Assembler/Mcode
£5.95
English
ZX Spectrum 48K
None

72,73
Simon Goodwin
Chris Bourne

Since the early days of Spectrum computing ZX Guaranteed has churned out newsletters and utilities for Sinclair computer users, from their base in Bury, Lancashire. The boss, G A Bobker, has stubbornly refused to follow the rest of the trade up-market or (more commonly) into receivership, and still runs his business like one of the early hobbyist firms. He used to put his home phone number in advertisements, followed by the warning 'not while Doctor Who is on'!

ZX Guaranteed tapes tend to address markets that other firms would consider too much hassle to support. They have low prices, photocopied paper inserts, and typewritten or dot-matrix manuals, packed with erratic grammar.

Many of the programs are named after 007 Spy, Bobker's answer to the problem of copying 'protected' cassette files to tape or disk. The latest addition to the range is 007 Disassembler, a £5.95 tape that translates a program in memory into machine code mnemonics that can be understood by anyone who reads Z80 assembly language.

Disassemblers are two-a-penny - they're usually supplied as part of a larger package, and most machine code programming systems come with one. The main problem with disassemblers is that they tend to get in the way of the program they re examining. Commercial software usually fills almost all of the Spectrum's memory, so you have trouble loading the disassembler at the same time as the code you want it to examine.

A year or so ago I reviewed a neat solution to this problem - Genie, a disassembler- published by Romantic Robot, makers of the Multiface add-ons. Genie loaded into the extra 8K of RAM built into a Multiface, and could be called up at any time - even if a program was running - by pressing the magic button on the Multiface. Genie used a small eight line window so that it could restore the screen and re-start the original program when you've finished.

007 Disassembler is aimed at people who want the same convenience but don't own a Multiface. It can't use a magic button, so you have to interrupt the loading of a program - as you would to enter POKEs - before you can use 007 Disassemble, to examine the code.

007 Disassembler avoids memory clashes by loading and running from the 6K Spectrum screen memory. The first eight lines of the screen appear blank, but in fact matched ink and paper attributes conceal the 2K of machine code that is 007 Disassembler.

The other 16 lines are used for the disassembly, which - as was once fashionable - makes generous use of colour. When you read machine code it's useful to spot calls to subroutines and the 'return' instructions that mark the end of each routine. The disassembler shows calls in light blue and returns in purple; the rest of the code is printed in the Spectrum default of black or white, with a red border.

This may sound garish but I found it clear and quite useful in practice. Characteristically, Bobker's two packed A4 pages of documentation include a list of POKE commands that let you change the colours to suit yourself, as well as POKEs to customise the keyboard auto-repeat delay and the character used to mark hexadecimal values.

Three versions of the program are recorded on the tape. One loads into display memory, as explained, while the other two use a full-size screen and load near the top of the Spectrum's memory map either at 60000 or 63000. All versions are 2K long and load as CODE files. You call them with a USR instruction - for instance, the version in screen memory can be called with:

RANDOMIZE USR 16384

There are just six single-key commands. Addresses and other values can be displayed in conventional decimal notation or in hexadecima - base 16, convenient when comparing values with their binary equivalent. You can swap between these two options by pressing H or D at any time, which causes the border colour to change and the current screen to be re-displayed in the new base. Re-drawing never takes more than a second.

Type S to enter the start address for disassembly, followed by four or five digits, depending on whether you're entering hexadecimal or decimal addresses. The display redraws a screen at a time, with no overlap. N calls for the next 12 or 20 lines, depending on the version, and C copies the display to the printer.

The printout relies on the 48K ROM routine, which only works with dedicated Sinclair printers like the Alphacom 32 or ZX Printer. A simple but tedious BASIC routine to COPY to other printers is printed in the instructions. You can swap back to BASIC at any time with the E key, and re-start with a USR call. There were two minor bugs in the version of 007 Disassembler that I tested. The code did not check the OVER printing option, so the screen got into a mess if you called it while OVER 1 was set. More importantly, the disassembler was confused by the data byte that follows RST 8 instructions in Spectrum programs - it tried to disassemble the data as an instruction, making the next few lines after each RST 8 potentially misleading.

You must know where machine code has been loaded before a disassembler is useful, so ZX Guaranteed include an extra program, 007 Head, which reads standard Spectrum files (but not hearderless files) and tells you their size and where they load. This BASIC program is very simple, but worth having if you have not already got a utility that does the same job.

007 Disassembler costs £5.95 from ZX Guaranteed, 29 Chadderton Drive, Unsworth, Bury, Lancs BL9 8NL. It's simple, but I've found it useful.