home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / ENTERPRS / CPM / UTILS / S / SCI-12.ARC / SCI.DOC < prev    next >
Text File  |  1986-12-16  |  28KB  |  697 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.                        sss         ccc        ii   
  17.                      sssssss     ccccccc        
  18.                     sss   sss   ccc   ccc   iiii  
  19.                      ssss      ccc          iiii
  20.                         ssss   ccc            ii
  21.                     sss   sss   ccc   ccc     ii
  22.                      sssssss     ccccccc   iiiiiiii
  23.                        sss         ccc     iiiiiiii
  24.  
  25.              A "Small C" Interpreter for CP/M-80 (tm) systems
  26.                         version 1.2: November, 1985
  27.                                Bob Brodt
  28.                             34 Mehrhof Rd.
  29.                         Little Ferry, NJ 07643
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.                               DISCLAIMER
  40.  This program is being distributed under the Freeware (tm) concept
  41.  and, as such, may not be re-distributed for profit.  If you find
  42.  the program useful please make a donation of whatever you feel the
  43.  program is worth, otherwise treat it as you would any other non-
  44.  communicable disease.  The author makes no guarantees of any kind,
  45.  either expressed or implied, as to the bugyness of this program and
  46.  its documentation.  Any bugs that you find in this program and or
  47.  documentation you may keep at no extra charge.
  48.  
  49.  
  50.  
  51.  
  52.  
  53. INTRODUCTION
  54.  
  55.    SCI is a "C" language interpreter loosely based on the language subset
  56.  described in James Hendrix' "Small C" compiler  (see the section
  57.  "DIFFERENCES FROM  SMALL C", below). It is a fully interactive interpreter
  58.  (no compilation!) that includes a simple line editor and a program trace
  59.  facility.  SCI was meant to be a stepping stone for the experienced BASIC
  60.  programmer who is ready to move up to the exciting world of "C"!
  61.  
  62.    The SCI interpreter is very similar to BASIC internally - each line of
  63.  input is first scanned and "tokenized", a process in which language elements
  64.  are converted to one-, two- or three-byte "tokens" which are easier to
  65.  handle by a computer than arbitrarily long character sequences.
  66.  
  67.  
  68. STARTING_OUT
  69.  
  70.    The files on the distribution diskette are:
  71.  
  72.  SCI.DOC   - documentation and sound effects
  73.  SCI.COM   - the interpreter proper
  74.  SHELL.SCI - the command shell, written in "Small C"
  75.  CALC.SCI  - a short demo program
  76.  
  77.    To start up SCI, make sure that SHELL.SCI resides on the current drive
  78.  and then execute SCI.COM. The interpreter will then read and execute the
  79.  program it finds in SHELL.SCI.
  80.  
  81.  
  82. THE_SHELL
  83.  
  84.    The "stock" version of the shell simply displays a prompt on the
  85.  console, reads a line of input, and attempts to execute the input line
  86.  The entire shell program (sans support routines) is shown below:
  87.  
  88.  int size,top;
  89.  char line[80];
  90.  char program[16000];
  91.  
  92.  main()
  93.  {
  94.     int from, to;
  95.  
  96.     top=16000;
  97.     program[0] = 90;   # This is an "End of program" token - required
  98.     size=1;
  99.  
  100.     # print sign-on message
  101.     printf( "%s\nShell V1.1, 23 OCT 1985\n", sys(0) );
  102.  
  103.     while(1)
  104.     {
  105.        puts("> ");
  106.        if(gets(line))
  107.        {
  108.           if (!strncmp(line,"edit",4))
  109.              size = sys(atoi(line+5),program,15); # envoke the editor
  110.           else if (!strncmp(line,"save ",5))
  111.              sys(line+5,program,21);              # save the program buffer
  112.           else if (!strncmp(line,"load ",5))
  113.              size = sys(line+5,program,20);       # load the program buffer
  114.           else if (!strncmp(line,"list",4))
  115.           {
  116.              if(line[4])
  117.                 sscanf(line+4,"%d %d",&from,&to);
  118.              else
  119.              {
  120.                 from=1;
  121.                 to=32765;
  122.              }
  123.              sys(program,from,to,22);           # list the program buffer
  124.           }
  125.           else if (!strncmp(line,"exit",4))
  126.              return;                              # return to previous shell
  127.           else if (!strncmp(line,"free",4))
  128.              printf("%d\n",top-size);             # show amount of free space
  129.           else
  130.              #
  131.              # attempt to parse the line as a small c statement. Note that
  132.              # we will always display the results of the statement, so you
  133.              # could enter something like: 2+2 and a 4 would be printed.
  134.              #
  135.              printf("%d\n", sys(line,program,size,12) );
  136.        }
  137.     }
  138.  }
  139.  
  140.    Later, as you become more familiar with the "C" language, you may wish
  141.  to modify the shell program and add your own commands.  The stock version
  142.  of the shell recognizes four basic (pardon the pun) commands: "edit",
  143.  "load", "save" and "free". These are similar in operation to the BASIC
  144.  commands of the same name, with the exception that no quote (") is required
  145.  in front of the file name for the "load" and "save" commands.  Anything
  146.  else typed at the shell is assumed to be a valid "Small C" statement and
  147.  is handed off to the interpreter to be executed.
  148.  
  149.    By the way, programs that are "save"d by SCI are ordinary text files,
  150.  suitable for editing with your favourite CP/M text editor (if there be
  151.  such a thing).
  152.  
  153.  
  154. THE_EDITOR
  155.  
  156.    To edit a program, simply type "edit", or "edit N", where "N" is the
  157.  line number in the program to start editing. The requested line will be
  158.  displayed and the cursor positioned on the first character of the line.
  159.  
  160.    The editor has two different operating modes: EDIT and INSERT.
  161.  In EDIT mode, you may move the current character position ("cursor")
  162.  anywhere within the program and you may delete text. In INSERT mode,
  163.  any characters that you type are inserted into the program until you
  164.  return to EDIT mode.
  165.  
  166.    Any changes you make during an editing session affect only the program
  167.  currently residing in memory. The copy of the program on disk (if one
  168.  exists) is not changed until you issue a "save" command.
  169.  
  170.    To leave the editor and return to the command shell, type an <ESCAPE>
  171.  character.
  172.  
  173.    Editing commands are divided into 3 categories: cursor movement,
  174.  text insertion and text deletion. The cursor movement commands allow
  175.  you to position the cursor anywhere in the program. These are:
  176.  
  177.    'h' or CTL-S or <BACKSPACE> -
  178.       moves the cursor to the left by 1 character position.
  179.  
  180.    'l' (that's a lower-case "ell") or CTL-D or <SPACE> -
  181.       moves the cursor to the right by 1 character position.
  182.  
  183.    'j' or CTL-X or <RETURN> or <LINEFEED> -
  184.       advances the cursor to the next line ON THE SCREEN and displays
  185.       the next line of the program.
  186.  
  187.    'k' or CTL-E -
  188.       advances the cursor to the next line ON THE SCREEN and displays
  189.       the previous line of the program.
  190.  
  191.    'g' -
  192.       prompts for a line number, advances the cursor to the next line
  193.       on the screen and displays the requested line of the program.
  194.  
  195.    'f' -
  196.       prompts for a character sequence to be searched for in the program,
  197.       advances the cursor to the next line on the screen and displays the
  198.       requested line of the program.
  199.  
  200.    If the cursor is moved past the end of the program, the editor will
  201.  display an <EOF> and will not allow you to move past it. Similarly, if
  202.  the cursor is moved to the first line of the program, the 'k' command
  203.  will be inoperative.
  204.  
  205.    The text insertion commands are:
  206.  
  207.    'i' -
  208.       will cause characters to be inserted before the current cursor
  209.       position. As you type, the characters to the right of the cursor
  210.       will appear to be overwritten on the screen, but are actually shifted
  211.       (in the editor's buffer) to make room for the inserted text.
  212.       To leave the character insertion mode, end the line with a <RETURN>.
  213.       the cursor will advance to the next line on the screen and the line
  214.       will be redrawn with the newly inserted text.
  215.    'I' -
  216.       will enter line insertion mode. All characters typed will be inserted
  217.       into the program in front of the line the cursor was resting on.
  218.       To leave the line insertion mode, type and <ESCAPE>.
  219.  
  220.    Text may be deleted from the program either a character-at-a-time or
  221.    a line-at-a-time:
  222.  
  223.    'd' -
  224.       will delete the character the cursor is resting on. The cursor
  225.       advances to the next line on the screen and the current line is re-
  226.       drawn with the deleted character missing.
  227.  
  228.    'D' -
  229.       will delete the line the cursor is resting on. The cursor advances
  230.       to the next line on the screen and the next line in the program is
  231.       displayed.
  232.  
  233.    Remember, type <ESCAPE> to exit the editor!
  234.  
  235.  
  236. LANGUAGE_ELEMENTS
  237.  
  238.    Althgough SCI implements only a subset of the "C" language, it is
  239.  powerful enough to teach you the major principles of "C". We're going
  240.  to cop out now and refer you to a higher authority for a sound
  241.  introduction to "C", but we will list here the major features of the
  242.  language subset recognized by SCI.
  243.  
  244.    * "char" and "int" data types, as well as pointers to "char"s and
  245.      "int"s and single-dimensioned arrays of "char" and "int".
  246.  
  247.    * Decimal integer constants, character constants and string constants.
  248.      Character and string constants may contain all of the standard
  249.      escape characters such as "\n", "\b", etc. Hexadecimal and octal
  250.      integer constants are not supported.
  251.  
  252.    * "if-else" and "while-break" control structures.
  253.  
  254.    * Numerous operating system functions available to user programs
  255.      (see THE SYS FUNCTIONS, below).
  256.  
  257.    * Program trace capability.
  258.  
  259.  
  260. MY_FIRST_PROGRAM
  261.  
  262.    To get you started writing "C" programs, step right up to your computer
  263.  (don't be shy), fire 'er up and insert the disk. Then type "SCI" and
  264.  wait for the shell program to load (don't get too anxious now!).
  265.  When the shell prompts you with "> " boldly type the word:
  266.  
  267.       > edit_
  268.  
  269.    and hit <RETURN>. You are now in the editor. Time to refer back to
  270.  the EDITOR section of this manual. Since there is nothing in the program
  271.  buffer, the editor displays:
  272.  
  273.         1:<EOF>_
  274.  
  275.    Hold down that shift key and poke the key with the letter 'I' on it.
  276.  You are now in line insertion mode. Anything you type from here on will
  277.  be inserted into the program buffer until you press <ESCAPE>. Notice that
  278.  the editor prompts you with "new:" to tell you that you are entering a new
  279.  line. So, why not just type in the little program below:
  280.  
  281.       new:hi()
  282.       new:{
  283.       new:   puts( "hello, world\n" );
  284.       new:}
  285.       new:_
  286.  
  287.    When you're done, hit <ESCAPE> to end line insertion mode. Your screen
  288.  should look like this:
  289.  
  290.       new:hi()
  291.       new:{
  292.       new:   puts( "hello, world\n" );
  293.       new:}
  294.         5:<EOF>_
  295.  
  296.  Then type <ESCAPE> again to leave the editor. When the shell gives you
  297.  its prompt, type:
  298.  
  299.       > hi()_
  300.  
  301.    and hit <RETURN>. The shell will hand the input line off to the
  302.  interpreter, the interpreter will scan the program buffer for a function
  303.  named "hi" and call that function. The "hi" function will then call the
  304.  library function "puts" to print the string "hello, world\n" on the console.
  305.  What you see is simply:
  306.  
  307.       > hi()
  308.       hello, world
  309.       > _
  310.  
  311.    Congratulations, even if six months ago you couldn't spell "programur",
  312.  you now are one!
  313.  
  314.  
  315. THE_SYS_FUNCTIONS
  316.  
  317.    The "sys" keyword has been reserved by SCI as a means of communicating
  318.  between a user's program and the interpreter. It is treated exactly the
  319.  same as a (pre-defined) function that may be referenced by a user program.
  320.  This is an interface to some complex and time-critical system functions,
  321.  that has been provided mainly as a convenience to the user.
  322.  
  323.    A "sys" call may have several arguments, the number and type of which
  324.  depends upon the integer value of the last (right-most) argument. This
  325.  righ-most argument is called the "sys number" and defines the actual
  326.  function performed by a "sys" call. These "sys numbers" and the functions
  327.  performed by each are described below. Following the sys number, in
  328.  parentheses, is a mnemonic name for the function that is also the name
  329.  of a "library" function that may be found in the stock shell, SHELL.SCI.
  330.  These library functions provided in the standard shell are merely
  331.  intermediate functions to the "sys" call. They are intended to provide a
  332.  programming environment that is compatible with most commercially available
  333.  "C" compilers. The usage of these functions is identical to the "sys" calls
  334.  with the exception that the "sys number" need NOT be given in the library
  335.  function call.
  336.  
  337.          library
  338.  sys #   function   description
  339.  -----  ---------   -----------
  340.   0     (version) - returns a pointer to a string containing the version
  341.                     number of the interpreter.
  342.   1     (putchar) - sends a single character to the console.
  343.                     RETURNS: the character that was displayed.
  344.  
  345.                     sys(chr,1)
  346.                        chr - the character to be displayed.
  347.  
  348.   2     (getchar) - reads a character from the console keyboard and echos
  349.                     it to the console display.
  350.                     RETURNS: the character read.
  351.  
  352.                     sys(2) - no arguments.
  353.  
  354.   3     (fputs)   - writes a string to a given file channel. The channel
  355.                     must have been previously opened with sys(7), or it
  356.                     may be either 1 or 2 to write to the standard output
  357.                     file (initially the console) or the standard error
  358.                     file (also initially the console).
  359.                     RETURNS: the address of the string, or -1 on error.
  360.  
  361.                     sys(str,channel,3)
  362.                        str - the string to be written.
  363.                        channel - the file channel number.
  364.  
  365.   4     (fgets)   - reads a string from a given file channel. The channel
  366.                     must have been previously opened with sys(7), or it
  367.                     may be 0 to read from the standard input file
  368.                     (initially the console). A string is roughly equivalent
  369.                     to a single line of text in the file.
  370.                     RETURNS: the address of the string, or 0 on EOF.
  371.  
  372.                     sys(buf,channel,4)
  373.                        str - the address where the string will be read to.
  374.                        channel - the file channel number.
  375.  
  376.   5     (sprintf) - does a formatted print to a string. See the "printf"
  377.                     function in your "C" manual for more info.
  378.                     RETURNS: nothing interesting.
  379.  
  380.                     sys(buf,format,arg1,arg2 ... arg8,5)
  381.                         buf - the address where the formatted string will
  382.                            be written to.
  383.                         format - the conversion format.
  384.                         arg1...arg8 - up to 8 optional arguments that will
  385.                            be converted, according to "format".
  386.  
  387.   6     (sscanf)  - does a formatted read from a string. See the "scanf"
  388.                     function in your "C" manual for more info.
  389.                     RETURNS: the number of items read.
  390.  
  391.                     sys(buf,format,arg1,arg2 ... arg8,6)
  392.                         buf - the string to be scanned.
  393.                         format - the conversion format.
  394.                         arg1...arg8 - up to 8 optional arguments that will
  395.                            receive the information scanned from "buf"
  396.  
  397.   7     (fopen)   - opens the given file name for read or write.
  398.                     RETURNS: a non-negative channel number to be used for
  399.                     subsequent reads or writes on the channel, or a -1 if
  400.                     the file could not be opened.
  401.  
  402.                     sys(file,mode,7)
  403.                        file - the name of the file to be opened.
  404.                        mode - is the string "r" to open the file for read,
  405.                               or "w" for write.
  406.  
  407.   8     (fread)   - reads a given number of bytes from a file channel. As
  408.                     with sys(4), the channel must already be open.
  409.                     RETURNS: the address of the data read, or 0 on EOF.
  410.  
  411.                     sys(buf,count,channel,8)
  412.                        buf - the address where the data will be read to.
  413.                        count - the number of data bytes to be read.
  414.                        channel - the file channel number.
  415.  
  416.   9     (fwrite)  - writes a given number of bytes to a file channel.
  417.                     RETURNS: the address of the data written, or -1 on error.
  418.  
  419.                     sys(buf,count,channel,9)
  420.                        buf - the address of the data to be written.
  421.                        count - the number of data bytes to be written.
  422.                        channel - the file channel number.
  423.  
  424.   10     (fclose) - closes an open file channel.
  425.                     RETURNS: 0 if successful, or -1 if not.
  426.  
  427.                     sys(channel,10)
  428.                        channel - the file channel number.
  429.  
  430.   11     (exit)   - exits to CP/M
  431.  
  432.                     sys(11) - no arguments.
  433.  
  434.   12     (stmt)   - hands a string containing a "Small C" statement off to
  435.                     the interpreter to be executed.
  436.                     RETURNS: the results of the statement.
  437.  
  438.                     sys(str,12)
  439.                        str - the string containing the C statement.
  440.  
  441.   13     (totok)  - "tokenize" the given string containing a "Small C"
  442.                     statement.
  443.                     RETURNS: the length of the tokenized string.
  444.  
  445.                     sys(srcbuf,tknbuf,13)
  446.                        srcbuf - the string containing the C statement.
  447.                        tknbuf - the destination of the tokenized version
  448.                           of "srcbuf".
  449.  
  450.   14     (untok)  - "un-tokenizes" the given token string.
  451.                     RETURNS: the length of the tokenized string.
  452.  
  453.                     sys(tknbuf,srcbuf,14)
  454.                        tknbuf - the string containing the tokenized C
  455.                           statement.
  456.                        srcbuf - the destination of the untokenized version
  457.                           of "tknbuf".
  458.  
  459.   15     (edit)   - envokes the program editor.
  460.                     RETURNS: the new length of the program buffer.
  461.  
  462.                     sys(linenum,program,15)
  463.                        linenum - the line number to start editing.
  464.                        program - the tokenized program buffer.
  465.  
  466.   16     (strcmp) - comparse two strings for equality.
  467.                     RETURNS: 0 if the strings match, non-zero if not.
  468.  
  469.                     sys(str1,str2,count,16)
  470.                        str1,str2 - the 2 strings to be compared.
  471.                        count - an optional count of the number of characters
  472.                           to be compared.
  473.   17     (corelft)- check how much free space is left in the heap.
  474.                     RETURNS: the number of bytes of available memory.
  475.  
  476.                     sys(17) - no arguments.
  477.  
  478.   18     (malloc) - request a given number of bytes of memory from the heap.
  479.                     RETURNS: the address of the first byte of the allocated
  480.                     block. This address must be given to sys(19) to return
  481.                     the block back to the heap.
  482.  
  483.                     sys(count,18)
  484.                        count - the number of bytes requested.
  485.  
  486.   19     (free)   - return a block of memory to the heap.
  487.  
  488.                     sys(address,19)
  489.                        address - the address of the block (previously gotten
  490.                           from sys(18).
  491.  
  492.   20     (load)   - load a program (in untokenized form) from a file into
  493.                     memory.
  494.                     RETURNS: the size of the tokenized program.
  495.  
  496.                     sys(file,program,20)
  497.                        file - the name of the file containing the program.
  498.                        program - an array that contains the tokenized
  499.                           version of the program.
  500.  
  501.   21     (save)   - save a program (in tokenized form) to a file.
  502.                     RETURNS: nothing interesting.
  503.  
  504.                     sys(file,program,21)
  505.                        file - the name of the file where the program is to
  506.                           be written to.
  507.                        program - an array that contains the tokenized
  508.                           version of the program.
  509.  
  510.   22     (list)   - list a program in tokenized form to the console.
  511.                     RETURNS: nothing interesting.
  512.  
  513.                     sys(program,from,to,22)
  514.                        program - an array that contains the tokenized
  515.                           version of the program.
  516.                        from - the starting line # to be listed.
  517.                        to - the ending line # to be listed.
  518.  
  519.   23     (trace)  - enable or disable the program line trace function.
  520.                     RETURNS: nothing interesting.
  521.  
  522.                     sys(on_off,23)
  523.                        on_off - if non-zero will enable trace, zero will
  524.                           disable it.
  525.  
  526.  
  527. PROGRAM_TRACE
  528.  
  529.    The library function "trace", described in the previous section allows
  530.  you to enable or disable the program trace feature.  In the trace mode,
  531.  you can set and remove breakpoints, examine and modify program variables
  532.  control the execution of the program, and generally muck around in the
  533.  guts of your program as you please.
  534.  
  535.    When trace is enabled, the interpreter displays each line of the program
  536.  on the console before it executes it, and then displays a question mark (?)
  537.  prompt.  At this point you may either enter another "Small C" statement
  538.  (to display the contents of a variable for example) or enter one of the
  539.  following commands (NOTE: all of these commands start with a dot (.) in
  540.  the first column):
  541.  
  542.     .b#      sets a breakpoint at a given line in your program.  The "#"
  543.              immediately following the "b" is the line number at which the
  544.              program will halt.  You may set a maximum of 10 breakpoints.
  545.     .B       displays all breakpoints set in the program.
  546.     .c       continue program execution until the next breakpoint is
  547.              encountered.
  548.     .d#      deletes the breakpoint at line "#".  The breakpoint must have
  549.              been previously set with a ".b".
  550.     .D       deletes all breakpoints set.
  551.     .q       quits program execution altogether and returns to the shell.
  552.     .s#      steps through the program without displaying each line as it
  553.              is executed.  The "#" indicates the number of lines to be
  554.              executed.
  555.     .e#      lets you examine the program with the program editor - you may
  556.              look, but not touch!
  557.     <RETURN> the interpreter executes the current line and goes on to the
  558.              next line in the program.  This is the same as ".s1".
  559.     <ESCAPE> disables trace and continues execution normally.
  560.  
  561.    Also, if the interpreter finds an error in your program, it will
  562.  automatically enable trace and halt the program at the offending line,
  563.  at which point you may wish to examine program variables or whatever.
  564.  
  565.  
  566. PASSING_ARGUMENTS_TO_THE_SHELL
  567.  
  568.    A mechanism has been provided to pass CP/M command line arguments to
  569.  the command shell in a way similar to most commerically available "C"
  570.  compilers.  When you start up SCI from CP/M, a "-A" will cause all
  571.  following arguments to be passed to the command shell.  For example,
  572.  suppose the following program to be the command shell:
  573.  
  574.       main( argc, argv )
  575.       int argc, *argv;
  576.       {
  577.           int i;
  578.  
  579.           while( i<argc )
  580.           {
  581.               printf("<%s>\n",argv[i]);
  582.               i=i+1;
  583.           }
  584.       }
  585.  
  586.  Then, typing the CP/M command:
  587.  
  588.       A>SCI -A HELLO OUT THERE
  589.  
  590.  would cause SCI to display the following:
  591.  
  592.       <HELLO>
  593.       <OUT>
  594.       <THERE>
  595.  
  596.  
  597. DIFFERENCES_FROM_SMALL_C
  598.  
  599.    SCI supports the subset of the "C" language defined by James Hendrix'
  600.  public domain "Small C" compiler, available for many CP/M and MS-DOS
  601.  machines. There are, however, some minor differences that have been
  602.  dictated in part by the fact that this is an interpreter. These are:
  603.  
  604.    0) Program source lines are limited to 80 characters, just to keep
  605.       things simple. The editor will complain if you try to enter a line
  606.       longer than 80 characters.
  607.    1) There are no #define or #include statements, simply because there
  608.       is no pre-processor!
  609.    2) Comments are introduced by the number symbol (#) and are terminated
  610.       by the end of the line. The "/*" and "*/" combinations will only
  611.       be barfed at by SCI.
  612.    3) Statements in general are terminated by the end of a line - the
  613.       semicolon required by the "C" language at the end of a statement
  614.       is superfluous. This restriction imposes that an expression be
  615.       completely on one line (boooo, hissss!), however you no longer
  616.       get penalized for forgeting a semicolon (hurray, yay!). This also
  617.       implies that string and character constants are terminated by the
  618.       end of the line. In fact, if you forget to add the terminating quote
  619.       or apostrophe delimiter, SCI will insert one for you.
  620.    4) Increment and decrement operators are not recognized (aaaaww).
  621.    5) The comma operator is recognized ONLY when used in function calls
  622.       and data declarations. For instance, it would be illegal to say:
  623.          while ( argv=argv+1, argc=argc-1 );
  624.    6) Data declarations may appear ANYWHERE within a program or function
  625.       (hurray, yay!), however local data declarations remain active up
  626.       to the end of the function - they don't go away at the end of the
  627.       compound statement they were declared in (boooo, hissss!).
  628.    7) Pointers to integers are advanced to the next BYTE, not the next
  629.       integer. For example, *(ip+1) will point to the least significant
  630.       byte of the next integer (on a Z80 machine), not the next word
  631.       (booo, hisss!). But, ip[1] still points to the next integer (whew!).
  632.    8) Pointer expressions are not allowed on the left-hand side of an
  633.       equal sign.  This restriction is due to the author's laziness.
  634.    9) Be careful, array references can be used on the left side of an
  635.       equal sign (ptewph, yuk, cough!).
  636.  
  637.  
  638. ERROR_MESSAGES
  639.  
  640.  missing '}' or ')'
  641.    Left and right braces or parentheses don't match up.
  642.  
  643.  missing operator
  644.    The interpreter found two consecutive operands.
  645.  
  646.  missing ')' or ']'
  647.    Left and right brackets don't match up
  648.  
  649.  subscript out of range
  650.    The subscript used to index an array was larger (or smaller) than
  651.    what the array was declared to be.
  652.  
  653.  not a pointer
  654.    An attempt was made to use a simple char or int variable as an array
  655.    or a pointer.
  656.  
  657.  syntax error
  658.    An error was detected in the structure of a statement.
  659.  
  660.  need an lvalue
  661.    An attempt was made to assign a value to a constant.
  662.  
  663.  stack overflow
  664.    The expression is too complicated or function calls are nested too
  665.    deeply.
  666.  
  667.  stack underflow
  668.    Something is wrong (?)
  669.  
  670.  too many functions
  671.    Just what it says - the interpreter ran out of function table space.
  672.  
  673.  too many symbols
  674.    The interpreter ran out of variable table space.
  675.  
  676.  out of memory
  677.    Just what it says.
  678.  
  679.  link error
  680.    The interpreter could not make sense out of the program.
  681.  
  682.  missing '}'
  683.    Left and right braces don't match up.
  684.  
  685.  sys error
  686.    The wrong number of arguments were passed to a sys call.
  687.  
  688.  undefined symbol
  689.    A variable name was used that was never declared anywhere.
  690.  
  691.  interrupt
  692.    A user program was interrupted by pressing the <ESCAPE> key. To resume,
  693.    press <ESCAPE> again.
  694.  
  695.  unknown error
  696.    something is wrong with the interpreter (?).
  697.