80-Bus News

  

September–October 1983 · Volume 2 · Issue 5

Page 30 of 67

command which will load an ASAVEd program and merge it with an existing program already in the computer. Care in the use of this is necessary as the programs are just merged as they stand, so if line numbers are duplicated in the programs being merged, the resultant program will have more than one line with the same number.

Program lines may be generated and manipulated by AUTO, COPY, DELETE, EDIT & Renumber commands. AUTO will start at 10 with an interval of 10 unless otherwise instructed. COPY enables blocks of lines (or single lines) to be copied to elsewhere in a program. This command produces an error if copying would overwite existing lines. DELETE will delete a block of lines. Start and finish lines must exist or an error message will be generated. EDIT allows line editing of the up to 256 character lines which BAS12K supports. While not as convenient in some ways as screen editing, the editor is powerful and convenient once you become accustomed to it. Its commands are very similar to those outlined for MBASIC in 80BUS News for May-June 1983. Renumber renumbers the whole program, default start and interval 10, but other starts and intervals may be specified.

As well as REM, BAS12K supports the single quote and that quote suffices in place of the “:REM” which otherwise would be needed to seperate program from comment.

An Exchange (swap) command allows string or numeric variables to be exchanged but only within their own types. This makes for convenient writing of alpha or numeric sort routines.

A TRACE command causes print out of line numbers as they are executed. The command takes a numeric non-zero argument to switch trace on and a zero argument to stop it. There is also an LTRACE commeand which directs the output to the serial port for a suitable printer.

Like TRACE, PRINT and PRINT USING have their version with preceeding ‘L’ to direct their output to printer.

Another useful additional command is LVAR (and its print version LLVAR) which lists all variables (other than array variables) and their values. One can STOP a program, examine the variables, alter one or more, and then CONTinue, provided you haven’t altered the program.

BAS12K also features multi-line user-defined functions. Such functions are like Pascal functions in that local variables may be used in calculating the value to be returned to the main program.

While BAS12K does not have its own screen edit facility, it is possible to use the screen edit which forms part of the Nasmon monitor. From BAS12K this is entered via the SCREEN command. Text edited with the Nasmon editor may afterwards be converted back to BAS12K. The limitation on this option is that it may only be used if there is sufficient space in memory for the BASIC program to be stored in both formats at the same time. The Nasmon editor is essentially the editor now incorporated in Hisoft Pascal about which there has been considerable favourable comment from Dr Dark and others.

All in all, I have found BAS12K and the Nasmon monitor, which I had perforce to adopt to use the former, to be a very useful package. Having the Nasmon monitor, I also got the Nasgen assembler to go with it (Oh, how much faster than ZEAP!) and the same supplier’s dis-assembler, Nasnem. This is a pure diassembler as Nasmon itself incorporates a ‘front panel’ system etc. to allow debugging of machine code programs. I must confess however that I have not done much machine code work with this monitor as I have not found it as easy to understand as Nas-Sys, maybe because it does not come with the fully commented source code such as accompanies Nas-Sys.

Page 30 of 67