|★ APPLICATIONS ★ PROGRAMMATION ★ LASER GENIUS|Amstrad Action) ★|
|Laser Genius||Applications Programmation|
If you thought there were plenty of assembler/monitor packages for the Amstrad, you'd have a point. Hisoft and Picturesque, Discovery and Hewson Consultants all have their offerings at a computer store near you, and between them they offer a fair selection of different styles. If you thought there was no need for a new package, on the other hand, I'd have to disagree with you - but then, I've got a copy of Laser Genius. This Oasis/Ocean IQ offering is incredibly powerful, and the market is ¡ust going to have to make room for it.
Andrew Wilton is knocked out cold by a new package for machine code programmers.
It's not easy to describe how the editor works, because it's so unusual. You can use it just like BASIC, giving each source code statement a line number and LISTing the program every so often. You'd hardly know the editor had another side, until you type in a piece of nonsense. Immediately, the editor marks the error with a large and descriptive message - even if it was a program line that you typed incorrectly. What's more, you can then move the cursor back up to the incorrect line, correct it and the error message disappears again.
More powerfully, the editor stores everything that scrolls off the top of the screen. By moving the cursor upwards you can bring this text back on screen, running up through previous listings, deleted lines and the like. All this text can be used -move the cursor on to a command, edit it if necessary, hit RETURN and the command's obeyed as if you'd just typed it in. What's more, the text scrolls extremely fast, beating Protext by some way and knocking spots off most editors/WPs.
The purists among you might object to the use of line numbers which Genius demands, but there is a lot of flexibility here. Numbers are necessary, but not for every line. You can group lines together in paragraphs or pages all with just the one number. Rather than getting in the way, the numbers help you organise your programs - and they make light work of block deletion, of course.
ASSEMBLER AND PHOENIX
Assembly can be to and from disk, tape or memory, and in the latter case is very fast indeed. The speed comes chiefly from the way that the editor checks program lines for syntax errors as you type them in. This allows it to tokeziise the source code that is, to compress it into a much smaller space than it would normally require - and tokenisation makes for very fast assembly.
The assembler can handle all the Zilog-recognised mnemonics, and none of the unofficial ones. This is quite deliberate, and very encouraging. Some assembler authors allow for unofficial mnemonics, because they provide an extra selling point in adverts. In practice, unofficial mnemonics are utterly worthless and should be avoided at all costs. Because Oasis originally intended Genius as a tool for their own use, they stuck to what was actually useful.
As well as macros and conditional assembly, both well handled. Genius supports a high-level language called PHOENIX. This is of immense value if you want to test out aspects of your program, or even write the finished article with it. It compiles to stand-alone Z80 code, and runs at a healthy pace. It is, however, fairly tough to use rather reminiscent of C, and not at all a language for the faint-hearted.
There is a great deal more to deal with, including selective assembly of library routines and a comprehensive set of assembler directives, but space is short. Instead we'll turn our attention to the Genius monitor, which is perhaps the more important side of the package.
I've never been a great one for monitors myself. The conventional monitor is a very clumsy tool when it comes even to fairly simple bugs. On those subtle, elusive bugs that crop up all too often, they are almost completely useless. On any sizable piece of code, single-stepping through the whole program can take hours or even days.
Often, you know to some extent where the problem lies. You might know, for instance, that the bug lies in one frequently-called routine or that it corrupts a particular area of memory. With a normal monitor, this knowledge does not help you a great deal. It's comforting to know that professional programmers have these problems too, but it's better still that Oasis did something about it. To be precise, they wrote a brand new kind of monitor.
For a start, the monitor can do everything a normal monitor can do. It can dump memory, it can disassemble to screen, printer and tape/disk, and it can single step in the normal way. It can, indeed, single step through ROM routines. It can also slow-run through RAM and ROM. with a good range of options covering the way in which it handles subroutines and updates the screen.
As for breakpoints, you can choose from 17 different types. These cover continuing in different slow-running modes, use of down-counters and also switching back to normal, full-speed running. This means that you can isolate a particular sub-routine to be run slowly, stopping after a set number of calls if you wish.
All very useful stuff, you might think, but nothing amazing. If you want something amazing, you'll need to use the monitor's built-in Analyser. This provides you with ten stop conditions which are fully programmable - by which I mean, you get a dialect of Forth to program them in.
The idea is quite simple. Every time the monitor performs an instruction under slow running, it tests each stop condition to see if the bug has occurred. If the bug corrupts the screen, you simply set up one condition to check for anything which writes to the screen. If parts of the program are meant to write to the screen during normal running, you can exempt them in the condition. Alternatively, you can work out some test which distinguishes between normal and abnormal screen write operations.
The key idea is the use of a built-in programming language to define the conditions with. The choice of Forth as that language was determined by space considerations - Forth is about as small as a language can be - but it also benefits from being easy to describe and learn. If you're ready for assembler, you should have no problems with the Analyser. If you're already familiar with Forth you'll find the Genius dialect small and non-standard, but well suited to the job.
You really can check for just about everything you want with the Analyser. Oasis include, as an example, a stack-checker to stop your program if you try to RETurn with the stack unbalanced. This in itself would justify buying Genius for most people, but it hardly scratches the surface of what's possible.
You can set up a safety condition to prevent corruption of the monitor or your own program, to make the whole system crash-proof. You can check for contents of registers, of the stack, of memory pointed to. Analyser definitions can check for write and read operations in general, without specifying registers concerned. In short, you can do whatever you need to do to find that bug, quickly.
Assembler manuals are usually a bit on the weak side, and inevitably get very technical. The Genius manual is 150 pages long, with a thorough and friendly approach that is considerably above average for the field. It comes across, however, as the weakest part of the package. There is nothing startlingly new you can do with a manual, so it was bound to suffer in comparison with the rest of the system.
That said, the manual is very terse. The information on Phoenix, for example, is only barely adequate. This is not surprising - after all, 150 pages really isn't enough for such a complex and original system. However, the mainstream sec-r.or.3 of the system are very well covered. If you want to explore you'll probably just need to experiment a bit.
The only other criticism of the manual is its colour - black text or. blue paper. This prevents photocopying the manual, but it does mear. you'll need a reasonable light to read it by.
This package is so much better than the competition it's hard to know where to start. If you never used the extra features, you'd have a good, solid, easy-to-use system at a very reasonable price. You would, however, be missing undreamt-of debugging power, and a high-level language thrown in for free.
If you've already got an assembler, throw it away and buy Laser Genius instead. If you've been waiting for the definitive assembler packaged with a truly useful monitor and a price tag under £20, this is it. Buy it.