I was unclear.
I meant that the microcode/assembly language words _corresponding to a
particular LISP program_ were created from that program and then executed.
If you define a function (like the ever-popular factorial function)
something has to be stored in memory as the definition; presumably it is
some sort of primitive (as in not-easily-decomposed) machine language, and
presumably there is a program that converts source text into object code.
So wouldn't that converter be a compiler? I believe that a number of
subtle
details happen during the conversion process, so you
couldn't even say the
compiler is a simple compiler.
-- Derek
You were quite clear. The answer is no.
Consider the instruction set of the x86. The MOV instruction is actually
implemented as a small sequence of microinstructions. There is, in fact,
no dedicated series of gates and other electronic aparatus which
implements the operation of MOV. Instead, it is implemented as a
series (or sequence) of smaller operations, such as LOAD REGISTER,
ADD REGISTERS, etc. If you are not familiar with the processes of
microprogramming, then you should become so. Microprograms are
not stored in RAM. Instead, they are stored in ROM.
Also, the only processors which today are founded upon the operation
of dedicated electronics (that is, electronic circuits which implement
fully and singly the operation of a machine instruction for a computer)
are the RISC machines. This is why they are so bloody fast. All CISC
machines are microprogrammed.
For those who are aware of the operations of the HP 21MX processors,
these are microprogrammed machines. As it happens, the user of
such a computer can alter the microprogramming. This is the computer
upon which I obtained my experience as a microprogrammer.
I do not mean to say that the factorial function is microprogrammed. It
is not. However, the operators CAR, CDR, CONS, etc. are implemented
in microcode. Hence, there is no need for translation - they are executed
directly.
For confirmation of this, contact my friend, Chuck Fry at
chucko(a)ptolemy.arc.nasa.gov
Now, it is true that the printed text of the program must be converted to
the instruction set of the computer but, the process is like this.
"CAR" corresponds to the instruction with byte code 0x01
"CDR" corresponds to the instruction with byte code 0x02
and so on. Of course, the byte values I give are only examples. The
true translations are not known to me. However, each operator of
the Lisp language will correspond to a single instruction code of the
Lisp machine.
This is a far cry from the result one usually obtains from a compiler.
If a compiler were used by a Lisp machine, then the operation of
CAR would involve the production of dozens of machine
instructions, just as the call of a subroutine in C involves dozens of
machine instructions. Heck, a simple addition in C results in an
instruction sequence like
MOV AX, address of data1
ADD AX, address of data2
MOV address of result, AX
For the Lisp machine, CAR would result in an instruction like
CAR address of source operand list, address of result operand
list
William R. Buckley