INMC 80 News

  

May-September 1981, Issue 4











Page 20 of 71











-20-

this is as powerful as a 12k BASIC, if not slightly more. A comparison with BASIC is hardly fair – a bit like comparing chalk with cheese. This compiler compiles fast, and produces fast code. An example: a bubblesort of 255 numbers in machine code is 2 secs, in Pascal 15 secs, and in BASIC 300 secs.(4 MHz machine)

This implementation of Pascal offers the ability to define special types of data, which would allow programs tailored precisely to a problem to be written. It also offers a few extensions to standard Pascal – in particular PEEK and POKE, to allow memory to be accessed and altered. The PEEK and POKE are especially interesing, as they allow TYPEs to be PEEKed and POKEd. This allows a very simple way of moving data around for processing. It would, for example, be possible to define a TYPE CRT=ARRAY[0..1023] OF CHAR, and then to say POKE(#0800,CRT) to change the entire screen at one fell swoop.

The compiler departs from standard Pascal in another few instances. It insists on Strong Typing, which causes the programmer to think a little harder, but cuts down on programming errors. Also available are the ability to recognise HEX integers, and to write them. If you have ever used PEEK and POKE in BASIC, you will know how difficult it is to figure out the decimal equivalents of hex addresses. Not a problem in NASPAS! Also supported are the Nascom Graphics, using the NASGRA ROM, for both N2s and Nls with Econographics. LINE(ON,0,0,44,44) will draw a line from (0,0) to (44,44), diagonally across the screen. The arithmetic is of the accuracy of 8k BASIC – 6/7 digits. The trigonometric functions are not implemented, but these are easily written using the ability of Pascal to support recursive calls. It is possible, using the supplied instructions, to add predfined functions and procedures to the compiler, in much the way that the XTAL BASIC is extendable. The manual supplied is much more complete on this aspect than XTAL BASIC manual. The display of real numbers is always in scientific notation, but again that could be easily altered by a procedure to format output as desired.

I have discussed this compiler with a few other computer users, and we have come to the same conclusion. It is most impressive, and will give an excellent introduction to the capabilities of Pascal.

The manual states categorically that it does not purport to teach Pascal, and refers you to several other books. These are:

"Pascal User Manual and Report", Jensen and Wirth, Springer Verlag "Pascal, an Intro. to systematic programming", Findlay and Watt,Pitman "Introduction to Pascal", Welsh and Elder, Prentice Hall

The last two of these are better oriented to the beginner, who has not programmed in high level languages before to any great extent. To them can be added the following two books:

"Programming via Pascal", Rohl and Barrett, Cambridge University Press "Introduction to Pascal", Zaks, Sybex

The first of these two is my own favorite, but they are both most readable.

This compiler is available on tape from: Hisoft, __ ______ ____, Lidem Swindon ___ ___

It costs 35.00. In the manual reference is made to the fact that the runtime

routines can be supplied in EPROM. {I have no price for this, but am sure that Hisoft Will pe apie to quote.

ae amo


This is an OCR’d version of the scanned page and likely contains recognition errors.











Page 20 of 71