INMC 80 News


May–September 1981, Issue 4

Page 19 of 71

There are 10 commands. These are:

‘C’to cause compilation
‘D’ nn mmto delete lines nn to mm inclusive
‘F’ ‘string’to find occurances of ‘string’, which is delimited by single quotes
‘I’ nn mmto cause automatic line numbering of input lines, starting at nn, increment mm. Defaults are 10 and 10
‘L’ nn mmto cause lines nn to mm to list
‘M’returns to monitor
‘N’ nn mmrenumbers the existing program starting at nn, increment mm. Defaults 10 and 10
‘P’puts the program on tape in ‘generate’ format. The program can be read back into memory from the monitor, and the compiler cold started. Then the ‘W’ command is used to open the file.
‘R’runs the program
‘W’opens a file after reading t in from tape. It should be used everytime the compiler is restarted with a program in memory, as the compiler cold starts each time, and the W reopens the file.

So much for the editor. It is fairly straightforward, particularly if you have been used to BASIC or ZEAP. One drawback – the line length is limited to 48 chars by Nascom’s screen editing facilities, but the compiler can run off sourcefiles written on other types of editor.

Writing a program is straightforward enough with this editor. Having written a program, we ESC to leave the I mode. L to list, P to save to tape (in case of catastrophes – which never, never happen to us! What never? No, never! What never? Well, hardly ever! with acknowledgement to Gilbert and Sullivan). Having a tape of the program, we can now hit C to compile. Naturally there will be errors. The error messages are a display of *ERROR* nn, and an arrow indicating the symbol of the program which caused the error to show up. The error numbers are listed on page 41 of the manual, with a good explanation of each. Hit the E key, and you are returned to the editor. Hit any other key, and compilation proceeds until the next error. Frequently, one error will cause a number of others, so it is a good idea to abort after about four or five. As compilation proceeds, listed alongside the lines is the address where the code produced resides.

Having corrected the errors, and achieved a successful compilation, one is then given the choice of Run/​Tape/​Editor? Answering this with R causes the program to run, and return you to Nas-Sys. Hitting T causes the object code to be dumped to tape in generate format, and you are returned to Nas-Sys when finished. Hitting E (or any other key) gets you back to the editor.

When the program is running, if the correct options are set, you can interrupt the compiler, and cause it to pause. If during such a pause you hit E, then you are returned to Nas-Sys, and the program aborted. Any other key causes resumption of the program. There are a number of compiler options which are described in the manual. These all default to reasonable values. They are concerned with checking the keyboard for interrupt commands, checking for possible stack overflow, checks on array bounds, checks on arithmetic overflow, and suppression of all lines being listed during compilation unless in error. There is also another option under NASMON, which allows an external printer to be driven. Much to my regret, the author of the compiler has suppressed this in the Nas-Sys implementation, and suggests that one uses the X option instead. This is the only complaint I have! It is possible to obtain listings using the Nas-Sys X and U routines.

In a seperate article I have listed all the major facilities offered by this compiler, so do not intend to repeat them here. Suffice it to say that this is a very powerful implementation of Pascal, albeit not a full Pascal. Compared with 8k BASIC,

Page 19 of 71