Super C Compiler/Mcoder 2 Compiler (PSS) Review | ZX Computing - Everygamegoing

ZX Computing


Super C Compiler/Mcoder 2 Compiler
By PSS
Spectrum 48K

 
Published in ZX Computing #12

Super C Compiler/Mcoder 2 Compiler

Wouldn't it be lovely to write a program in "slowly but surely" Sinclair Basic and, at the touch of a button, convert it into machine code to run at between 20 and 100 times the original speed? Well, that's what Softek and PSS claim in their adverts for these two compilers. But do they work?

Both compilers cost £9.95 but each has its own characteristics and idiosyncracies. There are some things, however, that both compilers have in common. Both work with integer numbers only and can handle numbers from -32768 to 32767, while Super C also handles numbers from 0 to 65536 on a simulated INPUT.

Most Basic commands can be compiled, with a few exceptions. Neither compiler can handle LOAD, SAVE, VERIFY or string arrays. However, MCoder 2 can handle strings (but not string splicing), whereas Super C can't. This is the big difference between the two utilities. The Super C manual does tell you how this can be done but it is fiddly, involving PEEK and POKE.

MCoder 2 can also handle numeric arrays (one dimensional), LEN, LPRINT and INPUT. Super C cannot cope with these but instead, can use STEP in FOR... NEXT loops and SCREEN$ (with code) where MCoder 2 can't.

RND is special on each compiler, giving an integer number between 0 and 32767. This is fiddly to work into a Basic program but, on MCoder 2, you can simulate this function with:

LET R = USR 59997

This is useful when testing your Basic program before compilation.

REM, on both compilers, is put to very good use. On Super C, you can use REM to enable the BREAK key to run machine code (which follows the REM in the line, in decimal), or to erase everything, including the Compiler, without pulling the plug. (Both compilers can survive NEW.)

On MCoder 2, REM #n, gives a choice of the mode in which the compiled program will run:

Mode 0 Gives the fastest code disabling the BREAK key.

Mode 1 Gives longer and slower code by enabling the BREAK key.

Mode 2 Gives code that runs at almost the same speed as Basic, with TRACE on.

By default, Mode 1 is chosen.

Both compilers have good error messages, if a bit concise at times. Only MCoder 2 gives you the number of bytes which your code takes up, after compilation. It seems that the only way to save a compiled program is to save the whole of memory, machine code, compiler, work space, the lot. However, this is not difficult, and, with a microdrive, hardly time-consuming.

One important point to note is that Super C allows only A to Z as variable names, giving only 26 available, without POKEing into memory. MCoder 2 on the other hand, happily accepts, 'LIVES' 'HS' and 'SCORE' without question. Both compilers are called with simple RAND USR commands.

Finally, to documentation, MCoder 2 was supplied by return of post in a cassette case with an inlay card size, eight sides of "manual". This, however, tells you enough to make full use of the compiler, including a full description of all the commands available.

Super C took more than three weeks to arrive, and was sent in a large package, about the size of a video cassette box. Super C's manual can obly be described as a work of art. Written by Tim Langdell, it gives a superb description of everything about the compiler including the commands, the error reports and just about everything else, finishing off with a plug for the rest of their programs.

If I had to choose between these two very powerful packages, I would prefer to use MCoder 2 from PSS, mainly because it can handle strings and can use more than 26 variables. It is also a little easier to use. However, since about June, Softek have been promising an enhancement package for Super C allowing for string arrays, string splicing and floating point. This will probably push up the price to around £15.00. Whether this will ever become available, we shall have to wait and see. At the moment, MCoder 2 still represents the best value for money.

David Harrison