Review of MCODER, An Integer Compiler

Author(s): Will Stackman
Pub Details: Sinclair Timex User Group Newsletter v2 n4 (Volume 2, Issue 4)
Date: April 1983
Pages: 3

MCODER is an integer compiler program for the Sinclair-Timex computer. It runs on machines with the 8 K ROM and at least 16 K RAM. MCODER is sold by Personal Software Services, Coventry, England. It is available locally from Intercomputer, Inc., 179 Newbury Street, Boston, Massachusetts 02116 for $18.95 including shipping.

The MCODER program occupies a little over 2 K of RAM. As a compiler, it takes a program you write in a modified BASIC language and converts it to an efficient machine language subroutine. This machine language subroutine is then used in an ordinary BASIC program. The machine language program is invoked by executing a USR call to location 18823. The 2 K MCODER program must remain in memory, as it contains subroutines used by the compiled program.

The MCODER BASIC, the modified BASIC in which you must write programs to be compiled, allows only simple arithmetic (+,-,*, and / with no SQR, PI, LN, or trig functions), using only integer (whole) numbers. Boolean operators (AND, OR, NOT) are not available. Only 26 single letter numeric variables are allowed. There is only one array. And there are no string ($) variables at all. Input is through the use of CODE INKEY, which decodes single keystrokes.

The MCODER program is easy to use. However, programs tend to be hard to debug because of the differences between the MCODER BASIC and the one we know. For example, the RND function returns an integer value between zero and 32767, instead of a floating point number between zero and one. Another example is that a FOR NEXT loop from 1 TO 3000 is required to allow enough time to get your finger off an input key. There is an error flag, but no error codes which would make debugging straightforward.

MCODER comes with “migi” (that’s smaller than “micro,” which is to say, minimal) documentation, which is by far its weakest feature. Commands are explained alphabetically, and some information must be inferred. For example, although not mentioned, you can recompile routines. Each time you do, however, a new REM is added which can’t easily be removed. Also, the one example in the instructions is wrong. The screen-filling PLOT example must use 63 for width and 40 for height, not 100 and 50, and the divisor for PAUSE is 60, not 50, as in the United Kingdom.

All in all, as the cheapest and shortest compiler available, MCODER is an interesting piece of software. Its immediate uses seem limited. The most interesting feature, an elaborate SCROLL, might be useful for a long series of complex results. But the integer math makes formulating such results (for example, statistical tables) quite impractical.