Acorn User


Slave

Author: Simon Williams
Publisher: A 'n F
Machine: BBC Model B

 
Published in Acorn User #041

A Slave To The Slave

Slave

Slave is not the first toolkit ROM to appear for the BBC Micro - indeed, in recent months there seem to have been a plethora of them. What makes it a bit different, however, is the fact that it's in a 16K EPROM, rather than the more common 8K variety. This should offer scope for a larger range of utilities than normal and, if A&F has done its job right, should mean you can dispense with two other 8K chips, one for Basic routines and the other for machine-code. So does Slave achieve this?

Slave provides 31 new 'star' commands, divided about equally between Basic and machine-code routines.

Perhaps the most valuable Basic routine is the dynamic editor. This is a proper screen editor, which allows you to scroll backwards and forwards through your program (rather slowly) and edit it on screen. Each edit must be completed with RETURN, but as long as you remember this, you should find that the editor speeds program development.

In addition to the editor, there is a search and replace facility which will change variable names and the like intelligently within your program, and a cross-reference routine which shows you where you've used them before.

Slave includes the obligatory *BAD 'Bad program' cure, but this time with an *EXTEND command, which will tack any lines of Basic existing in memory onto the end of your current program. Useful if you find you've NEWed a program by mistake, and started to type over it.

You also get an envelope definer, a key definer, a user character display and a machine code sort which you can call in and use on your Basic arrays. It will handle single dimension arrays of integer or real numbers, or strings, and works pretty quickly. The *TRON command traces your program, but confines its output to the top left-hand corner of the screen. It also single-steps your program for you. *PAGE will shift a Basic program to another page boundary, and is useful for relocating long Basic programs from disc. Slave allows you to auto-run them after relocation.

Finally among the Basic utilities is a program packet. This will remove unwanted spaces and comments, but doesn't abbreviate variable names like some similar routines.

On the machine-code front, Slave sticks mainly to the 'biggies', though implements them well. There's a hex dump, a monitor (including a disassembler) and a debugger. Each of these makes use of colour highlights to distinguish the various parts of the display. You can scroll backwards and forwards through any of the displays, including the disassembler. This is because Slave can disassemble backwards which is pretty rare!

These three routines provide a pretty comprehensive machine-code development package, and you can in fact move directly between the hex dump, monitor and debugger. You can also direct a disassembly to screen or printer.

Other machine-code facilities include *SLOW which slows the processor down. The manual provides the novel idea of using the command to make impossible games playable. *GET will find a given string of bytes and *MOVE - you've guessed it - will move a section of memory to another address. *REL will relocate a piece of machine-code, changing internal addresses to suit, but leaving external ones alone.

As well as the memory manipulating routines, there are a few disc utilities included in the chip. A disc sector editor allows the usual editing of information on disc, but is unusual in displaying in Mode 3, thus showing more information than some similar packages. *DGET does on disc what *GET does in memory and *SPACE tells you what room is left on your disc.

A&F even provides a simple ROM management display, although unfortunately it is just a display. There's no means of disabling a ROM from within Slave, which is a shame - perhaps there wasn't room. There certainly seems to be plenty going on in Slave's 16K of code.

The 'Slave Driver's Guide' is a 70-page affair which details all the routines well, giving a fair amount of technical information where it's needed. It's organised roughly by function, although I didn't find it particularly easy to work my way around. The whole thing is printed in brown on white, and includes a number of helpful examples of the use of Slave.

So will Slave do what two other toolkit ROMs will do? It certainly provides the main routines you might expect in a machine-code development package, and the inclusion of the full-screen Basic editor makes it attractive. I think I'll find Slave very useful.

Simon Williams