MIKRO-GEN SPECTOOL See back cover for Loading Instructions. After both program and code have loaded the machine will be ready. Spectool provides numerous useful commands and functions to assist program development. They are obtained by entering an asterisk character (*) as the first character on the bottom line. The second character should be one of those in table 1 .Some of the commands require extra parameters, as specified in table 2. In addition to the commands and functions, a machine code break facility is available at all times, provided that interrupts are enabled. Two extra line editing keys are provided, which are particularly useful when dealing with long lines. CAPS SHIFT 6 will move the cursor to the end of the line being edited, and CAPS SHIFT 7 will move it to the beginning of the line. If no line is being edited these keys retain their usual function of moving the line cursor up and down. Table 1, Command and Function codes *AUTO start, incr *a or ¶4 *CLOCK hr, mm, sec *t *CLOCK on(or ON) *t *CLOCK off(or OFF) *t *COPY start, end, to *c or *C *DECHEX x *x *DELETE start, end *D *DPEEK addr *o *DPOKE addr, value *O *DUMP addr *d *EDIT line no *E *HELP *h or *H *HEXDEC XXXX *X *INSERT to *i or *I *JOIN line no *j or *J *KEY n: *k *MEM *m or *M *MOVE start, end, to *6 *PEEP *p or *P *REMKILL *e *REN start,step *r or *R *SCROLL on (or ON) *u or *U *SCROLL off (or OFF) *u or *U *SLIST start end, string 1 *k or *K *SLIST start, end, string 1, string 2 *k or *K *SQUASH *s *STORE start, end *S *TRACE on (or ON) *T *TRACE off (or OFF) *T *VARS *v or *V Table 2, Commands and Functions *AUTO start, incr This feature saves you the trouble of typing line numbers when entering a listing. If you omit the "start" and "incr"ement values, they will default to 10, i.e. the first line number will be 10,the second 20 and so on. To terminate the AUTO function, either delete the line number displayed or use EDIT mode. The routine will terminate automatically if a line number greater than 9999 would occur. *CLOCK hr, min, Sets the on-screen clock and sec displays it. Note that the clock will lose time when any of the following commands are used: COPY, LPRINT. BEEP, SAVE, LOAO, PEEP. *CLOCK ON Turns the clock on if it has been turned off. *CLOCK OFF Turns the clock off. *COPY start, end,to The block of program lines between the "start"”and "end" line numbers is copied to the position indicated by the”"to" line number. The "end" number should be higher than the "start" number, and the "to" position should be less than "start" or greater than "end". The program is automatically renumbered after the *COPY. If "to" is omitted, the program will be copied to the end of the program. It is recom- mended that *REN be carried out directly before *COPY to trap non- existent line numbers. *DECHEX x Converts decimal number "x" into a 4 digit hexadecimal number. Enter only values from 0- 65535. *DELETE start, end Delete a block of program lines from "start" line number to "end" line number. *DELETE ,, will delete the whole program. *DPOKE addr, value This function is just like POKE, but it pokes 2 bytes into the specified memory address. The usual for- mat is followed, i.e. the low byte is put into the specified address, and the high byte into addr+1. *DUMP addr Gives a hexadecimal listing of the contents of memory, starting at address”"addr".”When the screen is full, the listing can be continued by pressing the symbol shift key. To end, press the break key. *EDIT line no This allows you to edit a line without having to go through the usual procedure of LIST, BREAK and EDIT. *HELP Lists all the Spectool functions and their access letters. *HEXDEC XXXX Converts the 4 digit hexadecimal number "XXXX" into a decimal number. You should enter exactly 4 characters; use numbers and the capital letters A-F only. *INSERT to Insert a previously *STOREd routine into a program at the position indicated by "to". If "to"”is omitted, the block will be put at the and of the program. It is advisable to use *REN before *INSERT. Note that while a block of program is being stored, no block operations other than *DELETE will operate. As soon as the program has been *INSERTed the other block operations will be re-enabled. *JOIN line no This allows you to join two lines together into one multi- statement line. This can give a speed increase when running programs. Be careful when work- ing with lines containing FOR/ NEXT loops, GOTO or GOSUB references and IF statements, that you do not interfere with the logic of your program. It is advisable for the line length not to exceed 23 lines, as this can make editing difficult. *KEY n: The ten number keys can all be used as user defined function keys. Each key can be assigned a string of up to 32 characters. The keys are defined by typing in the string you require after the colon (:). The use of the colon means that the cursor becomes a K cursor, and the first key you type will be interpreted as a keyword. If you require the key to produce plain text instead of a keyword, the colon can be replaced by a space. The assignment of the keys can be saved separately from the main program by SAVE "FUNKEY" CODE 57500,500. The keys will remain defined even after NEW. The keys are used very simply by typing the number followed by space, whereupon the number and space will be replaced by your string. Ideas for the use of this facility are to hold a string for regularly SAVEing a file or for restoring the border and screen colours during development of a program that keeps changing them, e.g *KEY 1:BORDER 0:PAPER 0:INK 7:BRIGHT 1. *MEM Lists the current memory layout: how big your program is, how much space is taken by variables, how much RAM you have left etc. *MOVE start, end, Just like *COPY except that the to original lines between "start" and”"end" are deleted. *PEEP Displays the information that is held in a tape header loaded into the computer from the tape port. *REMKILL Removes REM statements from your program to save space. REMs are detected wherever in the line they occur. Only the REM part of a multi-statement line is removed, but if the whole line is a REM then it is removed complete- ly. This program has a facility which allows you to retain selected REM's; if you place a space between the line number and the REM keyword, *REMKILL will not remove the REM. *REN start, incr Renumbers your program start- ing at "start" and incrementing by "incr". If "start" and "incr" are omitted, they default to 10 *REN will correctly renumber GOTO and GOSUB statements with entirely numeric arguments, and it will also handle calculated line numbers in the form GOTO l000*a etc., with the proviso that in this example, line 1000 should exist. Other forms of calculated line numbers should be avoided. If any GOTO or GOSUB statements refer to a non-existent line, the program will not be renumbered and the line cursor will be positioned on the offending line. All you have to do is press CAPS SHIFT + EDIT to alter the number before trying again. Many programmers like to use variables as labels to represent line numbers so that GOTO and GOSUB statements can refer to them by name. This results in a program which is much easier to follow and understand. However, normal renumber programs can- not deal with this situation, and fail to renumber the labels. SPECTOOL is different; as long as you put the labels in the first line of the program (e.g. 10 LET sort=1000 : LET setup=2000 : LET printdata=3000 etc.) *REN will actually alter the LET state- ment to reflect the new positions of the routines. *SCROLL ON Stops the "scroll?" message from appearing when the screen is full; it will scroll without asking. *SCROLL OFF Returns the screen scroll message to normal. *SLIST start, end, Looks for all occurrences of string1 “ "string1"”between the "start" and "end" lines, and lists them on the screen. To list all occurrences within the program, the format *SLIST,,string1 maybe used. You can search for normal text or keywords, but keywords need to be entered on the K cursor. To get the K cursor, enter a colon (:) and then press the appropriate key- word. You can then use cursor left and RUBOUT/DELETE to get rid of the colon. *SLIST start, end, Looks for all occurrences of string1, string2 “ "string1"” between the "start" and "end" lines. The line will be listed with the first letter or keyword highlighted. Press ENTER to change "stringl"“into "string2", or press L to see the next occurrence of "string1". Answer any scroll prompt with the usual keys. Terminate the search with BREAK. "string1" and "string2" need not be the same length. Note that when changing numeric values, only the visible value is altered. The computer holds the number in "floating point binary" notation after the visible part. If you want this value altered as well, make a note of the lines altered by *SLIST and then *EDIT and ENTER each of them. *SQUASH This function removes spaces and control codes from a program except for those within quotes. *STORE start, end Allows you to save a block of program into spare RAM as long as you have sufficient available. Another program can then be loaded and the *STOREd block can be *INSERTed into it. This facility is like *COPY but it allows you to copy information between programs. *TRACE ON The word TRACE is printed in the top right hand corner of the screen. When a program is RUN, the currently executing line and statement numbers are displayed there. By pressing the SYMBOL SHIFT and SPACE keys together, the speed of execution of the program is reduced. This allows you to see more easily just where a problem is occurring in your program. *TRACE OFF Turn TRACE off again. *VARS Lists all active variables. Gives the value of simple variables. A variable used to control a FOR/NEXT loop is denoted by a % character, and the limit value and step are displayed in addition to the current value. String variables, denoted by the $ character, have their current assignment displayed. Arrays have their dimensions displayed in brackets, and once again the string type are denoted by S. Table 3. Error messages Several new error messages are provided to cater for the enhanced abilities of your machine. S Error, 0:1 A syntax error has occurred. B Integer overload A number entered as a parameter 0:1 is too big or too small. R Tape loading Will only occur when using error, 0:1 *PEEP. Either the tape is not loading correctly or the filetype is not a valid Spectrum type. 4 Out of memory, Insufficient memory to complete 0:1 the current function. V Program not You have tried to use a function stored, 0:1 which needs a program to work on, but there is none. B Stepsize too large, The step is either 0 or greater than 0:1 255. X line non-existent, Reference has been made to a 0:1 non-existent line number. Wrong line refline:x Appears if a reference to a non- existent line is encountered while renumbering. The line cursor is positioned on the offending line ready for you to EDIT it. *INSERT to clear *STORE has been used. All the the store block functions with the exception of *DELETE have been disabled until *INSERT has been used. To load type LOAD"SPECTOOL"ENTER If you have any difficulty refer to Chapter 20 P105 of your Spectrum Manual. (c)MIKRO-GEN All rights of the owner, producer, and the work being produced are reserved. Unauthorised copying, lending, hiring, public performance and broadcasting of this cassette is strictly prohibited. 44 The Broadway, Bracknell, Berks. 0344 427317