[LispM] LispM assembly reference?

Alfred M. Szmidt ams at gnu.org
Tue Nov 1 01:47:42 PDT 2016


   Was skimming this Lisp Machine manual
   (http://bitsavers.trailing-edge.com/pdf/mit/cadr/chinual_3rdEd_Mar81.pdf)
   and fantasizing about making up some lisp-processor-like emulator.

   Does anybody have resources on the assembly language used by Lisp
   Machines (check chapter 27, page 432 of pdf) or the Ivory
   processors? I cant find a full reference online.

There is really no assembly language for the Lisp Machines.  The
"stuff" you see there cannot be inputted as is, only via writing Lisp
code and compiling/interpreting it.  So the "assembly" is infact the
Lisp form entered.

How for example ASSQ and GET and other "basic" functions are
implemented is done in microcode for the CADR/Lambda/3600 (the Ivory
is different), the definitions of ASSQ and GET look like this:

XGET (MISC-INST-ENTRY GET)
	((M-A) Q-TYPED-POINTER C-PDL-BUFFER-POINTER-POP) ;ARG2, PROPERTY NAME
	(CALL-XCT-NEXT PLGET) ;ARG2, FROB TO GET FROM, GET ITS PLIST INTO M-T
       ((M-T) Q-TYPED-POINTER C-PDL-BUFFER-POINTER-POP)
XGET1	(POPJ-EQUAL M-T A-V-NIL)		;END OF PLIST REACHED
	(CALL-XCT-NEXT QCAR)
       ((C-PDL-BUFFER-POINTER-PUSH) M-T)	;SAVE THIS PLIST NODE
	(JUMP-EQUAL M-T A-A QTAD)		;GOT IT, RETURN CADR OF NODE
	(JUMP-XCT-NEXT XGET1)
       (CALL QTDD)				;TAKE CDDR AND LOOK AGAIN

XASSQ (MISC-INST-ENTRY ASSQ)
	((M-T) Q-TYPED-POINTER C-PDL-BUFFER-POINTER-POP)	;ARG2
	((M-A) Q-TYPED-POINTER C-PDL-BUFFER-POINTER-POP)	;ARG1
XASSQ1	(POPJ-EQUAL M-T A-V-NIL)
	(CALL-XCT-NEXT QMAA)
       ((C-PDL-BUFFER-POINTER-PUSH) M-T)
	(JUMP-EQUAL M-T A-A QTA)
	(JUMP-XCT-NEXT XASSQ1)
       (CALL QTD)

But, the only way to call them is to evaluate a Lisp form, or compile
a Lisp form and FUNCALL it.

You will also need to be a bit more specific on which machine you are
talking about, Ivory is vastly different from say CADR, Lambda and the
36xx machines.  Though a good start is the CADR document, and the
actual CADR microcode for understanding how the Lisp part works.

Cheers!


More information about the LispM mailing list