REVIEWS COURTESY OF ZXSR

The Code Machine
by Picturesque
Discovery Software
1986
Crash Issue 31, Aug 1986   page(s) 100,101

Picturesque's popular machine-code Editor/Assembler and Monitor/Disassembler have been relaunched by Discovery Software - a branch of Gremlin Graphics. The programs used to be published separately at a price of £8.95 and £7.95 - you can now get both for £12.95. The package supports Microdrives, the Interface 1 network and a very wide range of printers, but there's no mention of disk compatability.

Picturesque's Assembler first appeared way back in 1982. For a long while it was one of the best around, used by firms like Quicksilva and Oasis. The program has been steadily improved over the years, but it's looking a bit dated in 1986.

The editor uses a 40 column tabular display. The delete key scrubs characters but it doesn't close up the text to the right. This is not as bad a restriction as it sounds, when working with short assembler mnemonics, but it does mean that you have to re-type lines every so often.

Every line has a four digit number, which can be automatically generated if you wish. The editor works much like the ZX BASIC editor with the addition of single-key commands to delete, copy and renumber groups of lines. Files can be merged from tape or Microdrive, and you can list from any line number or from any label - a nice touch.

Program comments are not very well supported - they have to be enclosed in inverted commas, indented on lines of their own. Labels may be no more than six characters long - DREDFL!

The Assembler is fairly run-of-the-mill. You can fit about 25K of source into memory - enough to generate 3 or 4K of machine code. After that you can assemble from up to ten files on tape or Microdrive - a slow and (with tape) fiddly process. You must assemble the code into memory - you can't send it directly to tape or Microdrive. You can print or display assembly listings, and the contents of the label table. Error messages are adequate.

Numbers can be entered in decimal or hexadecimal (base 16). Maths is limited to 16 bit addition and subtraction, plus operators to extract the high and low bytes of a 16 bit value. There's no support for macros or conditional assembly, but interestingly the assembler does recognise 70-odd undocumented Z80 instructions: SLL and various instructions to handle IX and IY as four eight-bit registers. As far as I know this is the only assembler which supports those instructions.

THE MONITOR

A Monitor is a program that lets you test and examine machine code - your own or someone else's. The Code Machine's offering is 8K long, and can be loaded to more or less any address, so you can load it with the assembler.

The monitor is also fairly run-of-the-mill. You can move, fill, search and edit areas of memory. There are a couple of useful but potentially hazardous commands for inserting and deleting bytes from tables. Annoyingly, all values must be entered in hexadecimal, although you can convert from hex to decimal or vice versa with a special command.

The disassembler generates a mnemonic printout or screen listing from memory contents. There are no labels, so disassembled code can't be loaded back into the editor.

When you come to test code the monitor is usable, but unsophisticated. You can step through code, one instruction at a time, checking or changing registers and optionally performing subroutine calls at one mighty bound. Alternatively you can set a single 'breakpoint', and set the program running; when the breakpoint is reached the monitor will be called automatically.

You can't ask the monitor to check register values as code is tested. There's only one breakpoint, so you can't trap several possible events without stepping through the code, line by line.

The Code Machine has a readable 61 page A5 manual, written in a tutorial style. It's clear and well organised when you're learning about the package, but it's a poor reference guide. There are several summary tables, but there's no index.

If you want a simple, easy to use package, The Code Machine is a reasonable buy. But if you intend to write a lot of machine-code you're better off paying an extra £2 for OCEAN'S Laser Genius.


Transcript by Chris Bourne

Sinclair User Issue 53, Aug 1986   page(s) 100

Label: Discovery Software
Price: £12.95
Memory: 48K
Reviewer: John Gilbert

Gremlin has relaunched Picturesque's assembler and Monitor in one package under its new Discovery Software label - calling it The Code Machine.

The monitor/disassembler is relocatable in Ram, from addresses 27700 up to 57778, and can be set up with nine printer interfaces which include ZX Printer Interface One, Kempston, Tasman and Morex. It is loaded above Ramtop, so no amount of Newing will destroy it, and you can switch in and out of Basic if required.

Monitor operations include the display of CPU registers or memory locations, hex to decimal conversion and demo run of your machine code in which you can set up break points to check that parts of it are working properly. A series of block memory routines allow you to insert, delete or move a maximum of 255 bytes around in Ram.

A trace facility, with front-panel display, allows you to see whether routines go wrong and the byte and text insertion routines can be used to patch up any small problems.

The Disassembler can do its work on Rom or Ram and, like the Assembler, uses the full Z80 instruction set. It requires a start address and will display 18 instruction lines to a page until you press the exit key. At the start of the disassembly you can instruct the printer driver to output hard copy so you can keep a record of any changes made in your program.

While you can make small alterations to your programs using the disasembler you should use the assembler to enter bulkier code.

The assembler's full-screen editor is a 40 columns display across the screen. It controls the major assembler options such as listing, editing, saving and loading code. Source code is referenced using a handy system of line numbers which can be generated automatically.

Source listings are split into four fields: line number, label name (which is optional), operation name, and operands (which may also be optional). Labels can be assigned to often used addresses or values - using Equ - and text and byte can be set up using Define Word and Define Message pseudo instructions.

