LISP
Professional, Originally Released On ROM Cartridge
Game Type : Computer Language
Author : Gillian Cattell and Arthur Norman
Standalone Release(s) : 1984: LISP (ROM Cartridge), Acornsoft, £12.95
Compilation Release(s) : None
Stated compatibility : Electron
Actual compatibility : Electron, BBC Master 128
Supplier : ACORNSOFT, Betjeman House, 104 Hills Road, CAMBRIDGE CB2 1LQ
Tel: (0223) 316039
Disc compatibility : Not Applicable
Instructions
This pack contains the Acornsoft LISP system plus ten demonstration programs on ROM Cartridge. The LISP system is provided as a language ROM to give the maximum amount of available memory and allow the use of all graphic modes. It includes full error messages, and features a number of extensions to basic LISP including MODE, SOUND, ENVELOPE, ADVAL, INKEY, TIME, PEEK, POKE, CALL and VDU, to provide easy interface with the Acorn Electron MOS and machine-code programs, improved interactive control structures using LOOP, WHILE and UNTIL functions, and disc input/output control functions.
This package also contains a set of LISP programs for use with Acornsoft LISP, taken from the book Lisp on the BBC Microcomputer and Acorn Electron. They show how LISP can be used in a variety of applications including artificial intelligence, computer graphics and the compilation of computer languages. The programs are easy to use, and it is a simple task to include them in your own LISP applications. Full loading instructions are included in the pack. Although sold separately, we recommend the use of the manual LISP on the BBC Microcomputer and Acorn Electron with this program.
This ROM Cartridge is designed for use with the Electron Plus 1.
Contents
ARITH BIG ANIMALS PARSER ADVENTE
SORT PRETTY GRAPH CODEGEN UTILS
Loading Instructions
To load and run LISP:
1. Switch off the computer.
2. Insert the ROM Cartridge into either of the cartridge slots with the label facing you.
3. Connect the printer if required.
4. Switch the computer on.
The LISP prompt will appear on the screen almost immediately:
Evaluate:
While using LISP, keep the ROM Cartridge in the cartridge slot. You can leave LISP and switch to another language by evaluating, for example:
(* 'BASIC)
or
(* 'B!.)
To go back to LISP again you can type *LISP.
NOTE: You may not be able to call LISP if a second cartridge is present. In this case, simply remove the second cartridge. Note also that you should always switch the computer off before inserting or removing any ROM Cartridge.
Using LISP
The book LISP on the BBC Microcomputer and Acorn Electron is strongly recommended as a User Guide for the Acornsoft LISP ROM Cartridge. It includes a section on programming for the complete beginner, and contains a glossary of all the functions available on this ROM Cartridge plus several demonstration programs. These LISP demonstration programs are included in this package.
Loading The Programs
The LISP demonstration programs contained in this pack are stored as text files. The operating system command EXEC should be used to load them. This causes the computer to treat the contents of the file as though it was being typed in at the keyboard.
To access the operating system commands from LISP, the * function is used. Thus to access the demonstration programs in the ROM Cartridge, the expression:
(* 'ROM)
would be evaluated. To perform a catalogue function, the expression:
(* 'CAT)
would be evaluated. Notice that the argument of * is an identifier or quoted atom. Thus, to load one of the demonstration programs, an expression of the form:
(* 'EXEC! <program name>)
would be evaluated. For example, to load the program PRETTY into the LISP system, evaluate:
(* 'EXEC! PRETTY)
Notice that the space after EXEC needs to be preceded by an exclamation mark (!). If this is not done, LISP assumes that the space marks at the end of the atom representing the command. An abbreviated version is:
(* 'E!.PRETTY)
This uses the minimum abbreviation for EXEC, which is E. This time the ! prevents LISP from interpreting the string as a dotted pair.
When the expression is evaluated (i.e. passed to the operating system) the text of the program will be read from the file and displayed on the screen exactly as if it were being typed by you, only much faster.
At the end of the file, control will return to the keyboard and LISP will print the result of the * function (NIL). At this stage, the presence of the new functions can be confirmed by evaluating:
(OBLIST)
as usual.
Instructions' Source : LISP, ROM Cartridge (Acornsoft) Back and Inner Inlay
Review (Electron User) - "LISP Arrives On ROM Cartridge"
This was one of the first languages to appear on cassette for the Electron, and at last the full implementation is available on ROM Cartridge for the Plus 1.
Priced at £29.95, it may seem expensive, but represents a considerable advance
on the tape version reviewed in Electron User, February 1985. The LISP
cartridge takes precedence on power-up, and typing VERSION tells us that this
is version 5.
Turn on the garbage collector messages and force a collection, and we will find
we have 16.6k available in Mode 6. The extra memory available to the ROB based
LISP allows several enhancements - larger programs, graphics, neater recursive
functions instead of loops, and less time garbage collecting.
Apart from these benefits of extra memory, how much more do you get for your
well-earned money?
I knew that LISP came on a 16k ROM and was surprised to see the cartridge
contained ten example programs, including games, educational programs,
utilities and graphics. I was even more surprised when I couldn't find these
programs in the ROM on disassembly. Efficient packaging? Tokenising? No, the cartridge
also contains a 16k serial ROM. The examples are all taken from the Acornsoft
book, which must be bought separately, and are loaded by selecting the ROM
filing system and *EXECing the file.
When you need, say, a sort function, this can be read from ROM as if it were
typed from the keyboard, thus saving time and energy. In a language where every
machine has its own dialect, Acornsoft LISP could well set some form of
standard for micro-Lisps.
There's no PROG function but LISP being the friendly, flexible language it is, this can be defined if you simply cannot do without GOTOs. The OBLIST contains 130 identifiers, compared to 114 for the tape. Extra facilities include MODE, USR, binary operators, TIME/CLOCK functions, warm or cold start from a break, and textual error messages.
The lack of a MODE command was the only serious drawback of the cassette, which
included lots of functions (ONEP, ZEROP, ADD1, SUB1, CAR/CDR combinations)
which are very easily defined in LISP. The VDU22 command can be used to change
from one mode to another that use the same amount of RAM, say from 4 to 5, but
not from Mode 6 to 3.
Since MODE has a delayed effect - it waits until the next 'Evaluate:' prompt is
displayed - there may still be occasions when VDU22 is needed, but in general
MODE is a very useful function to have.
There is, however, a serious problem with this LISP
- it is extremely
difficult to get hold of. This is a great shame, because it is a superb
implementation of an exceptionally interesting computer language, and 32k of
ROM at this price is a real bargain.
Nick Rhodes, ELECTRON USER 3. 3