Toolkit



H. Geradts,

The Hague,

The Netherlands.



Toolkit combination is a machine-code program which allows

the user of the ZX Spectrum with only one USR instruction

to get a variety of information about a Basic program as

well as about one written in machine code. Several of the

routines have been published before, but the disadvantage

of these is that you have to keep track of a series of

addresses.

  Access of a machine-code instruction directly from Basic

as was done in the program published in Your Computer,

September 1983 by Gary Rees causes troubles because the

Spectrum seems to dislike the IM2 instruction.

  Toni Baker warns against using the IM instruction on page

102 of her book on machine code. After some time a system

hang-up appears to occur. Nevertheless, Gary Rees' program

is quite interesting because it gives a useable way of

printing numbers on screen.

  The same method has been used in this program: the 

program gives a menu of the options - analyse memory, the

hex/dec, dec/hex converter and some smaller routines are

adapted from the program Supercode by CP-Software and are

published with its permission. Now a short description of

these options.

  Analyse Memory: This gives the address you have chosen,

the decimal value, the hexadecimal value and the charac-

ter - where printable - in the address. You can choose the

first address by RANDOMIZE - not USR! - address. All the

following addresses are printed until the screen is full.

The Scroll? message is then printed. If you press n you are

back in Basic, but it is possible to get the menu back if

you have put the instruction: 

  RANDOMIZE USR 64360

in a Basic line.

  The options Memory free, Proglength, Varlength, Pro. + 

vars do not need any explanation. Neither does the option

Ramtop. You have only to press the letter behind these

options to see the value of these parameters printed on the

screen.

  The second option in the menu is Frames + sound. This is

not a very useful routine but more something like a demon-

stration that the Spectrum does have a clock inside.

  You can get back to the menu by pressing Z. Z is also

used to get back to Basic. That is the way to get into

Basic without Caps Lock, because the machine-code is pro-

grammed to be used with capitals. It has other features,

which I hope you will like: PAPER and BORDER blue, INK

white and a more audible sound from the keyboard. These are

permanent in Basic until you change them back. With Inter-

face 1 connected CLS # will change the colours to black and

white.

  Breaking out of the machine-code with Caps Lock-Break is

possible too. There are three other options which I didn't

mention. Line address, UDG and 3. The first is quite

straightforward. Put the cursor in a Basic line, and L will

tell you the address of the first character the cursor

points to. Easy to see where a Basic program ends. UDG

again uses the variable SEED. If you have your own UDGs

somewhere in memory, e.g. 40000, use RANDOMIZE 40000, go to

the menu and press U. TO get back the Spectrum UDGs you can

use the S.

  The last option is pressing 3. This is not mentioned in

the menu. It sets the Microdrive variables - with Inter-

face 1 connected - and gives a yellow flashing border when

saving etc. on Microdrives.