Once you've finished editing your source you can assemble it and save it from within the editor. If errors occur during any of the machine code production phases the package can be made to go back to the start or drop out into Basic. Error trapping in the package is most impressive.

The Code Machine is a first-class machine-code tool amongst a dwindling number of assemblers and disassemblers.

It does provide a complete development environment but lacks some of the flexibility of its competitor, Ocean's Laser Genius.


REVIEW BY: John Gilbert

Overall4/5
Summary: Complete machine code development system. Unlikely to knock Laser Genius off its top perch though.

Transcript by Chris Bourne

ZX Computing Issue 28, Aug 1986   page(s) 46

INSIDE THE CODE MACHINE

Carol Brooksbank gets into the Code Machine and finds it a good vehicle for machine code programmers.

Discovery software - Gremlin Graphics
£12.95

This Editor/Assembler, Monitor/Disassembler suite, first marketed as two separate programs by Picturesque, is now sold by Gremlin as a single package for £4 less than the old combined price.

The two can be used separately - both are fully relocatable - or can reside together in memory, providing a complete environment for developing and testing machine code with room to assemble 6K - 7K of code. Longer programs can be developed in modules and assembled in sequence automatically to produce one block of code.

For some extraordinary reason, the Editor/Assembler accepts decimal or hex entries, defaulting to decimal, so you must put 'H' after hex numbers, while the Monitor/Disassembler only accepts hex numbers, rejecting any with the 'H'. This is infuriating when you use the programs together. I found myself accidentally entering decimal numbers instead of hex every time I went from Monitor to Editor because I forgot that I had to switch back to adding 'H' to the numbers.

All listing can be sent to screen or printer, and both programs will drive the ZX printer. Interface 1 RS232 port, or one of seven popular Centronics interfaces - but look before you buy. There are some equally popular interfaces it does not support, notably Kempston 'S'. After customizing, you can save a backup copy to either tape or Microdrive, and listings and code can be saved and loaded with either storage system. Backup copies can be made on Wafadrive, but the Editor source text and object code save and load routines are machine code driven from within the program, so it is not possible to use Wafadrive there.

The Monitor allows you to examine memory locations; change the contents of RAM addresses; insert or delete code; fill blocks of memory with a single byte; copy blocks of code to other locations; and search for a sequence of up to five bytes. Text strings can be entered direct. A hex dump of any section of memory can be sent to either screen or printer.

PASSING THE TEST

The testing facilities are very good. Breakpoints are available, and a display of registers and flags can be called up at any time. In trace mode, the program will single step through a sequence of instructions. The screen display, updated after each step, shows a disassembly of the last and next instructions; the contents of all the registers - which can be changed - and the first five bytes at the addresses to which they point; the state of the flags; and the top five entries on the stack. If you use a previously tested subroutine you can speed up the operation by fast running to RET. It is virtually impossible for the program to crash in trace mode. The Monitor has its own stack, and if your operations corrupt the normal one, you can correct the Stack Pointer simply by going into BASIC and then re-entering the Monitor.

The Disassembler will operate on any part of the ROM or RAM, except that it coyly refuses to disassemble itself. It has no objection, however, if you copy the code to somewhere else in memory where if will happily disassemble it.

The Editor/Assembler has a 40-column screen display divided into fields for line number, label, operator and operand. You must use the correct fields. If you put 'DJNZ' into the label field, it will be taken to be a label, not an operator. Line numbers, which can be generated automatically, work like BASIC line numbers but there can only be one instruction per line. All or part of your listing can be renumbered.

Notes can only be entered in separate lines, rather like BASIC REM statements. This seems a pity. It is often helpful to make notes on individual instructions, and the listing is clearer if these can go on the same line as the instruction they explain. Labels can have up to six characters, can be permanent or redefinable, and their high and low bytes can be used separately. LD A, LOOP, for example, will put the value of the high byte of the label address into the A register. The table can be carried forward after assembly, so that later modules of a program can refer to labels used in previous ones.

The program accepts all the standard Z80 instructions, and the normal pseudo-opcodes like DEFB and ORG. JR and DJNZ instructions are accepted with arithmetical displacements or label addresses. Addition and subtraction are permitted in operands, so you could use instructions like LD HL,LOOP+42H. A very useful feature is that the program will accept the unofficial instructions - the ones which work on all Z80 chips, but which Zilog do not list or describe. They include SLL and a group of instructions which operate on the high and low bytes of IX and IY individually.

The handbook is excellent, clear and straightforward, with lucid explanations of technical terms and plenty of well documented examples. This makes The Code Machine a particularly good package for someone fairly new to machine code programming. It will not tell you how to program, but at least you will have a test and development environment that you can understand and use easily. It probably does not have the sort of exciting features which would make someone already using a similar package rush to change to this one, but it is a good workmanlike program and well worth considering if you are still using a hex loader and the crash-and-try-again method of testing.


REVIEW BY: Carol Brooksbank

Transcript by Chris Bourne

All information in this page is provided by ZXSR instead of ZXDB