(FILECREATED "26-JAN-83 09:51:01" {PHYLUM}<LISPCORE>SOURCES>MICROTEST.;11 225117Q

      changes to:  (FNS \SLOWIQUOTIENT LSH.UFN.TEST \MAKENUMBER DIAGNOSE LRSH.TEST LLSH.TEST 
			\SLOWIDIFFERENCE \SLOWIPLUS2 \SLOWLLSH1 \SLOWLLSH8 DEQ)
		   (VARS MICROTESTCOMS UFNFNS)
		   (MACROS \IQUOTREM .SUBSMALL.)

      previous date: "25-JAN-83 17:42:43" {PHYLUM}<LISPCORE>SOURCES>MICROTEST.;9)


(* Copyright (c) 1981, 1982, 1983 by Xerox Corporation)

(PRETTYCOMPRINT MICROTESTCOMS)

(RPAQQ MICROTESTCOMS [(FNS \SLOWIQUOTIENT \MAKENUMBER LLSH LRSH)
	(MACROS .SUBSMALL.)
	(FNS \RESETSTACK \INTERPRETER INITIALEVALQT INTERRUPTED \KEYHANDLER \MAPMDS \RESETSYSTEMSTATE)
	(FNS EVALQT DIAGNOSE)
	(VARS DIAGNOSTICS (STACKTESTING))
	(GLOBALVARS STACKTESTING)
	[E (PUTD (FUNCTION DIAGNOSTICS)
		 (CONS (FUNCTION LAMBDA)
		       (CONS NIL (MAPCAR DIAGNOSTICS (FUNCTION CONS]
	(* note definition of DIAGNOSTICS set up by PUTD in previous expression)
	(FNS DIAGNOSTICS)
	(FNS * DIAGNOSTICS)
	(VARS (F0 0)
	      (F1 1)
	      (F2 2)
	      (F3 3)
	      (F4 4)
	      (F5 5)
	      (F6 6)
	      (F7 7)
	      (F8 10Q)
	      (G0 0)
	      (G1 1)
	      (G2 2)
	      (G3 3)
	      (G4 4)
	      (G5 5)
	      (G6 6)
	      (G7 7)
	      (G8 10Q))
	(FNS DIAGNOSTICERROR GETGLOBAL DIAGNOSTICLOOP PRINTN FUNCTION.WITH.FRAME.STUCK 
	     CHECK.STUCK.FRAME STUCK.CALLER BUMP.CALLERS.USE CLEANUP.BUMPED.FRAME DEQ)
	(FNS FN.FIRSTARG FN.FIRSTARG.PVARS FN.FIRSTARG.FVARS FN.FIRSTARG.PVARS.FVARS FN.LASTARG 
	     FN.LASTARG.PVARS FN.LASTARG.FVARS FN.LASTARG.FVARS.PVARS FN.ARGCOUNT CALL.VAG2.LOC 
	     FVAR.TESTN FN.FREE.SKIPPVARS FN.FREEPVAR FN.FVAR3 FN.FREEARG FN.FR1 FN.FR2 FN.FR3 
	     UNBOUND.VARIABLE FAULTTEST CHECKCALL CHECKCALLERSFRAME CHECKCALL.1 CHECKCALL.15 
	     CHECKCALL.PVAR CHECKCALL.PVAR.1 CHECKCALL.PVAR.15 TRUE)
	(DECLARE: EVAL@COMPILE DONTCOPY (P (RESETSAVE OPTIMIZATIONSOFF T))
		  (PROP XMACRO IPLUS.N IDIFFERENCE.N)
		  (MACROS CHECKVAL CHECKSTACK CHECKPTR CHECKPUSH COMPUTEFORM SIMPLEPRINT CHECKPUSH! 
			  FREEVARTEST IPLUS.N IDIFFERENCE.N)
		  (PROP DOPVAL BAD.NOP NOP .COPY. COPY.SWAP.POP COPY.1 COPY.2 COPY.3 STORE.1 STORE.2 
			STORE.3)
		  (COMS (RECORDS BITBLOCK)
			(VARS BITFIELDS)
			(MACROS BITTEST PUTBITTEST))
		  DONTEVAL@LOAD
		  (GLOBALVARS G0 G1 G2 G3 G4 G5 G6 G7 G8 FAULTTEST BUMPED.FRAME INTERP.DEFINITION)
		  (FILES (LOADCOMP)
			 LLSTK)
		  (P (CHECKIMPORTS (QUOTE (MODARITH LLPARAMS))
				   T)))
	(FNS * UFNFNS)
	(VARS (\INTERRUPTABLE)
	      (\InterruptEnable T)
	      (\InterruptChar)
	      (\INTCHAR)
	      (FAULTTEST T))
	(MACROS IDIFN IPLUSN)
	(FNS \BLT \ZEROWORDS)
	(DECLARE: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS
		  (ADDVARS (NLAMA)
			   (NLAML)
			   (LAMA \INTERPRETER CHECKCALL.PVAR CHECKCALL FN.ARGCOUNT])
(DEFINEQ

(\SLOWIQUOTIENT
  [LAMBDA (X Y)                                              (* lmm "26-JAN-83 09:49")
    (PROG (HX LX HY LY SIGNQUOTIENT SIGNREMAINDER (CNT 0)
	      (HZ 0)
	      (LZ 0))
          (.UNBOX. X HX LX)
          (.UNBOX. Y HY LY)
          [COND
	    ((IGREATERP HX MAX.POS.HINUM)
	      (.NEGATE. HX LX)
	      (SETQ SIGNQUOTIENT (SETQ SIGNREMAINDER T]      (* Remainder has sign of dividend)
          [COND
	    ((IGREATERP HY MAX.POS.HINUM)
	      (.NEGATE. HY LY)
	      (SETQ SIGNQUOTIENT (NOT SIGNQUOTIENT]
          (COND
	    ((NEQ HX 0)
	      (GO BIGDIVIDEND))
	    ((NEQ HY 0)                                      (* Y is big, X is small, so result is 0)
	      (GO DONE))
	    ((ZEROP LX)
	      (GO RET0))
	    ((ZEROP LY)
	      (GO DIVZERO))
	    ((EQ LY 1)
	      (SETQ LZ LX)
	      (SETQ LX 0)
	      (GO DONE)))                                    (* here we are dividing small X by small Y, and we know 
							     Y gt 1)
      LP1                                                    (* shift Y left until it is as big as X, and count how 
							     many times)
          (COND
	    ((AND (ILESSP LY LX)
		  (ILEQ LY MAX.POS.HINUM))
	      (SETQ LY (LLSH LY 1))
	      (SETQ CNT (ADD1 CNT))
	      (GO LP1)))
      LP2                                                    (* now start dividing Y into X by subtracting and 
							     shifting, ending up with Y shifted back where it 
							     started)
          [COND
	    ((ILEQ LY LX)
	      (SETQ LX (IDIFFERENCE LX LY))                  (* Y divides X once, so add bit into quotient)
	      (SETQ LZ (ADD1 LZ]
          (SETQ LY (LRSH LY 1))
          (SETQ CNT (SUB1 CNT))
          (COND
	    ((IGEQ CNT 0)
	      (SETQ LZ (LLSH LZ 1))
	      (GO LP2)))
          (GO DONE)
      BIGDIVIDEND                                            (* X is big, so result may be big.
							     Algorithm is same as above, but everything is doubled in
							     length)
          (COND
	    ((ZEROP HY)
	      (COND
		((ZEROP (SETQ HY LY))
		  (GO DIVZERO)))
	      (SETQ LY 0)
	      (SETQ CNT 20Q)))
      BIGLP
          (COND
	    ((AND (OR (AND (EQ HY HX)
			   (ILESSP LY LX))
		      (ILESSP HY HX))
		  (ILESSP HY MAX.POS.HINUM))
	      (.LLSH1. HY LY)
	      (SETQ CNT (ADD1 CNT))
	      (GO BIGLP)))
      BIGLP2
          (COND
	    ((OR (ILESSP HY HX)
		 (AND (EQ HY HX)
		      (ILEQ LY LX)))                         (* Y divides X, so subtract Y from X and put a bit in 
							     quotient)
	      (SETQ HX (IDIFFERENCE (IDIFFERENCE HX HY)
				    (.SUBSMALL. LX LY)))
	      (SETQ LZ (ADD1 LZ))                            (* note that this never overflows, because of the 
							     preceding left shift)
	      ))
          (.LRSH1. HY LY)
          (SETQ CNT (SUB1 CNT))
          (COND
	    ((IGEQ CNT 0)
	      (.LLSH1. HZ LZ)
	      (GO BIGLP2)))
      DONE(COND
	    (SIGNQUOTIENT (.NEGATE. HZ LZ)))
          (SETQ X (\MAKENUMBER HZ LZ))
          (RETURN)
      DIVZERO
          (ERROR "DIVIDE BY ZERO" Y)
      RET0(SETQ X 0)
          (RETURN))
    X])

(\MAKENUMBER
  [LAMBDA (N0 N1)                                            (* lmm "26-JAN-83 09:28")
                                                             (* used as punt case for arith opcodes which create 
							     large numbers)
    (SELECTQ N0
	     (0 N1)
	     (177777Q (\ADDBASE \SMALLNEGSPACE N1))
	     (PROGN (CHECKVAL (AND (SMALLPOSP N0)
				   (SMALLPOSP N1)))
		    (CHECKVAL (AND (NEQ N0 0)
				   (NEQ N0 177777Q)))
		    (SELECTQ N0
			     [1 (COND
				  ((ZEROP N1)
				    200000Q)
				  ((EQ N1 100000Q)
				    300000Q)
				  (T (DIAGNOSTICERROR]
			     [177776Q (COND
					((EQ N1 177777Q)
					  -200001Q)
					((EQ N1 77777Q)
					  -300001Q)
					(T (DIAGNOSTICERROR]
			     (DIAGNOSTICERROR])

(LLSH
  [LAMBDA (X N)                                              (* lmm "13-OCT-82 15:30")
    (COND
      ((IGREATERP 0 N)
	(LRSH X (IMINUS N)))
      (T (PROG (XHI XLO)
	       (.UNBOX. X XHI XLO)
	       (COND
		 ((IGREATERP N 37Q)
		   (RETURN 0)))
	       [COND
		 ((IGREATERP N 17Q)
		   (SETQ XHI XLO)
		   (SETQ XLO 0)
		   (SETQ N (IDIFFERENCE N 20Q]
	       [COND
		 ((IGREATERP N 7)
		   (SETQ XHI (IPLUS (LLSH (LOGAND XHI 377Q)
					  10Q)
				    (LRSH XLO 10Q)))
		   (SETQ XLO (LLSH (LOGAND XLO 377Q)
				   10Q))
		   (SETQ N (IDIFFERENCE N 10Q]
	       (FRPTQ N (SETQ XHI (LOGAND XHI MAX.POS.HINUM))
		      (.LLSH1. XHI XLO))
	       (RETURN (\MAKENUMBER XHI XLO])

(LRSH
  [LAMBDA (X N)                                              (* lmm "13-OCT-82 15:30")
                                                             (* assumes case where n is constant and 10Q or 1 handled
							     in microcode or by \SLOWLRSHn)
    (COND
      ((IGREATERP 0 N)
	(LLSH X (IMINUS N)))
      (T (PROG (XHI XLO)
	       (.UNBOX. X XHI XLO)
	       (COND
		 ((IGREATERP N 37Q)
		   (RETURN 0)))
	       [COND
		 ((IGREATERP N 17Q)
		   (SETQ XLO XHI)
		   (SETQ XHI 0)
		   (SETQ N (IDIFFERENCE N 20Q]
	       [COND
		 ((IGREATERP N 7)
		   (SETQ XLO (IPLUS (LRSH XLO 10Q)
				    (LLSH (LOGAND XHI 377Q)
					  10Q)))
		   (SETQ XHI (LRSH XHI 10Q))
		   (SETQ N (IDIFFERENCE N 10Q]
	       (FRPTQ N (.LRSH1. XHI XLO))
	       (RETURN (\MAKENUMBER XHI XLO])
)
(DECLARE: EVAL@COMPILE 

(PUTPROPS .SUBSMALL. MACRO ((X Y)                            (* Subtract Y from X, returning the borrow out of the 
							     next word)
			    (COND
			      ((ILEQ Y X)
				(SETQ X (IDIFFERENCE X Y))
				0)
			      (T [SETQ X (ADD1 (IDIFFERENCE MAX.SMALL.INTEGER (IDIFFERENCE Y X]
				 1))))
)
(DEFINEQ

(\RESETSTACK
  [LAMBDA NIL                                                (* lmm " 2-OCT-81 13:44")
                                                             (* redefined in LLSTK if loaded)
    (EVALQT])

(\INTERPRETER
  [LAMBDA NOBIND                   (* lmm " 2-OCT-81 22:17")
    [COND
      (STACKTESTING (PROG ((N (\MYARGCOUNT)))
		          [CHECKVAL (OR (EQ (\ARG0 N)
					    INTERP.DEFINITION)
					(EQ (\ARG0 N)
					    (QUOTE INTERP.TESTFNNAME]
		          (FREEVARTEST (CHECKVAL (EQ N (ADD1 NA]
    (QUOTE INTERP.TESTVAL])

(INITIALEVALQT
  [LAMBDA NIL                                                (* lmm "11-JUN-82 15:40")
    (\SETIOPOINTERS])

(INTERRUPTED
  [LAMBDA NIL                                          (* bvm: " 6-NOV-81 10:46")
    (SELCHARQ \INTCHAR
	      (↑B (RAID (QUOTE ↑B)))
	      (↑C (RAID (QUOTE ↑C)))
	      (↑D (RESET))
	      (↑W (RELEASEWORKINGSET))
	      (SIMPLEPRINT "Unknown interrupt.
"])

(\KEYHANDLER
  [LAMBDA NIL                                                (* lmm "29-JUL-81 11:23")
                                                             (* DUMMY KEY HANDLER)
    (PROG NIL
      LP  (RAID "Key Handler called")
          (\CONTEXTSWITCH \KbdFXP)
          (GO LP])

(\MAPMDS
  [LAMBDA NIL                                                (* lmm "29-JUL-81 13:28")
    NIL])

(\RESETSYSTEMSTATE
  [LAMBDA NIL                                                (* lmm "29-JUL-81 11:25")
    NIL])
)
(DEFINEQ

(EVALQT
  [LAMBDA NIL                                                (* lmm "29-JUL-81 11:27")
    (PROG NIL
      LP  (DIAGNOSE)
          (RAID "DIAGNOSE returned")
          (GO LP])

(DIAGNOSE
  [LAMBDA (ARG)                                              (* lmm "26-JAN-83 09:09")
                                                             (* DIAGNOSTICS FOR BYTE LISP.
							     DIAGNOSE IS THE FIRST FUNCTION CALLED WHEN STARTING UP 
							     LISP)
                                                             (* RUN THRU ALL SIMPLE OPCODES ONCE)
    (SIMPLEPRINT "DIAGNOSE STARTED")
    (NOP NIL T 0 1 2 -1 177777Q (QUOTE ATOM)
	 ARG
	 (EQ (NOP (EQ NIL T))
	     NIL)
	 (COPY.SWAP.POP NIL)
	 (LISTP NIL)
	 (LISTP (QUOTE (A)))
	 (STRINGP NIL)
	 (STRINGP "A")
	 (CAR (QUOTE (A)))
	 (CDR (QUOTE (A)))
	 (CDR (QUOTE (A B)))
	 (NTYPX NIL)
	 (\DTEST NIL (QUOTE LITATOM))
	 (\HILOC NIL)
	 (\VAG2 0 0)
	 (\ADDBASE NIL 1)
	 (\LOLOC NIL)
	 (IGREATERP (IPLUS (IDIFFERENCE (LOGOR (LOGAND (LRSH (LLSH (LRSH (LLSH 1 1)
									 1)
								   10Q)
							     10Q)
						       1)
					       2)
					1)
			   1)
		    1)
	 (IPLUS.N (IDIFFERENCE.N 5 3)
		  4)
	 (AND 0 NIL (RAID))
	 (COND
	   (NIL (RAID))
	   ((NOT 0)
	     (RAID))
	   (0 (OR NIL 0 (RAID)))
	   (T (RAID)))
	 (\GETBASE \VALSPACE 0)
	 (\GETBASEPTR \VALSPACE 0)
	 (\PUTBASE \VALSPACE 1 0)
	 (\PUTBASEPTR \VALSPACE 0 NIL)
	 (SETQ \VALSPACE \VALSPACE)
	 (PROG (PV)
	       (NOP PV)))
    [NOP (CHECKSTACK NIL)
	 (CHECKSTACK T)
	 (CHECKSTACK 0)
	 (CHECKSTACK 1)
	 (CHECKSTACK 2)
	 (CHECKSTACK -1)
	 (CHECKSTACK 177777Q)
	 (CHECKSTACK (QUOTE ATOM))
	 (CHECKSTACK ARG)
	 (CHECKSTACK (EQ (NOP (EQ NIL T))
			 NIL))
	 (CHECKSTACK (COPY.SWAP.POP NIL))
	 (CHECKSTACK (LISTP NIL))
	 [CHECKSTACK (LISTP (QUOTE (A]
	 (CHECKSTACK (STRINGP NIL))
	 (CHECKSTACK (STRINGP "A"))
	 [CHECKSTACK (CAR (QUOTE (A]
	 [CHECKSTACK (CDR (QUOTE (A]
	 [CHECKSTACK (CDR (QUOTE (A B]
	 (CHECKSTACK (NTYPX NIL))
	 (CHECKSTACK (\DTEST NIL (QUOTE LITATOM)))
	 (CHECKSTACK (\HILOC NIL))
	 (CHECKSTACK (\VAG2 0 0))
	 (CHECKSTACK (\ADDBASE NIL 1))
	 (CHECKSTACK (\LOLOC NIL))
	 (CHECKSTACK (IGREATERP (IPLUS (IDIFFERENCE (LOGOR (LOGAND (LRSH (LLSH (LRSH (LLSH 1 1)
										     1)
									       10Q)
									 10Q)
								   1)
							   2)
						    1)
				       1)
				1))
	 (CHECKSTACK (IPLUS.N (IDIFFERENCE.N 5 3)
			      4))
	 (CHECKSTACK (AND 0 NIL (RAID)))
	 [CHECKSTACK (COND
		       (NIL (RAID))
		       ((NOT 0)
			 (RAID))
		       (0 (OR NIL 0 (RAID)))
		       (T (RAID]
	 (CHECKSTACK (\GETBASE \VALSPACE 0))
	 (CHECKSTACK (\GETBASEPTR \VALSPACE 0))
	 (CHECKSTACK (\PUTBASE \VALSPACE 1 0))
	 (CHECKSTACK (\PUTBASEPTR \VALSPACE 0 NIL))
	 (CHECKSTACK (SETQ \VALSPACE \VALSPACE))
	 (CHECKSTACK (PROG (PV)
		           (CHECKSTACK PV]                   (* RUN THRU DIAGNOSTICS)
    (DIAGNOSTICS)
    (NOP 1 (DIAGNOSTICS))
    (NOP 1 2 (DIAGNOSTICS))
    (NOP 1 2 3 (DIAGNOSTICS))
    (\PUTBASE \InterruptTBL 0 177777Q)
    (\PUTBASE \InterruptTBL 1 177777Q)
    (SIMPLEPRINT "INTERRUPTS NOW TURNED ON. ")               (* And now loop)
    (DIAGNOSTICLOOP])
)

(RPAQQ DIAGNOSTICS (BASICDIAGNOSTICS PUSH.TEST JUMPX.TEST CALLS.FIRSTARGTEST CALLS.LASTARGTEST 
				     CALLS.TOOFEWARGS CALLS.TOOMANYARGS CALLS.COUNTTEST 
				     BIND.UNBIND.TEST BIND.UNBIND.TEST2 PVAR←.SETQ PVAR.SETUP 
				     FVAR.GLOBAL FVAR.FREE FVAR.TEST FVAR.TEST2 FVAR.TEST3 
				     CONST.TEST2 CAR.CDR.TEST UNBIND.TEST DUNBIND.TEST APPLYFN.TEST 
				     FCOPY.TEST FJUMPX.TEST SETI.TEST SETP.TEST SIC.TEST IPLUS.TEST 
				     IPLUS.N.TEST LOGOR.TEST LOGAND.TEST LOGXOR.TEST IGREATERP.TEST 
				     LRSH.TEST LLSH.TEST TYPE.TEST HILOC.TEST LOLOC.TEST GETBITS.TEST 
				     PUTBITS.TEST.ZERO PUTBITS.TEST.ONES VAG2.TEST ADDBASE.TEST 
				     GLOBALVAL.TEST CAR.UFN.TEST CDR.UFN.TEST LOGAND2.UFN.TEST 
				     LOGOR2.UFN.TEST BASE.UFN.TEST ARITH.UFN.TEST PUTBITS.UFN.TEST 
				     RPLAC.UFN.TEST IGREATERP.UFN.TEST LSH.UFN.TEST MISC.UFN.TEST 
				     PUSHSTKOV.TEST CALL.TEST INTERP.TEST))

(RPAQQ STACKTESTING NIL)
(DECLARE: DOEVAL@COMPILE DONTCOPY

(ADDTOVAR GLOBALVARS STACKTESTING)
)



(* note definition of DIAGNOSTICS set up by PUTD in previous expression)

(DEFINEQ

(DIAGNOSTICS
  [LAMBDA NIL
    (BASICDIAGNOSTICS)
    (PUSH.TEST)
    (JUMPX.TEST)
    (CALLS.FIRSTARGTEST)
    (CALLS.LASTARGTEST)
    (CALLS.TOOFEWARGS)
    (CALLS.TOOMANYARGS)
    (CALLS.COUNTTEST)
    (BIND.UNBIND.TEST)
    (BIND.UNBIND.TEST2)
    (PVAR←.SETQ)
    (PVAR.SETUP)
    (FVAR.GLOBAL)
    (FVAR.FREE)
    (FVAR.TEST)
    (FVAR.TEST2)
    (FVAR.TEST3)
    (CONST.TEST2)
    (CAR.CDR.TEST)
    (UNBIND.TEST)
    (DUNBIND.TEST)
    (APPLYFN.TEST)
    (FCOPY.TEST)
    (FJUMPX.TEST)
    (SETI.TEST)
    (SETP.TEST)
    (SIC.TEST)
    (IPLUS.TEST)
    (IPLUS.N.TEST)
    (LOGOR.TEST)
    (LOGAND.TEST)
    (LOGXOR.TEST)
    (IGREATERP.TEST)
    (LRSH.TEST)
    (LLSH.TEST)
    (TYPE.TEST)
    (HILOC.TEST)
    (LOLOC.TEST)
    (GETBITS.TEST)
    (PUTBITS.TEST.ZERO)
    (PUTBITS.TEST.ONES)
    (VAG2.TEST)
    (ADDBASE.TEST)
    (GLOBALVAL.TEST)
    (CAR.UFN.TEST)
    (CDR.UFN.TEST)
    (LOGAND2.UFN.TEST)
    (LOGOR2.UFN.TEST)
    (BASE.UFN.TEST)
    (ARITH.UFN.TEST)
    (PUTBITS.UFN.TEST)
    (RPLAC.UFN.TEST)
    (IGREATERP.UFN.TEST)
    (LSH.UFN.TEST)
    (MISC.UFN.TEST)
    (PUSHSTKOV.TEST)
    (CALL.TEST)
    (INTERP.TEST])
)
(DEFINEQ

(BASICDIAGNOSTICS
  [LAMBDA NIL                      (* lmm "29-OCT-81 14:35")
    (CHECKVAL (NOT NIL)
	      0
	      (EQ (\HILOC NIL)
		  0)
	      (EQ (\LOLOC NIL)
		  0)
	      T
	      (EQ (\HILOC T)
		  0)
	      (EQ (\LOLOC T)
		  76)
	      (EQ (\HILOC 0)
		  14)
	      (EQ (\LOLOC 0)
		  0)
	      (EQ 1 (\ADDBASE 0 1))
	      (EQ (\LOLOC 1)
		  1)
	      14
	      (EQ (\HILOC 14)
		  (\HILOC 0))
	      (PROG ((COUNT 0))
		    (RETURN (EQ COUNT 0)))
	      (EQ (\ADDBASE 65535 1)
		  -65536)
	      (EQ (\HILOC 65535)
		  (\HILOC 0))
	      (LISTP (QUOTE (A)))
	      (NOT (LISTP NIL))
	      (SMALLP (\HILOC NIL))
	      (NOT (SMALLP T))
	      (EQ (NTYPX (QUOTE ATOM))
		  (NTYPX NIL))
	      (EQ (\VAG2 0 0)
		  NIL])

(PUSH.TEST
  [LAMBDA (I0 I1 I2 I3 I4 I5 I6 I7 I8)
                                   (* lmm "29-NOV-81 11:37")
    (DECLARE (GLOBALVARS G0 G1 G2 G3 G4 G5 G6 G7 G8))
    (PROG (P0 P1 P2 P3 P4 P5 P6 P7 P8)
          (CHECKPUSH NIL)
          (CHECKPUSH T)
          (CHECKPUSH 0)
          (CHECKPUSH 1)
          (CHECKPUSH 2)
          (CHECKPUSH (QUOTE ATOM))
          (CHECKPUSH -1)
          (CHECKPUSH 4096)
          (CHECKPUSH (.COPY.))
          (CHECKPUSH (QUOTE (A)))
          (PROGN (CHECKPUSH I0)
		 (CHECKPUSH I1)
		 (CHECKPUSH I2)
		 (CHECKPUSH I3)
		 (CHECKPUSH I4)
		 (CHECKPUSH I5)
		 (CHECKPUSH I6)
		 (CHECKPUSH I7)
		 (CHECKPUSH I8))
          (PROGN (CHECKPUSH G0)
		 (CHECKPUSH G1)
		 (CHECKPUSH G2)
		 (CHECKPUSH G3)
		 (CHECKPUSH G4)
		 (CHECKPUSH G5)
		 (CHECKPUSH G6)
		 (CHECKPUSH G7)
		 (CHECKPUSH G8))
          (FREEVARTEST (CHECKPUSH F0)
		       (CHECKPUSH F1)
		       (CHECKPUSH F2)
		       (CHECKPUSH F3)
		       (CHECKPUSH F4)
		       (CHECKPUSH F5)
		       (CHECKPUSH F6)
		       (CHECKPUSH F7)
		       (CHECKPUSH F8))
          (PROGN (CHECKPUSH P0)
		 (CHECKPUSH P1)
		 (CHECKPUSH P2)
		 (CHECKPUSH P3)
		 (CHECKPUSH P4)
		 (CHECKPUSH P5)
		 (CHECKPUSH P6)
		 (CHECKPUSH P7)
		 (CHECKPUSH P8))
          (CHECKPUSH (FN.FIRSTARG])

(JUMPX.TEST
  [LAMBDA NIL                      (* lmm "19-JUL-80 22:15")
    (CHECKVAL (PROG NIL
		    (GO FAR)
		NEAR(RETURN (EQ NIL (EQ NIL T)))
		    (FN.LASTARG 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
		    (FN.LASTARG 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
		    (FN.LASTARG 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
		    (FN.LASTARG 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
		    (FN.LASTARG 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
		FAR (GO NEAR])

(CALLS.FIRSTARGTEST
  (LAMBDA NIL                                               (* lmm " 3-JAN-80 01:10")
    (CHECKVAL (EQ (FN.FIRSTARG 1 2 3)
		  1)
	      (EQ (FN.FIRSTARG.PVARS 1 2 3)
		  1)
	      (EQ (FN.FIRSTARG.FVARS 1 2 3)
		  1)
	      (EQ (FN.FIRSTARG.PVARS.FVARS 1 2 3)
		  1))))

(CALLS.LASTARGTEST
  [LAMBDA NIL                      (* lmm " 7-OCT-80 09:16")
    (CHECKVAL (EQ (FN.LASTARG 1 2 3 4 5 6 7 10Q 11Q 12Q 13Q 14Q 15Q 16Q 17Q)
		  17Q))
    (CHECKVAL (EQ (FN.LASTARG.PVARS 1 2 3 4 5 6 7 10Q 11Q 12Q 13Q 14Q 15Q 16Q 17Q)
		  17Q))
    (CHECKVAL (EQ (FN.LASTARG.FVARS 1 2 3 4 5 6 7 10Q 11Q 12Q 13Q 14Q 15Q 16Q 17Q)
		  17Q))
    (CHECKVAL (EQ (FN.LASTARG.FVARS.PVARS 1 2 3 4 5 6 7 10Q 11Q 12Q 13Q 14Q 15Q 16Q 17Q)
		  17Q])

(CALLS.TOOFEWARGS
  (LAMBDA NIL                                               (* lmm " 3-JAN-80 01:12")
    (CHECKVAL (EQ (FN.FIRSTARG 1 2)
		  1)
	      (EQ (FN.FIRSTARG.PVARS.FVARS 1 2)
		  1)
	      (EQ (FN.FIRSTARG)
		  NIL)
	      (EQ (FN.FIRSTARG.PVARS.FVARS)
		  NIL)
	      (EQ (FN.FIRSTARG 1)
		  1)
	      (EQ (FN.LASTARG 1 2)
		  NIL)
	      (EQ (FN.LASTARG 1 2 3 4 5 6 7 10Q 11Q 12Q 13Q 14Q 15Q 16Q)
		  NIL))))

(CALLS.TOOMANYARGS
  (LAMBDA NIL                                               (* lmm " 3-JAN-80 01:12")
    (CHECKVAL (EQ (FN.FIRSTARG 1 2 3 4)
		  1)
	      (EQ (FN.FIRSTARG 1 2 3 4 5 6 7 10Q 11Q 12Q)
		  1)
	      (EQ (FN.LASTARG 1 2 3 4 5 6 7 10Q 11Q 12Q 13Q 14Q 15Q 16Q 17Q 20Q)
		  17Q)
	      (EQ (FN.LASTARG 1 2 3 4 5 6 7 10Q 11Q 12Q 13Q 14Q 15Q 16Q 17Q 20Q 21Q 22Q 23Q 24Q)
		  17Q))))

(CALLS.COUNTTEST
  [LAMBDA NIL                      (* lmm " 2-OCT-81 22:22")
    (COND
      (STACKTESTING (CHECKVAL (EQ (FN.ARGCOUNT)
				  0)
			      (EQ (FN.ARGCOUNT 1)
				  1)
			      (EQ (FN.ARGCOUNT 1 1)
				  2)
			      (EQ (FN.ARGCOUNT 1 1 1)
				  3)
			      (EQ (FN.ARGCOUNT 1 1 1 1)
				  4)
			      (EQ (FN.ARGCOUNT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
				  15))
		    (CHECKPUSH (FN.ARGCOUNT))
		    (CHECKPUSH (FN.ARGCOUNT 1 2 3 4 5 6])

(BIND.UNBIND.TEST
  (LAMBDA NIL                                               (* lmm " 3-JAN-80 02:03")
    (CHECKVAL (EQ (PROG NIL)
		  NIL)
	      (EQ (PROG (X)
		        (RETURN X))
		  NIL)
	      (EQ (PROG (A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17)
		        (RETURN (OR A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17)))
		  NIL)
	      (EQ (PROG ((A 1)
			 (B 2)
			 (C 4))
		        (NOP 8 16 32 (RETURN (IPLUS A B C))))
		  7)
	      (EQ (PROG ((A 0)
			 (B 1)
			 (C 2)
			 D E F)
		        (NOP 5 6 7 8 9 (RETURN A)))
		  0))
    (CHECKPUSH (PROG NIL))
    (CHECKPUSH (PROG (A B C D E F G)
		     (RETURN)))))

(BIND.UNBIND.TEST2
  (LAMBDA NIL                                               (* lmm " 3-JAN-80 02:13")
    (CHECKSTACK (PROG NIL
		      (RETURN NIL)))
    (CHECKSTACK (PROG (X)
		      (RETURN X)))
    (CHECKSTACK (PROG (A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17)
		      (COND
			((OR A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17)
			  (RETURN T)))))
    (CHECKSTACK (PROG ((A 1)
		       (B 2)
		       (C 4))
		      (NOP 8 16 32 (RETURN (IPLUS A B C)))))
    (CHECKSTACK (PROG ((A 0)
		       (B 1)
		       (C 2)
		       D E F)
		      (NOP 5 6 7 8 9 (RETURN A))))))

(PVAR←.SETQ
  [LAMBDA NIL                      (* lmm " 6-OCT-80 22:46")
    (PROG (SV0 SVP0 SV1 SVP1 SV2 SVP2 SV3 SVP3 SV4 SVP4 SV5 SVP5 SV6 SVP6 SV7 SVP7 SV8 SVP8)
          (SETQ SVP0 (SETQ SV0 0))
          (SETQ SVP1 (SETQ SV1 1))
          (SETQ SVP2 (SETQ SV2 2))
          (SETQ SVP3 (SETQ SV3 3))
          (SETQ SVP4 (SETQ SV4 4))
          (SETQ SVP5 (SETQ SV5 5))
          (SETQ SVP6 (SETQ SV6 6))
          (SETQ SVP7 (SETQ SV7 7))
          (SETQ SVP8 (SETQ SV8 8))
          (CHECKVAL (EQ SV0 0)
		    (EQ SVP0 0)
		    (EQ SV1 1)
		    (EQ SVP1 1)
		    (EQ SV2 2)
		    (EQ SVP2 2)
		    (EQ SV3 3)
		    (EQ SVP3 3)
		    (EQ SV4 4)
		    (EQ SVP4 4)
		    (EQ SV5 5)
		    (EQ SVP5 5)
		    (EQ SV6 6)
		    (EQ SVP6 6)
		    (EQ SV7 7)
		    (EQ SVP7 7)
		    (EQ SV8 8)
		    (EQ SVP8 8])

(PVAR.SETUP
  [LAMBDA NIL                                                (* lmm "31-JUL-81 15:54")
    (PROG ((P1 1)
	   (P2 2)
	   P3 P4 P5 P6 (P7 7)
	   (P8 8)
	   P9 P10 P11 P12 P13 P14 (P15 15)
	   (P16 16)
	   (P17 17)
	   P18)
          (CHECKVAL (EQ P1 1)
		    (EQ P2 2)
		    (EQ P3 NIL)
		    (EQ P7 7)
		    (EQ P15 15)
		    (EQ P16 16)
		    (EQ P17 17)
		    (EQ P18 NIL])

(FVAR.GLOBAL
  [LAMBDA NIL                                                (* lmm "31-JUL-81 15:54")
    (DECLARE (GLOBALVARS G0 G1 G2 G3 G4 G5 G6 G7 G8))
    (SETQ G0 100)
    (SETQ G1 101)
    (SETQ G2 102)
    (SETQ G3 103)
    (SETQ G4 104)
    (SETQ G5 105)
    (SETQ G6 106)
    (SETQ G7 107)
    (SETQ G8 108)
    (CHECKVAL (EQ G0 100)
	      (EQ G1 101)
	      (EQ G2 102)
	      (EQ G3 103)
	      (EQ G4 104)
	      (EQ G5 105)
	      (EQ G6 106)
	      (EQ G7 107)
	      (EQ G8 108))
    (SETQ G0 0)
    (SETQ G1 1)
    (SETQ G2 2)
    (SETQ G3 3)
    (SETQ G4 4)
    (SETQ G5 5)
    (SETQ G6 6)
    (SETQ G7 7)
    (SETQ G8 8])

(FVAR.FREE
  [LAMBDA NIL                                                (* lmm "31-JUL-81 15:55")
    (FREEVARTEST (SETQ F0 100)
		 (SETQ F1 101)
		 (SETQ F2 102)
		 (SETQ F3 103)
		 (SETQ F4 104)
		 (SETQ F5 105)
		 (SETQ F6 106)
		 (SETQ F7 107)
		 (SETQ F8 108)
		 (CHECKVAL (EQ F0 100)
			   (EQ F1 101)
			   (EQ F2 102)
			   (EQ F3 103)
			   (EQ F4 104)
			   (EQ F5 105)
			   (EQ F6 106)
			   (EQ F7 107)
			   (EQ F8 108))
		 (SETQ F0 0)
		 (SETQ F1 1)
		 (SETQ F2 2)
		 (SETQ F3 3)
		 (SETQ F4 4)
		 (SETQ F5 5)
		 (SETQ F6 6)
		 (SETQ F7 7)
		 (SETQ F8 8])

(FVAR.TEST
  [LAMBDA (FLG)                                              (* lmm "31-JUL-81 16:25")
    [PROG ((FREE.VAR.FLAG (QUOTE FREE.VALUE))
	   (FREE.VAR (QUOTE GARBAGE)))
          (DECLARE (SPECVARS . T))
          (FREEVARTEST (FN.FR1)
		       (CHECKVAL (NULL FREE.VAR.FLAG))
		       (CHECKVAL (EQ FREE.VAR (QUOTE FREE.VALUE]
    (PROG ((FREE.VAR.FLAG (QUOTE FREE.VALUE)))
          (DECLARE (SPECVARS . T))
          (FREEVARTEST (FN.FR1)
		       (CHECKVAL (NULL FREE.VAR.FLAG))
		       (CHECKVAL (EQ FREE.VAR (QUOTE FREE.VALUE])

(FVAR.TEST2
  [LAMBDA NIL                                                (* lmm "31-JUL-81 15:58")
    (PROG ((FVAR1 1)
	   (FVAR2 2)
	   (FVAR3 3))
          (FVAR.TEST T])

(FVAR.TEST3
  (LAMBDA NIL                                               (* lmm " 3-JAN-80 01:46")
    (FVAR.TESTN 1 2 3)))

(CONST.TEST2
  [LAMBDA NIL                      (* lmm "29-OCT-81 14:36")
    (COMPUTEFORM (CONS (QUOTE CHECKVAL)
		       (for I from 1 to 25 collect (LIST (QUOTE EQ)
							 (LIST (QUOTE \ADDBASE)
							       (KWOTE (CHARACTER (IPLUS I
											(CHCON1
											  "A")
											-1)))
							       1)
							 (KWOTE (CHARACTER (IPLUS I (CHCON1 "A"])

(CAR.CDR.TEST
  [LAMBDA NIL                                                (* bvm: "11-NOV-81 17:54")
    (CHECKVAL (EQ (CAR (QUOTE NIL))
		  NIL)
	      (EQ (CDR (QUOTE NIL))
		  NIL)
	      (EQ (CAR (QUOTE (A)))
		  (QUOTE A))
	      (EQ (CAR (QUOTE (A B C)))
		  (QUOTE A))
	      (EQ [CAR (CAR (QUOTE ((Z]
		  (QUOTE Z))
	      (EQ (CDR (QUOTE (CDR.NIL)))
		  NIL)
	      (EQ (CDR (QUOTE (CDR.LIST . K)))
		  (QUOTE K))
	      (EQ [CAR (COMPUTEFORM (PROG (L)
				          (RPTQ 201Q (SETQ L (CONS RPTN L)))
				          (SETQ L (LIST (QUOTE QUOTE)
							L))
				          (RPTQ 200Q (SETQ L (LIST (QUOTE CDR)
								   L)))
				          (RETURN L]
		  201Q])

(UNBIND.TEST
  (LAMBDA NIL                                               (* lmm " 3-JAN-80 01:12")
    (PROG (X)
          (SETQ X (PROG NIL
		        (FN.LASTARG 1 2 3 4 (RETURN 7))))
          (CHECKVAL (EQ X 7)))))

(DUNBIND.TEST
  (LAMBDA NIL                                               (* lmm " 3-JAN-80 01:12")
    (CHECKVAL (EQ (PROG1 45Q (PROG (A B C D (E (QUOTE X))
				      (F (QUOTE G)))
			           (FN.LASTARG 1 2 3 4 (RETURN 7))))
		  45Q))))

(APPLYFN.TEST
  [LAMBDA NIL                      (* lmm " 2-OCT-81 22:32")
    (CHECKVAL (EQ (SPREADAPPLY* (QUOTE FN.FIRSTARG)
				(QUOTE A)
				(QUOTE B)
				(QUOTE C))
		  (QUOTE A))
	      (EQ (SPREADAPPLY* (QUOTE FN.FIRSTARG)
				(QUOTE A)
				2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 
				28 29 30)
		  (QUOTE A))
	      (EQ (SPREADAPPLY* (QUOTE FN.LASTARG)
				(QUOTE A)
				2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 
				28 29 30)
		  15))
    (COND
      (STACKTESTING (CHECKVAL (EQ (SPREADAPPLY* (QUOTE FN.ARGCOUNT))
				  0)
			      (EQ (SPREADAPPLY* (QUOTE FN.ARGCOUNT)
						1 2 3)
				  3)
			      (EQ (SPREADAPPLY* (QUOTE FN.ARGCOUNT)
						1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 
						22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 
						40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 
						58 59 60 61 62 63 64 65)
				  65])

(FCOPY.TEST
  (LAMBDA NIL                                               (* lmm "25-DEC-79 23:13")
    (PROG (X)
          (CHECKSTACK (SETQ X (AND T T)))
          (RETURN (CHECKVAL X)))))

(FJUMPX.TEST
  (LAMBDA NIL                                               (* lmm " 3-JAN-80 01:12")
    (CHECKVAL (PROG NIL
		    (COND
		      ((NOT (EQ NIL T))
			(GO FAR)))
		NEAR(RETURN (EQ NIL (EQ NIL T)))
		    (FN.LASTARG 1 2 3 4 5 6 7 10Q 11Q 12Q 13Q 14Q 15Q 16Q 17Q)
		    (FN.LASTARG 1 2 3 4 5 6 7 10Q 11Q 12Q 13Q 14Q 15Q 16Q 17Q)
		    (FN.LASTARG 1 2 3 4 5 6 7 10Q 11Q 12Q 13Q 14Q 15Q 16Q 17Q)
		    (FN.LASTARG 1 2 3 4 5 6 7 10Q 11Q 12Q 13Q 14Q 15Q 16Q 17Q)
		    (FN.LASTARG 1 2 3 4 5 6 7 10Q 11Q 12Q 13Q 14Q 15Q 16Q 17Q)
		FAR (COND
		      ((EQ (PROGN NIL NIL)
			   (PROGN NIL NIL))
			(GO NEAR)))))))

(SETI.TEST
  (LAMBDA (A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16)
                                                            (* lmm "26-DEC-79 11:45")
    (SETQ A1 1)
    (SETQ A2 2)
    (SETQ A3 3)
    (SETQ A4 4)
    (SETQ A5 5)
    (SETQ A6 6)
    (SETQ A7 7)
    (SETQ A8 8)
    (SETQ A9 9)
    (SETQ A10 10)
    (SETQ A11 11)
    (SETQ A12 12)
    (SETQ A13 13)
    (SETQ A14 14)
    (SETQ A15 15)
    (SETQ A16 16)
    (CHECKVAL (EQ A1 1)
	      (EQ A2 2)
	      (EQ A3 3)
	      (EQ A4 4)
	      (EQ A5 5)
	      (EQ A6 6)
	      (EQ A7 7)
	      (EQ A8 8)
	      (EQ A9 9)
	      (EQ A10 10)
	      (EQ A11 11)
	      (EQ A12 12)
	      (EQ A13 13)
	      (EQ A14 14)
	      (EQ A15 15)
	      (EQ A16 16))))

(SETP.TEST
  (LAMBDA NIL                                               (* lmm "26-DEC-79 11:45")
    (PROG (F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 F16 F17 F18 F19 F20 F21 F22 F23 F24 F25 
	      F26 F27 F28 F29 F30)
          (SETQ F1 1)
          (SETQ F2 2)
          (SETQ F3 3)
          (SETQ F4 4)
          (SETQ F5 5)
          (SETQ F6 6)
          (SETQ F7 7)
          (SETQ F8 8)
          (SETQ F9 9)
          (SETQ F10 10)
          (SETQ F11 11)
          (SETQ F12 12)
          (SETQ F13 13)
          (SETQ F14 14)
          (SETQ F15 15)
          (SETQ F16 16)
          (SETQ F17 17)
          (SETQ F18 18)
          (SETQ F19 19)
          (SETQ F20 20)
          (SETQ F21 21)
          (SETQ F22 22)
          (SETQ F23 23)
          (SETQ F24 24)
          (SETQ F25 25)
          (SETQ F26 26)
          (SETQ F27 27)
          (SETQ F28 28)
          (SETQ F29 29)
          (SETQ F30 30)
          (CHECKVAL (EQ F1 1)
		    (EQ F5 5)
		    (EQ F6 6)
		    (EQ F7 7)
		    (EQ F8 8)
		    (EQ F15 15)
		    (EQ F16 16)
		    (EQ F30 30)))))

(SIC.TEST
  (LAMBDA NIL                                               (* lmm "25-DEC-79 22:33")
    (CHECKVAL (EQ (IPLUS 1 255)
		  256))))

(IPLUS.TEST
  (LAMBDA NIL                      (* lmm "31-MAR-80 14:51")
    (CHECKVAL (EQ (IDIFFERENCE 177777Q 177777Q)
		  0)
	      (EQ (IDIFFERENCE 1 1)
		  0)
	      (EQ (IDIFFERENCE 177776Q 1)
		  177775Q)
	      (EQ (IDIFFERENCE 177777Q 1)
		  177776Q)
	      (EQ (IPLUS 0 0)
		  0)
	      (EQ (IPLUS 0 1)
		  1)
	      (EQ (IPLUS 0 177776Q)
		  177776Q)
	      (EQ (IPLUS 0 177777Q)
		  177777Q)
	      (EQ (IDIFFERENCE 1 1)
		  0)
	      (EQ (IPLUS 1 0)
		  1)
	      (EQ (IPLUS 1 1)
		  2)
	      (EQ (IPLUS 1 177776Q)
		  177777Q)
	      (EQ (IDIFFERENCE 177776Q 1)
		  177775Q)
	      (EQ (IPLUS 177776Q 0)
		  177776Q)
	      (EQ (IPLUS 177776Q 1)
		  177777Q)
	      (EQ (IDIFFERENCE 177777Q 177777Q)
		  0)
	      (EQ (IDIFFERENCE 177777Q 1)
		  177776Q)
	      (EQ (IPLUS 177777Q 0)
		  177777Q)
	      (EQ (IPLUS -177776Q 177776Q)
		  0)
	      (EQ (IPLUS 177776Q -177776Q)
		  0)
	      (EQ (IPLUS -1 1)
		  0)
	      (EQ (IPLUS 1 -1)
		  0))))

(IPLUS.N.TEST
  [LAMBDA NIL                                                (* lmm "16-NOV-81 18:46")
    (CHECKVAL (EQ (IDIFN 1 1)
		  0)
	      (EQ (IDIFN 65534 1)
		  65533)
	      (EQ (IDIFN 65535 1)
		  65534)
	      (EQ (IPLUSN 0 0)
		  0)
	      (EQ (IPLUSN 0 1)
		  1)
	      (EQ (IDIFN 1 1)
		  0)
	      (EQ (IPLUSN 1 0)
		  1)
	      (EQ (IPLUSN 1 1)
		  2)
	      (EQ (IDIFN 65534 1)
		  65533)
	      (EQ (IPLUSN 65534 0)
		  65534)
	      (EQ (IPLUSN 65534 1)
		  65535)
	      (EQ (IDIFN 65535 1)
		  65534)
	      (EQ (IPLUSN 65535 0)
		  65535)
	      (EQ (IPLUSN -1 1)
		  0)
	      (EQ (IDIFN 0 1)
		  -1)
	      (EQ (IDIFN -1 2)
		  -3)
	      (EQ (IPLUSN -1 0)
		  -1])

(LOGOR.TEST
  [LAMBDA NIL                                                (* lmm "21-MAY-82 12:27")
    (CHECKVAL (EQ (LOGOR 0 0)
		  0)
	      (EQ (LOGOR 0 1)
		  1)
	      (EQ (LOGOR 0 65534)
		  65534)
	      (EQ (LOGOR 0 65535)
		  65535)
	      (EQ (LOGOR 1 0)
		  1)
	      (EQ (LOGOR 1 1)
		  1)
	      (EQ (LOGOR 1 65534)
		  65535)
	      (EQ (LOGOR 1 65535)
		  65535)
	      (EQ (LOGOR 65534 0)
		  65534)
	      (EQ (LOGOR 65534 1)
		  65535)
	      (EQ (LOGOR 65534 65534)
		  65534)
	      (EQ (LOGOR 65534 65535)
		  65535)
	      (EQ (LOGOR 65535 0)
		  65535)
	      (EQ (LOGOR 65535 1)
		  65535)
	      (EQ (LOGOR 65535 65534)
		  65535)
	      (EQ (LOGOR 65535 65535)
		  65535])

(LOGAND.TEST
  [LAMBDA NIL                                                (* lmm "21-MAY-82 14:25")
    (CHECKVAL (EQ (LOGAND 0 0)
		  0)
	      (EQ (LOGAND 0 1)
		  0)
	      (EQ (LOGAND 0 65534)
		  0)
	      (EQ (LOGAND 0 65535)
		  0)
	      (EQ (LOGAND 1 0)
		  0)
	      (EQ (LOGAND 1 1)
		  1)
	      (EQ (LOGAND 1 65534)
		  0)
	      (EQ (LOGAND 1 65535)
		  1)
	      (EQ (LOGAND 65534 0)
		  0)
	      (EQ (LOGAND 65534 1)
		  0)
	      (EQ (LOGAND 65534 65534)
		  65534)
	      (EQ (LOGAND 65534 65535)
		  65534)
	      (EQ (LOGAND 65535 0)
		  0)
	      (EQ (LOGAND 65535 1)
		  1)
	      (EQ (LOGAND 65535 65534)
		  65534)
	      (EQ (LOGAND 65535 65535)
		  65535])

(LOGXOR.TEST
  [LAMBDA NIL                                                (* lmm "21-MAY-82 14:25")
    (CHECKVAL (EQ (LOGXOR 0 0)
		  0)
	      (EQ (LOGXOR 0 1)
		  1)
	      (EQ (LOGXOR 0 65534)
		  65534)
	      (EQ (LOGXOR 0 65535)
		  65535)
	      (EQ (LOGXOR 1 0)
		  1)
	      (EQ (LOGXOR 1 1)
		  0)
	      (EQ (LOGXOR 1 65534)
		  65535)
	      (EQ (LOGXOR 1 65535)
		  65534)
	      (EQ (LOGXOR 65534 0)
		  65534)
	      (EQ (LOGXOR 65534 1)
		  65535)
	      (EQ (LOGXOR 65534 65534)
		  0)
	      (EQ (LOGXOR 65534 65535)
		  1)
	      (EQ (LOGXOR 65535 0)
		  65535)
	      (EQ (LOGXOR 65535 1)
		  65534)
	      (EQ (LOGXOR 65535 65534)
		  1)
	      (EQ (LOGXOR 65535 65535)
		  0])

(IGREATERP.TEST
  (LAMBDA NIL                                               (* lmm "26-DEC-79 11:45")
    (CHECKVAL (NOT (IGREATERP 0 0))
	      (NOT (IGREATERP 0 1))
	      (NOT (IGREATERP 0 65534))
	      (NOT (IGREATERP 0 65535))
	      (IGREATERP 1 0)
	      (NOT (IGREATERP 1 1))
	      (NOT (IGREATERP 1 65534))
	      (NOT (IGREATERP 1 65535))
	      (IGREATERP 65534 0)
	      (IGREATERP 65534 1)
	      (NOT (IGREATERP 65534 65534))
	      (NOT (IGREATERP 65534 65535))
	      (IGREATERP 65535 0)
	      (IGREATERP 65535 1)
	      (IGREATERP 65535 65534)
	      (NOT (IGREATERP 65535 65535)))))

(LRSH.TEST
  [LAMBDA NIL                                                (* lmm "26-JAN-83 09:09")
    (CHECKVAL (EQ (LRSH 0 1)
		  0)
	      (EQ (LRSH 0 10Q)
		  0)
	      (EQ (LRSH 1 1)
		  0)
	      (EQ (LRSH 1 10Q)
		  0)
	      (EQ (LRSH 177776Q 1)
		  77777Q)
	      (EQ (LRSH 177776Q 10Q)
		  377Q)
	      (EQ (LRSH 177777Q 1)
		  77777Q)
	      (EQ (LRSH 177777Q 10Q)
		  377Q])

(LLSH.TEST
  [LAMBDA NIL                                                (* lmm "26-JAN-83 09:09")
    (CHECKVAL (EQ (LLSH 0 1)
		  0)
	      (EQ (LLSH 0 10Q)
		  0)
	      (EQ (LLSH 1 1)
		  2)
	      (EQ (LLSH 1 10Q)
		  400Q)
	      (EQ (LLSH 377Q 1)
		  776Q)
	      (EQ (LLSH 377Q 10Q)
		  177400Q])

(TYPE.TEST
  (LAMBDA NIL                                               (* lmm "26-DEC-79 15:53")
    (CHECKVAL (LISTP (QUOTE (ABC)))
	      (NLISTP 3)
	      (NLISTP "ABC")
	      (NOT (ARRAYP 3))
	      (STRINGP "ABC")
	      (NOT (STRINGP 3)))))

(HILOC.TEST
  [LAMBDA NIL                      (* lmm "29-OCT-81 14:53")
    (CHECKVAL (EQ (\HILOC NIL)
		  0)
	      (EQ (\HILOC T)
		  0)
	      (EQ (\HILOC 0)
		  \SmallPosHi)
	      (EQ (\HILOC (QUOTE A))
		  0)
	      (EQ (\HILOC (QUOTE MUMBLE))
		  0)
	      (EQ (\HILOC -243)
		  \SmallNegHi])

(LOLOC.TEST
  [LAMBDA NIL                      (* lmm "29-OCT-81 14:57")
    (CHECKVAL (EQ (\LOLOC NIL)
		  0)
	      (EQ (\LOLOC (QUOTE NOBIND))
		  1)
	      (EQ (\LOLOC T)
		  76)
	      (EQ (\LOLOC (QUOTE U))
		  77)
	      (EQ (\LOLOC 0)
		  0)
	      (EQ (\LOLOC 1)
		  1)
	      (EQ (\LOLOC 3)
		  3])

(GETBITS.TEST
  [LAMBDA NIL                                                (* bvm: "11-NOV-81 17:46")
    (BITTEST 12345676543Q)
    (BITTEST -20000000000Q)
    (BITTEST 13777777777Q])

(PUTBITS.TEST.ZERO
  [LAMBDA NIL                                               (* bvm: "12-NOV-81 14:03")
    (PROG ((N 12345676543Q))
          (CHECKVAL (EQ ((OPCODES PUTBITS.N.FD 0 0)
			 N 1)
			N)))
    (PUTBITTEST 13777777777Q 0)
    (PUTBITTEST 20000000000Q 0)
    (PUTBITTEST 12345676543Q 0])

(PUTBITS.TEST.ONES
  [LAMBDA NIL                                               (* bvm: "12-NOV-81 14:05")
    (PUTBITTEST 13777777777Q 1)
    (PUTBITTEST 20000000000Q 1)
    (PUTBITTEST 12345676543Q 1])

(VAG2.TEST
  (LAMBDA NIL                                               (* lmm "26-DEC-79 00:17")
    (CHECKSTACK (PROGN (CALL.VAG2.LOC NIL)
		       (CALL.VAG2.LOC T)
		       (CALL.VAG2.LOC (QUOTE A))
		       (CALL.VAG2.LOC (QUOTE FOOMUMBLEX))
		       (CALL.VAG2.LOC "HI")
		       (CALL.VAG2.LOC (QUOTE (CONS)))))))

(ADDBASE.TEST
  [LAMBDA NIL                      (* lmm "29-OCT-81 14:36")
    (CHECKVAL (EQ (\ADDBASE NIL 0)
		  NIL)
	      (EQ (\ADDBASE NIL 1)
		  (QUOTE NOBIND))
	      (EQ (\ADDBASE NIL 76)
		  T)
	      (EQ (\ADDBASE NIL 77)
		  (QUOTE U))
	      (EQ (\ADDBASE 0 1)
		  1)
	      (EQ (\ADDBASE 65535 65535)
		  -2])

(GLOBALVAL.TEST
  [LAMBDA NIL                      (* lmm "13-MAY-80 08:27")
    (\SETGLOBAL.UFN 123 (QUOTE FOO))
    (CHECKVAL (EQ (GETGLOBAL (QUOTE FOO))
		  123])

(CAR.UFN.TEST
  (LAMBDA NIL                                               (* lmm " 2-JAN-80 20:36")
    (CHECKVAL (EQ (CAR NIL)
		  NIL)
	      (EQ (CAR (QUOTE CAR.UFN.TEST))
		  (QUOTE CAR.UFN.VALUE)))))

(CDR.UFN.TEST
  (LAMBDA NIL                                               (* lmm " 2-JAN-80 20:37")
    (CHECKVAL (EQ (CDR NIL)
		  NIL)
	      (EQ (CDR (QUOTE CDR.UFN.TEST))
		  (QUOTE CDR.UFN.VALUE)))))

(LOGAND2.UFN.TEST
  [LAMBDA NIL                                                (* lmm "21-MAY-82 14:25")
    (CHECKVAL (EQ (LOGAND NIL 0)
		  (QUOTE LOGAND2.NIL))
	      (EQ (LOGAND T 0)
		  (QUOTE LOGAND2.T))
	      (EQ (LOGAND 0 NIL)
		  (QUOTE LOGAND2.N.NIL))
	      (EQ (LOGAND 0 T)
		  (QUOTE LOGAND2.N.T])

(LOGOR2.UFN.TEST
  [LAMBDA NIL                                                (* lmm "21-MAY-82 14:25")
    (CHECKVAL (EQ (LOGOR (QUOTE LOGOR2.TEST)
			 0)
		  (QUOTE LOGOR2.TEST.VALUE))
	      (EQ (LOGOR 0 (QUOTE LOGOR2.TEST.2))
		  (QUOTE LOGOR2.TEST.2.VALUE])

(BASE.UFN.TEST
  [LAMBDA NIL                      (* lmm "29-OCT-81 14:33")
    (CHECKVAL (EQ (\GETBASEBYTE (QUOTE TEST.GETBASEBYTE.1)
				(QUOTE TEST.GETBASEBYTE.2))
		  (QUOTE TEST.GETBASEBYTE.VALUE))
	      (EQ (\ADDBASE (QUOTE TEST.ADDBASE.1)
			    (QUOTE TEST.ADDBASE.2))
		  (QUOTE TEST.ADDBASE.VALUE))
	      (EQ (\ADDBASE (QUOTE NOBIND)
			    -1)
		  NIL)
	      (EQ (\ADDBASE (\ADDBASE T 65528)
			    -65528)
		  T])

(ARITH.UFN.TEST
  [LAMBDA NIL                                          (* bvm: " 6-NOV-81 14:19")
                                                       (* Non-numeric arg cases)
    (CHECKVAL (EQ (IDIFFERENCE (QUOTE IDIFFERENCE.TEST)
			       0)
		  (QUOTE IDIFFERENCE.TEST.VALUE))
	      (EQ (IDIFFERENCE 0 (QUOTE IDIFFERENCE.TEST2))
		  (QUOTE IDIFFERENCE.TEST2.VALUE))
	      (EQ (IPLUS (QUOTE IPLUS2.TEST)
			 0)
		  (QUOTE IPLUS2.TEST.VALUE))
	      (EQ (IPLUS 0 (QUOTE IPLUS2.TEST2))
		  (QUOTE IPLUS2.TEST2.VALUE)))         (* Smallp cases)
    (CHECKVAL (EQ (IDIFFERENCE 3 -1)
		  4)
	      (EQ (IPLUS 6726Q 171051Q)
		  177777Q)
	      (EQ (IPLUS 3 -1)
		  2)
	      (EQ (IPLUS -6737Q -171041Q)
		  -200000Q)
	      (EQ (IDIFFERENCE 4603Q -173174Q)
		  177777Q)
	      (EQ (IDIFFERENCE -24327Q 153447Q)
		  -177776Q])

(PUTBITS.UFN.TEST
  [LAMBDA NIL                                                (* bvm: "11-NOV-81 18:08")
    (CHECKVAL (EQ ((OPCODES PUTBITS.N.FD 0 0)
		   -4444444445Q
		   (QUOTE PUTBITS.TEST))
		  (QUOTE PUTBITS.TEST.VALUE])

(RPLAC.UFN.TEST
  [LAMBDA NIL                                                (* lmm "24-MAY-82 16:31")
    (CHECKVAL (EQ (RPLACA (QUOTE TEST.RPLACA.1)
			  (QUOTE TEST.RPLACA.2))
		  (QUOTE RPLACA.VALUE))
	      (EQ ((OPCODES RPLACD)
		   (QUOTE TEST.RPLACD.1)
		   (QUOTE TEST.RPLACD.2))
		  (QUOTE RPLACD.VALUE])

(IGREATERP.UFN.TEST
  (LAMBDA NIL                                               (* lmm "27-DEC-79 00:30")
    (CHECKVAL (EQ (IGREATERP (QUOTE IGREATERP.TEST)
			     0)
		  (QUOTE IGREATERP.TEST.VALUE))
	      (EQ (IGREATERP 0 (QUOTE IGREATERP.TEST2))
		  (QUOTE IGREATERP.TEST2.VALUE)))))

(LSH.UFN.TEST
  [LAMBDA NIL                                                (* lmm "26-JAN-83 09:45")
    (CHECKVAL (DEQ (LLSH 100000Q 1)
		   (QUOTE 200000Q))
	      (EQ ((OPCODES LLSH1)
		   (QUOTE LLSH1.TEST))
		  (QUOTE LLSH1.TEST.VALUE))
	      (EQ ((OPCODES LLSH8)
		   (QUOTE LLSH8.TEST))
		  (QUOTE LLSH8.TEST.VALUE))
	      (DEQ (LLSH 400Q 10Q)
		   200000Q)
	      (EQ ((OPCODES LRSH1)
		   (QUOTE LRSH1.TEST))
		  (QUOTE LRSH1.TEST.VALUE))
	      (EQ ((OPCODES LRSH8)
		   (QUOTE LRSH8.TEST))
		  (QUOTE LRSH8.TEST.VALUE])

(MISC.UFN.TEST
  [LAMBDA NIL                      (* lmm "29-OCT-81 14:58")
    (CHECKVAL ([LAMBDA (X)
		  (AND (LISTP X)
		       (EQ (CAR X)
			   (QUOTE CONS.1))
		       (EQ (CDR X)
			   (QUOTE CONS.2]
		(CONS (QUOTE CONS.1)
		      (QUOTE CONS.2)))
	      (EQ (GETP (QUOTE GETP.1)
			(QUOTE GETP.2))
		  (QUOTE GETP.VALUE))
	      (EQ (FMEMB (QUOTE FMEMB.1)
			 (QUOTE FMEMB.2))
		  (QUOTE FMEMB.VALUE))
	      (EQ (\VAG2 (QUOTE VAG2.1)
			 (QUOTE VAG2.2))
		  (QUOTE VAG2.VALUE])

(PUSHSTKOV.TEST
  [LAMBDA (I0 I1 I2 I3 I4 I5 I6 I7 I8)
                                   (* lmm "29-NOV-81 11:37")
    (COND
      (STACKTESTING (PROG (P0 P1 P2 P3 P4 P5 P6 P7 P8)
		          (CHECKPUSH! NIL)
		          (CHECKPUSH! T)
		          (CHECKPUSH! 0)
		          (CHECKPUSH! 1)
		          (CHECKPUSH! 2)
		          (CHECKPUSH!(QUOTE ATOM))
		          (CHECKPUSH! 32768)
		          (CHECKPUSH!(.COPY.))
		          (CHECKPUSH!(QUOTE (A)))
		          (CHECKPUSH! -3)
		          (CHECKPUSH! I0)
		          (CHECKPUSH! I1)
		          (CHECKPUSH! I2)
		          (CHECKPUSH! I3)
		          (CHECKPUSH! I4)
		          (CHECKPUSH! I5)
		          (CHECKPUSH! I6)
		          (CHECKPUSH! I7)
		          (CHECKPUSH! I8)
		          (CHECKPUSH! P0)
		          (CHECKPUSH! P1)
		          (CHECKPUSH! P2)
		          (CHECKPUSH! P3)
		          (CHECKPUSH! P4)
		          (CHECKPUSH! P5)
		          (CHECKPUSH! P6)
		          (CHECKPUSH! P7)
		          (CHECKPUSH! P8)
		          (CHECKPUSH!(SETQ G0 0))
		          (CHECKPUSH! G0)
		          (CHECKPUSH!(FN.FIRSTARG)))
		    (FREEVARTEST (CHECKPUSH! F1)
				 (CHECKPUSH! F2])

(CALL.TEST
  [LAMBDA NIL                      (* lmm " 8-OCT-80 10:59")
    (DECLARE (SPECVARS . T))
    (PROGN (PROG [(NARGS 2)
		  (NPVAR 0)
		  (NFVAR 0)
		  (FN (QUOTE CHECKCALL))
		  (ARGNAMES (QUOTE (NIL NIL]
	         (CHECKCALL (QUOTE A)
			    (QUOTE B))
	         (SPREADAPPLY* (QUOTE CHECKCALL)
			       (QUOTE A)
			       (QUOTE B)))
	   (PROG ((NARGS 0)
		  (NPVAR 0)
		  (NFVAR 0)
		  (FN (QUOTE CHECKCALL))
		  (ARGNAMES))
	         (CHECKCALL)
	         (SPREADAPPLY* (QUOTE CHECKCALL)))
	   (PROG [(NARGS 1)
		  (NPVAR 0)
		  (NFVAR 0)
		  (FN (QUOTE CHECKCALL.1))
		  (ARGNAMES (QUOTE (X]
	         (CHECKCALL.1 T)
	         (CHECKCALL.1)
	         (CHECKCALL.1 (QUOTE A)
			      (QUOTE B)
			      (QUOTE C))
	         (SPREADAPPLY* (QUOTE CHECKCALL.1))
	         (SPREADAPPLY* (QUOTE CHECKCALL.1)
			       1 2 3))
	   (PROG [(NARGS 15)
		  (NPVAR 0)
		  (NFVAR 0)
		  (FN (QUOTE CHECKCALL.15))
		  (ARGNAMES (QUOTE (A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15]
	         (CHECKCALL.15 T)
	         (CHECKCALL.15)
	         (CHECKCALL.15 (QUOTE A)
			       (QUOTE B)
			       (QUOTE C))
	         (CHECKCALL.15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20)
	         (SPREADAPPLY* (QUOTE CHECKCALL.15)
			       T)
	         (SPREADAPPLY* (QUOTE CHECKCALL.15))
	         (SPREADAPPLY* (QUOTE CHECKCALL.15)
			       (QUOTE A)
			       (QUOTE B)
			       (QUOTE C))
	         (SPREADAPPLY* (QUOTE CHECKCALL.15)
			       0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20)))
    (PROGN (PROG [(NARGS 2)
		  (NPVAR 3)
		  (NFVAR 0)
		  (FN (QUOTE CHECKCALL.PVAR))
		  (ARGNAMES (QUOTE (NIL NIL]
	         (CHECKCALL.PVAR (QUOTE A)
				 (QUOTE B))
	         (SPREADAPPLY* (QUOTE CHECKCALL.PVAR)
			       (QUOTE A)
			       (QUOTE B)))
	   (PROG ((NARGS 0)
		  (NPVAR 3)
		  (NFVAR 0)
		  (FN (QUOTE CHECKCALL.PVAR))
		  (ARGNAMES))
	         (CHECKCALL.PVAR)
	         (SPREADAPPLY* (QUOTE CHECKCALL.PVAR)))
	   (PROG [(NARGS 1)
		  (NPVAR 3)
		  (NFVAR 0)
		  (FN (QUOTE CHECKCALL.PVAR.1))
		  (ARGNAMES (QUOTE (X]
	         (CHECKCALL.PVAR.1 T)
	         (CHECKCALL.PVAR.1)
	         (CHECKCALL.PVAR.1 (QUOTE A)
				   (QUOTE B)
				   (QUOTE C))
	         (SPREADAPPLY* (QUOTE CHECKCALL.PVAR.1))
	         (SPREADAPPLY* (QUOTE CHECKCALL.PVAR.1)
			       1 2 3))
	   (PROG [(NARGS 15)
		  (NPVAR 3)
		  (NFVAR 0)
		  (FN (QUOTE CHECKCALL.PVAR.15))
		  (ARGNAMES (QUOTE (A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15]
	         (CHECKCALL.PVAR.15 T)
	         (CHECKCALL.PVAR.15)
	         (CHECKCALL.PVAR.15 (QUOTE A)
				    (QUOTE B)
				    (QUOTE C))
	         (CHECKCALL.PVAR.15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20)
	         (SPREADAPPLY* (QUOTE CHECKCALL.PVAR.15)
			       T)
	         (SPREADAPPLY* (QUOTE CHECKCALL.PVAR.15))
	         (SPREADAPPLY* (QUOTE CHECKCALL.PVAR.15)
			       (QUOTE A)
			       (QUOTE B)
			       (QUOTE C))
	         (SPREADAPPLY* (QUOTE CHECKCALL.PVAR.15)
			       0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20])

(INTERP.TEST
  [LAMBDA NIL                                                (* lmm "21-MAY-82 11:39")
    (DECLARE (SPECVARS NA))
    [\PUTBASEPTR \DEFSPACE (LLSH (\LOLOC (QUOTE INTERP.TESTFNNAME))
				 1)
		 (SETQ INTERP.DEFINITION (QUOTE (LAMBDA NIL (INTERP.TESTING]
    [PROG ((NA 0))
          (CHECKVAL (EQ (SPREADAPPLY* INTERP.DEFINITION)
			(QUOTE INTERP.TESTVAL)))
          (CHECKVAL (EQ (INTERP.TESTFNNAME)
			(QUOTE INTERP.TESTVAL]
    [PROG ((NA 1))
          (CHECKVAL (EQ (SPREADAPPLY* INTERP.DEFINITION 1)
			(QUOTE INTERP.TESTVAL)))
          (CHECKVAL (EQ (INTERP.TESTFNNAME 1)
			(QUOTE INTERP.TESTVAL]
    [PROG ((NA 2))
          (CHECKVAL (EQ (SPREADAPPLY* INTERP.DEFINITION 1 2)
			(QUOTE INTERP.TESTVAL)))
          (CHECKVAL (EQ (INTERP.TESTFNNAME 1 2)
			(QUOTE INTERP.TESTVAL]
    (PROG ((NA 3))
          (CHECKVAL (EQ (SPREADAPPLY* INTERP.DEFINITION 1 2 3)
			(QUOTE INTERP.TESTVAL)))
          (CHECKVAL (EQ (INTERP.TESTFNNAME 1 2 3)
			(QUOTE INTERP.TESTVAL])
)

(RPAQQ F0 0)

(RPAQQ F1 1)

(RPAQQ F2 2)

(RPAQQ F3 3)

(RPAQQ F4 4)

(RPAQQ F5 5)

(RPAQQ F6 6)

(RPAQQ F7 7)

(RPAQQ F8 10Q)

(RPAQQ G0 0)

(RPAQQ G1 1)

(RPAQQ G2 2)

(RPAQQ G3 3)

(RPAQQ G4 4)

(RPAQQ G5 5)

(RPAQQ G6 6)

(RPAQQ G7 7)

(RPAQQ G8 10Q)
(DEFINEQ

(DIAGNOSTICERROR
  (LAMBDA (X)                                               (* lmm "26-DEC-79 23:08")
    (RAID)))

(GETGLOBAL
  [LAMBDA (A)                      (* lmm "29-OCT-81 22:40")
    (COND
      ((LITATOM A)
	(\GETBASEPTR \VALSPACE (LLSH (\LOLOC A)
				     1)))
      (T (RAID])

(DIAGNOSTICLOOP
  [LAMBDA NIL                                                (* lmm "31-JUL-81 14:59")
    (SIMPLEPRINT "
first pass through diagnostics completed
")
    (PROG ((I 1))
      LOOP(DIAGNOSTICS)
          (COND
	    (FAULTTEST (FAULTTEST)))
          (SETQ I (ADD1 I))
          (SIMPLEPRINT "pass ")
          (PRINTN I)
          (SIMPLEPRINT " completed.
")
          (GO LOOP])

(PRINTN
  (LAMBDA (N)                                               (* lmm "14-JAN-80 12:42")
    (COND
      ((IGREATERP N 7)
	(PRINTN (LRSH N 3))
	(SETQ N (LOGAND N 7))))
    (DSPBOUT (IPLUS N 48))))

(FUNCTION.WITH.FRAME.STUCK
  [LAMBDA NIL                                                (* lmm "16-NOV-81 18:38")
    (SIMPLEPRINT "+")
    [PROG (XXX)
          (CHECKVAL (EQ (SETQ XXX (BUMP.CALLERS.USE))
			(QUOTE BUMP.VALUE]                   (* Now we are running in a copy of this frame)
    (CHECK.STUCK.FRAME)
    (PROG ((CALLER (\MYALINK)))
          (CHECKVAL (EQ (fetch (FX USECNT) of CALLER)
			1))
          (\DECUSECOUNT CALLER)
          (\SMASHLINK NIL (SETQ CALLER (fetch (FX CLINK) of CALLER))
		      CALLER])

(CHECK.STUCK.FRAME
  [LAMBDA NIL                                          (* bvm: " 6-NOV-81 14:22")
    (PROG ((STUCKCOPY (\MYALINK)))
          (CHECKVAL (EQ (fetch (FX FNHEADER) of STUCKCOPY)
			(fetch (FX FNHEADER) of BUMPED.FRAME))
		    (NOT (fetch (FX FASTP) of STUCKCOPY))
		    (fetch (FX CHECKED) of STUCKCOPY)
		    (NEQ (fetch (FX BLINK) of STUCKCOPY)
			 (fetch (FX DUMMYBF) of STUCKCOPY))
		    (fetch (BF RESIDUAL) of (fetch (FX DUMMYBF) of STUCKCOPY))
		    (EQ (fetch (BF IVAR) of (fetch (FX DUMMYBF) of STUCKCOPY))
			(fetch (BF IVAR) of (fetch (FX BLINK) of STUCKCOPY])

(STUCK.CALLER
  [LAMBDA (A B C D E F G H I J K)
                                   (* lmm " 7-SEP-81 22:38")
    (PROG (a b c d e f g h i j k)
          (NOP 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (FUNCTION.WITH.FRAME.STUCK])

(BUMP.CALLERS.USE
  [LAMBDA NIL
    (DECLARE (GLOBALVARS BUMPED.FRAME))                (* bvm: " 6-NOV-81 14:23")
    (SETQ BUMPED.FRAME (\MYALINK))
    (\INCUSECOUNT BUMPED.FRAME)
    (QUOTE BUMP.VALUE])

(CLEANUP.BUMPED.FRAME
  [LAMBDA NIL
    (DECLARE (GLOBALVARS BUMPED.FRAME))                      (* lmm "16-NOV-81 19:15")
    (AND (NEQ BUMPED.FRAME 0)
	 (PROG (BLINK)
	       (SIMPLEPRINT "-")
	       (CHECKVAL (fetch (FX CHECKED) of BUMPED.FRAME)
			 (ZEROP (fetch (FX USECNT) of BUMPED.FRAME))
			 (EQ (fetch (FX ALINK) of BUMPED.FRAME)
			     (fetch (FX CLINK) of BUMPED.FRAME))
			 (fetch (BF CHECKED) of (SETQ BLINK (fetch (FX BLINK) of BUMPED.FRAME)))
			 (ZEROP (fetch (BF USECNT) of BLINK))
			 (EQ BLINK (fetch (FX DUMMYBF) of BUMPED.FRAME)))
	       (\MAKEFREEBLOCK (fetch (BF IVAR) of BLINK)
			       (fetch (BF SIZE) of BLINK))
	       (\MAKEFREEBLOCK BUMPED.FRAME (fetch (FX SIZE) of BUMPED.FRAME))
	       (SETQ BUMPED.FRAME])

(DEQ
  [LAMBDA (X Y)                                              (* lmm "26-JAN-83 09:20")
    (OR (EQ X Y)
	(AND (TYPENAMEP X (QUOTE FIXP))
	     (TYPENAMEP Y (QUOTE FIXP))
	     (EQ (fetch (FIXP HINUM) of X)
		 (fetch (FIXP HINUM) of Y))
	     (EQ (fetch (FIXP LONUM) of X)
		 (fetch (FIXP LONUM) of Y])
)
(DEFINEQ

(FN.FIRSTARG
  (LAMBDA (X Y Z)
    X))

(FN.FIRSTARG.PVARS
  (LAMBDA (X Y Z)                                           (* lmm " 3-JAN-80 01:08")
    (PROG (P D Q)
          (RETURN X))))

(FN.FIRSTARG.FVARS
  (LAMBDA (X Y Z)                                           (* lmm " 3-JAN-80 15:12")
    (COND
      (NIL FREE.1)
      (NIL FREE.2)
      (NIL FREE.3)
      (T X))))

(FN.FIRSTARG.PVARS.FVARS
  (LAMBDA (X Y Z)                                           (* lmm " 3-JAN-80 01:08")
    (PROG (P D Q)
          (RETURN (COND
		    (P FREE.1)
		    (P FREE.2)
		    (P FREE.3)
		    (T X))))))

(FN.LASTARG
  (LAMBDA (A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15)
    A15))

(FN.LASTARG.PVARS
  [LAMBDA (A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15)
                                   (* lmm " 7-OCT-80 09:15")
    (PROG (P1 P2 P3)
          (RETURN A15])

(FN.LASTARG.FVARS
  [LAMBDA (A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15)
                                   (* lmm " 7-OCT-80 09:16")
    (COND
      (NIL FVAR.1)
      (NIL FVAR.2)
      (NIL FVAR.3)
      (T A15])

(FN.LASTARG.FVARS.PVARS
  [LAMBDA (A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15)
                                   (* lmm " 7-OCT-80 09:16")
    (PROG (P1 P2 P3)
          (RETURN (COND
		    (NIL FVAR.1)
		    (NIL FVAR.2)
		    (NIL FVAR.3)
		    (T A15])

(FN.ARGCOUNT
  (LAMBDA N N))

(CALL.VAG2.LOC
  [LAMBDA (X)                      (* lmm "29-OCT-81 14:54")
    (CHECKVAL (SMALLP (\HILOC X))
	      (SMALLP (\LOLOC X))
	      (IGREATERP 64 (\HILOC X))
	      (EQ (\VAG2 (\HILOC X)
			 (\LOLOC X))
		  X])

(FVAR.TESTN
  (LAMBDA (FVAR1 FVAR2 FVAR3)                               (* lmm " 3-JAN-80 01:46")
    (FVAR.TEST T)))

(FN.FREE.SKIPPVARS
  [LAMBDA NIL                                                (* lmm "31-JUL-81 16:25")
    (PROG (FVAR1 FVAR2 FVAR3)
          (NOP))
    (FREEVARTEST (FN.FVAR3])

(FN.FREEPVAR
  [LAMBDA NIL                                                (* lmm "31-JUL-81 16:26")
    (FREEVARTEST (PROG (FVAR3)
		       (SETQ FVAR3 (QUOTE FREEPVAR.VALUE))
		       (RETURN (FN.FVAR3])

(FN.FVAR3
  [LAMBDA NIL                      (* lmm " 2-AUG-81 14:45")
    (FREEVARTEST FVAR3])

(FN.FREEARG
  (LAMBDA (FVAR3)                                           (* lmm " 3-JAN-80 01:34")
    (FN.FVAR3)))

(FN.FR1
  [LAMBDA NIL                                                (* lmm "31-JUL-81 16:25")
    (FREEVARTEST (FN.FR2)
		 (CHECKVAL (EQ FREE.VAR (QUOTE FREE.VALUE])

(FN.FR2
  [LAMBDA NIL                      (* lmm " 2-AUG-81 14:41")
    (FREEVARTEST (FN.FR3)
		 (CHECKVAL (EQ FREE.VAR (QUOTE FREE.VALUE])

(FN.FR3
  [LAMBDA NIL                                                (* lmm "31-JUL-81 16:26")
    (FREEVARTEST (COND
		   (FREE.VAR.FLAG (SETQ FREE.VAR FREE.VAR.FLAG)
				  (SETQ FREE.VAR.FLAG NIL))
		   (T (CHECKVAL (EQ FREE.VAR (QUOTE FREE.VALUE])

(UNBOUND.VARIABLE
  (LAMBDA (VAR)                                             (* lmm " 4-JAN-80 12:51")
    (COND
      ((EQ VAR (QUOTE TEST.UNBOUND.VARIABLE))
	(QUOTE TEST.UNBOUND.VALUE))
      (T (RAID)))))

(FAULTTEST
  [LAMBDA NIL                                                (* lmm "21-MAY-82 11:37")
    [CHECKVAL [EQ (QUOTE A)
		  (CAR (PROG1 (QUOTE (A))
			      (RELEASEWORKINGSET]
	      [EQ (QUOTE A)
		  (CAR (PROG1 (QUOTE (A B C))
			      (RELEASEWORKINGSET]
	      [EQ (QUOTE Z)
		  (CAR (CAR (PROG1 (QUOTE ((Z)))
				   (RELEASEWORKINGSET]
	      [EQ NIL (CDR (PROG1 (QUOTE (CDR.NIL))
				  (RELEASEWORKINGSET]
	      [EQ (QUOTE K)
		  (CDR (PROG1 (QUOTE (CDR.LIST . K))
			      (RELEASEWORKINGSET]
	      (EQ 129 (CAR (COMPUTEFORM (PROG (L)
					      (RPTQ 129 (SETQ L (CONS RPTN L)))
					      [SETQ L (LIST (QUOTE PROG1)
							    (LIST (QUOTE QUOTE)
								  L)
							    (QUOTE (RELEASEWORKINGSET]
					      (RPTQ 128 (SETQ L (LIST (QUOTE CDR)
								      L)))
					      (RETURN L]
    (FREEVARTEST (SETQ FAULTFVAR 100)
		 (CHECKVAL (EQ 100 (PROGN (RELEASEWORKINGSET)
					  FAULTFVAR])

(CHECKCALL
  [LAMBDA NOBIND                   (* lmm " 7-OCT-80 09:55")
    (CHECKCALLERSFRAME])

(CHECKCALLERSFRAME
  [LAMBDA NIL                                          (* bvm: " 6-NOV-81 14:22")
    (PROG ((FRAME (\MYALINK))
	   BLINK)
          [CHECKVAL (fetch (FX CHECKED) of FRAME)
		    (fetch (FX CHECKED) of (fetch (FX CLINK) of FRAME))
		    (fetch (BF CHECKED) of (SETQ BLINK (fetch (FX BLINK) of FRAME]
          (FREEVARTEST (EQ NARGS (fetch (BF NARGS) of BLINK])

(CHECKCALL.1
  [LAMBDA (X)                      (* lmm " 7-OCT-80 09:55")
    (DECLARE (SPECVARS X))
    (CHECKCALLERSFRAME])

(CHECKCALL.15
  [LAMBDA (A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15)
                                   (* lmm " 7-OCT-80 09:55")
    (DECLARE (SPECVARS A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15))
    (CHECKCALLERSFRAME])

(CHECKCALL.PVAR
  [LAMBDA NOBIND                   (* lmm " 7-OCT-80 09:55")
    (CHECKCALLERSFRAME)
    (PROG (P1 P2 P3)
          (DECLARE (SPECVARS P1 P2 P3))
          (CHECKCALLERSFRAME])

(CHECKCALL.PVAR.1
  [LAMBDA (X)                      (* lmm " 7-OCT-80 09:55")
    (DECLARE (SPECVARS X))
    (PROGN (CHECKCALLERSFRAME)
	   (PROG (P1 P2 P3)
	         (DECLARE (SPECVARS P1 P2 P3))
	         (CHECKCALLERSFRAME])

(CHECKCALL.PVAR.15
  [LAMBDA (A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15)
                                   (* lmm " 7-OCT-80 09:55")
    (DECLARE (SPECVARS A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15))
    (PROGN (CHECKCALLERSFRAME)
	   (PROG (P1 P2 P3)
	         (DECLARE (SPECVARS P1 P2 P3))
	         (CHECKCALLERSFRAME])

(TRUE
  [LAMBDA NIL                      (* lmm " 7-OCT-80 09:59")
    T])
)
(DECLARE: EVAL@COMPILE DONTCOPY 
(RESETSAVE OPTIMIZATIONSOFF T)


(PUTPROPS IPLUS.N XMACRO ((X N)
			  ((OPCODES IPLUS.N N)
			   X)))

(PUTPROPS IDIFFERENCE.N XMACRO ((X N)
				((OPCODES IDIFFERENCE.N N)
				 X)))

(DECLARE: EVAL@COMPILE 

(PUTPROPS CHECKVAL MACRO [X (MKPROGN (MAPCAR X (FUNCTION (LAMBDA (Y)
						 (LIST (QUOTE OR)
						       Y
						       (LIST (QUOTE RAID)
							     (KWOTE Y])

(PUTPROPS CHECKSTACK MACRO [X (SUBPAIR (QUOTE (FORM N))
				       (LIST (CAR X)
					     (RAND 1 177777Q))
				       (QUOTE (OR (EQ (PROG1 N FORM)
						      N)
						  (RAID (QUOTE (push FORM lost N])

(PUTPROPS CHECKPTR MACRO ((X)
			  (OR (IGREATERP 100Q (\HILOC X))
			      (RAID))))

(PUTPROPS CHECKPUSH MACRO ((FORM)
			   (CHECKSTACK FORM)))

(PUTPROPS COMPUTEFORM MACRO (FORMEXPL (EVAL (CAR FORMEXPL))))

(PUTPROPS SIMPLEPRINT MACRO [X (CONS (QUOTE PROGN)
				     (MAPCAR (CHCON (CAR X))
					     (FUNCTION (LAMBDA (CHAR)
						 (LIST (QUOTE DSPBOUT)
						       (COND
							 ((EQ CHAR 37Q)
							   15Q)
							 (T CHAR])

(PUTPROPS CHECKPUSH! MACRO [X (SUBPAIR (QUOTE (FORM N))
				       (LIST (CAR X)
					     (RAND 1 177777Q))
				       (QUOTE (OR (EQ [PROG1 N (CHECKSTACK (NOP (STUCK.CALLER)
										FORM FORM FORM FORM 
										FORM FORM FORM FORM 
										FORM FORM FORM FORM 
										FORM FORM FORM FORM 
										FORM FORM FORM FORM 
										FORM FORM FORM FORM 
										FORM FORM FORM FORM 
										FORM FORM FORM FORM
										(CLEANUP.BUMPED.FRAME]
						      N)
						  (RAID (QUOTE (Push! FORM lost N])

(PUTPROPS FREEVARTEST MACRO [X (COND
				 ((NOT (EVALV (QUOTE FREEVARTESTING)))
				   (CONS (QUOTE AND)
					 (CONS NIL X)))
				 (T (CONS (QUOTE PROGN)
					  X])

(PUTPROPS IPLUS.N MACRO ((X N)
			 (IPLUS X N)))

(PUTPROPS IDIFFERENCE.N MACRO ((X N)
			       (IDIFFERENCE X N)))
)


(PUTPROPS BAD.NOP DOPVAL (2 NOP))

(PUTPROPS NOP DOPVAL (1 NOP))

(PUTPROPS .COPY. DOPVAL (0 COPY))

(PUTPROPS COPY.SWAP.POP DOPVAL (1 COPY SWAP POP))

(PUTPROPS COPY.1 DOPVAL (0 COPY.N 2))

(PUTPROPS COPY.2 DOPVAL (0 COPY.N 4))

(PUTPROPS COPY.3 DOPVAL (0 COPY.N 6))

(PUTPROPS STORE.1 DOPVAL (1 STORE.N 2))

(PUTPROPS STORE.2 DOPVAL (1 STORE.N 4))

(PUTPROPS STORE.3 DOPVAL (1 STORE.N 6))

[DECLARE: EVAL@COMPILE 

(BLOCKRECORD BITBLOCK ((B.1 BITS 1)
		       (B.7 BITS 7)
		       (B.4 BITS 4)
		       (B.2 BITS 2)
		       (B.2A BITS 2)
		       (B.15 BITS 17Q)
		       (B.1A BITS 1))
		      (BLOCKRECORD BITBLOCK ((B.4A BITS 4)
				    (B.8 BITS 10Q)
				    (B.4B BITS 4)
				    (B.5 BITS 5)
				    (B.9 BITS 11Q)
				    (B.2C BITS 2))))
]

(RPAQQ BITFIELDS ((B.1 37Q 1)
		  (B.7 30Q 177Q)
		  (B.4 24Q 17Q)
		  (B.2 22Q 3)
		  (B.2A 20Q 3)
		  (B.15 1 77777Q)
		  (B.1A 0 1)
		  (B.4A 34Q 17Q)
		  (B.8 24Q 377Q)
		  (B.4B 20Q 17Q)
		  (B.5 13Q 37Q)
		  (B.9 2 777Q)
		  (B.2C 0 3)))
(DECLARE: EVAL@COMPILE 

(PUTPROPS BITTEST MACRO [X
	    (PROG ((N (CAR X)))                              (* Generate some bit tests on largep N)
	          (COND
		    ((AND (IGREATERP N (IMINUS (EXPT 2 20Q)))
			  (ILESSP N (EXPT 2 20Q)))
		      (ERROR "Bit test number not large" N)))
	          (RETURN (LIST [LIST (QUOTE LAMBDA)
				      (QUOTE (Z))
				      (CONS (QUOTE CHECKVAL)
					    (for FIELD in BITFIELDS
					       collect (LIST (QUOTE EQ)
							     (LIST (QUOTE fetch)
								   (CAR FIELD)
								   (QUOTE of)
								   (QUOTE Z))
							     (LOGAND (LRSH N (CADR FIELD))
								     (CADDR FIELD]
				N])

(PUTPROPS PUTBITTEST MACRO (X
	    (PROG ((N (CAR X))
		   (VAL (CADR X))
		   THISVAL CHANGEDN)
	          (COND
		    ((AND (IGREATERP N (IMINUS (EXPT 2 20Q)))
			  (ILESSP N (EXPT 2 20Q)))
		      (ERROR "Bit test number not large" N)))
	          (RETURN
		    (LIST
		      [LIST
			(QUOTE LAMBDA)
			(QUOTE (Z))
			(CONS
			  (QUOTE CHECKVAL)
			  (for FIELD in BITFIELDS
			     join
			      (PROGN [SETQ CHANGEDN
				       (IPLUS (LLSH [SETQ THISVAL (SELECTQ
							VAL
							(0 0)
							(1 (CADDR FIELD))
							(RAND 1 (IMAX (CADDR FIELD)
								      1]
						    (CADR FIELD))
					      (LOGAND N (LOGXOR (LLSH (CADDR FIELD)
								      (CADR FIELD))
								-1]
                                                             (* See what the PUTBITS does to our N)
				     (CONS (LIST (QUOTE AND)
						 (LIST (QUOTE EQ)
						       (LIST (QUOTE PROGN)
							     (LIST (QUOTE replace)
								   (CAR FIELD)
								   (QUOTE of)
								   (QUOTE Z)
								   (QUOTE with)
								   THISVAL)
							     (QUOTE (\GETBASE Z 0)))
						       (LOGAND (LRSH CHANGEDN 20Q)
							       177777Q))
						 (LIST (QUOTE EQ)
						       (QUOTE (\GETBASE Z 1))
						       (LOGAND CHANGEDN 177777Q)))
					   (AND (NEQ (SETQ OLDVAL (LOGAND (LRSH N (CADR FIELD))
									  (CADDR FIELD)))
						     THISVAL)
						(LIST (LIST (QUOTE AND)
							    (LIST (QUOTE EQ)
								  (LIST (QUOTE PROGN)
									(LIST (QUOTE replace)
									      (CAR FIELD)
									      (QUOTE of)
									      (QUOTE Z)
									      (QUOTE with)
									      OLDVAL)
									(QUOTE (\GETBASE Z 0)))
								  (LOGAND (LRSH N 20Q)
									  177777Q))
							    (LIST (QUOTE EQ)
								  (QUOTE (\GETBASE Z 1))
								  (LOGAND N 177777Q]
		      N))
	      OLDVAL)))
)
DONTEVAL@LOAD 
(DECLARE: DOEVAL@COMPILE DONTCOPY

(ADDTOVAR GLOBALVARS G0 G1 G2 G3 G4 G5 G6 G7 G8 FAULTTEST BUMPED.FRAME INTERP.DEFINITION)
)

(FILESLOAD (LOADCOMP)
	   LLSTK)

(CHECKIMPORTS (QUOTE (MODARITH LLPARAMS))
	      T)
)

(RPAQQ UFNFNS (SMALLPOSP \CAR.UFN \CDR.UFN \CONS.UFN \HARDRETURN \LISPERROR \UNKNOWN.UFN FMEMB 
			 \GETBASEBYTE GETPROP \SLOWIDIFFERENCE \SLOWIGREATERP \SLOWIPLUS2 \MAKENUMBER 
			 \PUTBITS.UFN \SLOWLLSH1 \SLOWLLSH8 \SLOWLOGAND2 \SLOWLOGOR2 \SLOWLRSH1 
			 \SLOWLRSH8 \PUTBASEBYTE \RPLACA.UFN \RPLACD.UFN \VAG2 \SETGLOBAL.UFN 
			 \SETGLOBALVAL.UFN \SETFVAR.UFN \ADDBASE \SLOWLOGXOR2))
(DEFINEQ

(SMALLPOSP
  [LAMBDA (X)                                                (* lmm "21-MAY-82 18:20")
    (EQ (\HILOC X)
	14])

(\CAR.UFN
  [LAMBDA (X)                                                (* lmm " 2-JAN-80 20:36")
    (CHECKVAL (NOT (LISTP X)))
    (SELECTQ X
	     (NIL NIL)
	     (CAR.UFN.TEST (QUOTE CAR.UFN.VALUE))
	     (DIAGNOSTICERROR (QUOTE \CAR.UFN])

(\CDR.UFN
  [LAMBDA (X)                                                (* lmm " 2-JAN-80 20:36")
    (CHECKVAL (NOT (LISTP X)))
    (SELECTQ X
	     (NIL NIL)
	     (CDR.UFN.TEST (QUOTE CDR.UFN.VALUE))
	     (DIAGNOSTICERROR (QUOTE \CDR.UFN])

(\CONS.UFN
  [LAMBDA (X Y)                                              (* lmm "27-DEC-79 00:44")
    (COND
      ((AND (EQ X (QUOTE CONS.1))
	    (EQ Y (QUOTE CONS.2)))
	(QUOTE (CONS.1 . CONS.2)))
      (T (DIAGNOSTICERROR (QUOTE \CONS.UFN])

(\HARDRETURN
  [LAMBDA (VALUE)                  (* lmm " 2-OCT-81 22:12")
    (RAID "HARD RETURN"])

(\LISPERROR
  [LAMBDA (X Y)                    (* lmm " 2-OCT-81 22:34")
    (RAID "LISPERROR"])

(\UNKNOWN.UFN
  [LAMBDA (X Y)                                              (* lmm "31-JUL-81 16:33")
    (RAID (QUOTE UNKNOWN.UFN])

(FMEMB
  [LAMBDA (X Y)                    (* lmm "27-DEC-79 00:56")
    (COND
      ((AND (EQ X (QUOTE FMEMB.1))
	    (EQ Y (QUOTE FMEMB.2)))
	(QUOTE FMEMB.VALUE))
      (T (DIAGNOSTICERROR (QUOTE FMEMB])

(\GETBASEBYTE
  [LAMBDA (PTR N)                  (* lmm "13-MAY-80 10:24")
    (COND
      ((AND (EQ PTR (QUOTE TEST.GETBASEBYTE.1))
	    (EQ N (QUOTE TEST.GETBASEBYTE.2)))
	(QUOTE TEST.GETBASEBYTE.VALUE))
      (T (RAID])

(GETPROP
  [LAMBDA (X Y)                    (* lmm "13-MAY-80 08:59")
    (COND
      ((AND (EQ X (QUOTE GETP.1))
	    (EQ Y (QUOTE GETP.2)))
	(QUOTE GETP.VALUE))
      (T (DIAGNOSTICERROR (QUOTE GETP])

(\SLOWIDIFFERENCE
  [LAMBDA (N M)                                              (* lmm "26-JAN-83 09:24")
    [CHECKVAL (NOT (AND (SMALLPOSP N)
			(SMALLPOSP M)
			(OR (IGREATERP N M)
			    (EQ N M]
    (COND
      [(AND (SMALLPOSP M)
	    (SMALLPOSP N))
	(\ADDBASE \SMALLNEGSPACE (ADD1 (IDIFFERENCE 177777Q (IDIFFERENCE M N]
      (T (SELECTQ N
		  (IDIFFERENCE.TEST (QUOTE IDIFFERENCE.TEST.VALUE))
		  (4603Q (SELECTQ M
				  (-173174Q 177777Q)
				  (DIAGNOSTICERROR)))
		  (-24327Q (SELECTQ M
				    (153447Q -177776Q)
				    (DIAGNOSTICERROR)))
		  (PROGN [OR (SMALLPOSP N)
			     (DIAGNOSTICERROR (QUOTE (IDIFFERENCE 1]
			 (SELECTQ M
				  (IDIFFERENCE.TEST2 (QUOTE IDIFFERENCE.TEST2.VALUE))
				  (-1 (IPLUS N 1))
				  (DIAGNOSTICERROR (QUOTE (IDIFFERENCE 2])

(\SLOWIGREATERP
  [LAMBDA (N M)                    (* lmm "27-DEC-79 01:28")
    [CHECKVAL (NOT (AND (SMALLPOSP M)
			(SMALLPOSP N]
    (SELECTQ N
	     (IGREATERP.TEST (QUOTE IGREATERP.TEST.VALUE))
	     (PROGN [OR (SMALLPOSP N)
			(DIAGNOSTICERROR (QUOTE (IGREATERP 1]
		    (SELECTQ M
			     (IGREATERP.TEST2 (QUOTE IGREATERP.TEST2.VALUE))
			     (DIAGNOSTICERROR (QUOTE (IGREATERP 2])

(\SLOWIPLUS2
  [LAMBDA (N M)                                              (* lmm "26-JAN-83 09:26")
    [CHECKVAL (NOT (AND (SMALLPOSP M)
			(SMALLPOSP N)
			(COND
			  [(IGREATERP 100000Q N)             (* N SMALL)
			    (COND
			      ((IGREATERP 100000Q M)         (* M SMALL TOO -
							     WOULD NOT OVERFLOW)
				T)
			      (T                             (* M BIG N SMALL)
				 (IGREATERP 100000Q (IPLUS N (IDIFFERENCE M 100000Q]
			  ((IGREATERP 100000Q M)             (* N BIG M SMALL)
			    (IGREATERP 100000Q (IPLUS (IDIFFERENCE N 100000Q)
						      M)))
			  (T                                 (* BOTH BIG -
							     WOULD OVERFLOW)
			     NIL]
    (SELECTQ N
	     (IPLUS2.TEST (QUOTE IPLUS2.TEST.VALUE))
	     (-177776Q (IDIFFERENCE M 177776Q))
	     (-1 (IDIFFERENCE M 1))
	     (-6737Q (SELECTQ M
			      (-171041Q -200000Q)
			      (DIAGNOSTICERROR)))
	     (PROGN [OR (SMALLPOSP N)
			(DIAGNOSTICERROR (QUOTE (IPLUS2 1]
		    (SELECTQ M
			     (IPLUS2.TEST2 (QUOTE IPLUS2.TEST2.VALUE))
			     (-1 (IDIFFERENCE N 1))
			     (-177776Q (IDIFFERENCE N 177776Q))
			     (DIAGNOSTICERROR (QUOTE (IPLUS2 2])

(\MAKENUMBER
  [LAMBDA (N0 N1)                                            (* lmm "26-JAN-83 09:28")
                                                             (* used as punt case for arith opcodes which create 
							     large numbers)
    (SELECTQ N0
	     (0 N1)
	     (177777Q (\ADDBASE \SMALLNEGSPACE N1))
	     (PROGN (CHECKVAL (AND (SMALLPOSP N0)
				   (SMALLPOSP N1)))
		    (CHECKVAL (AND (NEQ N0 0)
				   (NEQ N0 177777Q)))
		    (SELECTQ N0
			     [1 (COND
				  ((ZEROP N1)
				    200000Q)
				  ((EQ N1 100000Q)
				    300000Q)
				  (T (DIAGNOSTICERROR]
			     [177776Q (COND
					((EQ N1 177777Q)
					  -200001Q)
					((EQ N1 77777Q)
					  -300001Q)
					(T (DIAGNOSTICERROR]
			     (DIAGNOSTICERROR])

(\PUTBITS.UFN
  [LAMBDA (X V N.FD)                                   (* bvm: "10-NOV-81 16:34")
    (COND
      ((FIXP V)
	(CHECKVAL (FIXP N.FD))
	(RAID "\PUTBITS.UFN called" V)
	(PROG ((NV V)
	       (WIDTH (ADD1 (LOGAND N.FD 17Q)))
	       (FIRST (LRSH (LOGAND N.FD 377Q)
			    4))
	       MASK SHIFT)
	      (SETQ SHIFT (IDIFFERENCE 20Q (IPLUS FIRST WIDTH)))
	      (SETQ MASK (SUB1 (LLSH 1 WIDTH)))
	      (\PUTBASE (SETQ X (\ADDBASE X (LRSH N.FD 10Q)))
			0
			(LOGOR (LOGAND (\GETBASE X 0)
				       (LOGXOR 177777Q (LLSH MASK SHIFT)))
			       (LLSH (LOGAND NV MASK)
				     SHIFT)))
	      (RETURN NV)))
      ((EQ V (QUOTE PUTBITS.TEST))
	(QUOTE PUTBITS.TEST.VALUE))
      (T (DIAGNOSTICERROR])

(\SLOWLLSH1
  [LAMBDA (N)                                                (* lmm "26-JAN-83 09:29")
    [CHECKVAL (NOT (AND (SMALLPOSP N)
			(EQ (LOGAND N 100000Q)
			    0]
    (SELECTQ N
	     (LLSH1.TEST (QUOTE LLSH1.TEST.VALUE))
	     (100000Q 200000Q)
	     (DIAGNOSTICERROR (QUOTE LLSH])

(\SLOWLLSH8
  [LAMBDA (N)                                                (* lmm "26-JAN-83 09:29")
    [CHECKVAL (NOT (AND (SMALLPOSP N)
			(EQ (LOGAND N 177400Q)
			    0]
    (SELECTQ N
	     (LLSH8.TEST (QUOTE LLSH8.TEST.VALUE))
	     (400Q 200000Q)
	     (DIAGNOSTICERROR (QUOTE LLSH])

(\SLOWLOGAND2
  [LAMBDA (N M)                    (* lmm "29-OCT-81 14:57")
    [CHECKVAL (NOT (AND (SMALLPOSP M)
			(SMALLPOSP N]
    (SELECTQ N
	     (NIL (QUOTE LOGAND2.NIL))
	     (T (QUOTE LOGAND2.T))
	     (PROGN [OR (SMALLPOSP N)
			(DIAGNOSTICERROR (QUOTE (LOGAND2 1]
		    (SELECTQ M
			     (NIL (QUOTE LOGAND2.N.NIL))
			     (T (QUOTE LOGAND2.N.T))
			     (COND
			       ((EQ (\HILOC M)
				    \SmallNegHi)
				 (LOGAND N (\LOLOC M)))
			       (T (DIAGNOSTICERROR (QUOTE (LOGAND2 2])

(\SLOWLOGOR2
  [LAMBDA (N M)                    (* lmm " 3-JAN-80 14:53")
    [CHECKVAL (NOT (AND (SMALLPOSP M)
			(SMALLPOSP N]
    (SELECTQ N
	     (LOGOR2.TEST (QUOTE LOGOR2.TEST.VALUE))
	     (PROGN (OR (SMALLPOSP N)
			(DIAGNOSTICERROR))
		    (SELECTQ M
			     (LOGOR2.TEST.2 (QUOTE LOGOR2.TEST.2.VALUE))
			     (DIAGNOSTICERROR])

(\SLOWLRSH1
  [LAMBDA (N)                      (* lmm "29-OCT-81 15:02")
    (CHECKVAL (NOT (SMALLPOSP N)))
    (SELECTQ N
	     (LRSH1.TEST (QUOTE LRSH1.TEST.VALUE))
	     (DIAGNOSTICERROR (QUOTE LRSH])

(\SLOWLRSH8
  [LAMBDA (N)                      (* lmm "29-OCT-81 15:04")
    (CHECKVAL (NOT (SMALLPOSP N)))
    (SELECTQ N
	     (LRSH8.TEST (QUOTE LRSH8.TEST.VALUE))
	     (DIAGNOSTICERROR (QUOTE LRSH])

(\PUTBASEBYTE
  [LAMBDA (PTR DISP BYTE)          (* lmm "29-OCT-81 14:34")
    (CHECKVAL (SMALLPOSP DISP)
	      (SMALLPOSP BYTE)
	      (IGREATERP 256 BYTE))
    (\PUTBASE PTR (LRSH DISP 1)
	      (SELECTQ (LOGAND DISP 1)
		       (0 (IPLUS (LLSH BYTE 8)
				 (LOGAND (\GETBASE PTR (LRSH DISP 1))
					 255)))
		       (IPLUS (LLSH (LRSH (\GETBASE PTR (LRSH DISP 1))
					  8)
				    8)
			      BYTE)))
    BYTE])

(\RPLACA.UFN
  [LAMBDA (X Y)                                              (* lmm "13-MAY-80 09:02")
    (COND
      ((AND (EQ X (QUOTE TEST.RPLACA.1))
	    (EQ Y (QUOTE TEST.RPLACA.2)))
	(QUOTE RPLACA.VALUE))
      (T (RAID])

(\RPLACD.UFN
  [LAMBDA (X Y)                                              (* lmm "13-MAY-80 09:02")
    (COND
      ((AND (EQ X (QUOTE TEST.RPLACD.1))
	    (EQ Y (QUOTE TEST.RPLACD.2)))
	(QUOTE RPLACD.VALUE))
      (T (RAID])

(\VAG2
  [LAMBDA (X Y)                    (* lmm "27-DEC-79 01:31")
    [CHECKVAL (NOT (AND (SMALLPOSP X)
			(SMALLPOSP Y]
    (COND
      ((AND (EQ X (QUOTE VAG2.1))
	    (EQ Y (QUOTE VAG2.2)))
	(QUOTE VAG2.VALUE))
      (T (DIAGNOSTICERROR (QUOTE \VAG2])

(\SETGLOBAL.UFN
  [LAMBDA (V A)                                              (* lmm "21-MAY-82 11:36")
    (COND
      ((LITATOM A)
	(\PUTBASEPTR \VALSPACE (LLSH (\LOLOC A)
				     1)
		     V))
      (T (RAID])

(\SETGLOBALVAL.UFN
  [LAMBDA (V A)                    (* lmm "29-OCT-81 14:53")
    (\PUTBASEPTR \VALSPACE (LLSH A 1)
		 V)
    V])

(\SETFVAR.UFN
  [LAMBDA (V VCELL)                (* lmm "29-OCT-81 14:53")
    (CHECKVAL (EQ (\HILOC VCELL)
		  (\HILOC \VALSPACE)))
    (\PUTBASEPTR VCELL 0 V)
    V])

(\ADDBASE
  [LAMBDA (X D)                                              (* lmm "21-MAY-82 10:46")
    (COND
      [(AND (SMALLP D)
	    (EQ (\HILOC D)
		\SmallNegHi))                                (* CODE FROM LLNEW)
                                                             (* usually done in microcode;
							     this version uses only arithmetic and \VAG2)
	(PROG (NH NL (XH (\HILOC X))
		  (XL (\LOLOC X)))
	      (SETQ NH 65535)
	      (SETQ NL (\LOLOC D))
	      (COND
		[(IGREATERP XL (IDIFFERENCE MAX.SMALL.INTEGER NL))
                                                             (* carry)
		  (add XH 1)
		  (SETQ XL (SUB1 (IDIFFERENCE XL (IDIFFERENCE MAX.SMALL.INTEGER NL]
		(T (add XL NL)))
	      (COND
		[(IGREATERP NH MAX.POS.HINUM)
		  (SETQ XH (SUB1 (IDIFFERENCE XH (IDIFFERENCE MAX.SMALL.INTEGER NH]
		(T (add XH NH)))
	      (RETURN (\VAG2 XH XL]
      ((AND (EQ X (QUOTE TEST.ADDBASE.1))
	    (EQ D (QUOTE TEST.ADDBASE.2)))
	(QUOTE TEST.ADDBASE.VALUE))
      (T (DIAGNOSTICERROR])

(\SLOWLOGXOR2
  [LAMBDA (A B)                                              (* lmm "11-FEB-81 20:34")
                                                             (* INCLUDED SO THAT DIAGNOSTICS WILL STILL WORK IF 
							     \SLOWLOGXOR2 IS NOT AN OPCODE)
    (IDIFFERENCE (LOGOR A B)
		 (LOGAND A B])
)

(RPAQQ \INTERRUPTABLE NIL)

(RPAQQ \InterruptEnable T)

(RPAQQ \InterruptChar NIL)

(RPAQQ \INTCHAR NIL)

(RPAQQ FAULTTEST T)
(DECLARE: EVAL@COMPILE 

(PUTPROPS IDIFN DMACRO (= . IDIFFERENCE.N))

(PUTPROPS IPLUSN DMACRO (= . IPLUS.N))
)
(DEFINEQ

(\BLT
  [LAMBDA (DBASE SBASE NWORDS)                               (* bvm: "15-JUN-82 13:52")
                                                             (* redefined by \LONGWORDBLT)
    (from 1 to NWORDS
       do (\PUTBASE DBASE 0 (\GETBASE SBASE 0))
	  (SETQ DBASE (\ADDBASE DBASE 1))
	  (SETQ SBASE (\ADDBASE SBASE 1])

(\ZEROWORDS
  [LAMBDA (BASE ENDBASE)                                     (* bvm: "27-NOV-82 17:23")
                                                             (* Bootstrapping version of \ZEROWORDS)
    [COND
      ((NOT (PTRGTP BASE ENDBASE))
	(COND
	  ([AND (EVENP (\LOLOC BASE))
		(NOT (EVENP (\LOLOC ENDBASE]                 (* Can transfer two words at a time)
	    (for (B ← BASE) by (\ADDBASE B 2) do (\PUTBASEPTR B 0 NIL)
	       repeatuntil (EQ (\ADDBASE B 1)
			       ENDBASE)))
	  (T (for (B ← BASE) by (\ADDBASE B 1) do (\PUTBASE B 0 0) repeatuntil (EQ B ENDBASE]
    BASE])
)
(DECLARE: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS 

(ADDTOVAR NLAMA )

(ADDTOVAR NLAML )

(ADDTOVAR LAMA \INTERPRETER CHECKCALL.PVAR CHECKCALL FN.ARGCOUNT)
)
(PUTPROPS MICROTEST COPYRIGHT ("Xerox Corporation" 3675Q 3676Q 3677Q))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (5322Q 20063Q (\SLOWIQUOTIENT 5334Q . 13464Q) (\MAKENUMBER 13466Q . 15067Q) (LLSH 15071Q
 . 16401Q) (LRSH 16403Q . 20061Q)) (20604Q 23602Q (\RESETSTACK 20616Q . 21155Q) (\INTERPRETER 21157Q
 . 21702Q) (INITIALEVALQT 21704Q . 22107Q) (INTERRUPTED 22111Q . 22542Q) (\KEYHANDLER 22544Q . 23220Q)
 (\MAPMDS 23222Q . 23403Q) (\RESETSYSTEMSTATE 23405Q . 23600Q)) (23603Q 32036Q (EVALQT 23615Q . 24122Q
) (DIAGNOSE 24124Q . 32034Q)) (34151Q 36730Q (DIAGNOSTICS 34163Q . 36726Q)) (36731Q 135036Q (
BASICDIAGNOSTICS 36743Q . 40327Q) (PUSH.TEST 40331Q . 42744Q) (JUMPX.TEST 42746Q . 43666Q) (
CALLS.FIRSTARGTEST 43670Q . 44355Q) (CALLS.LASTARGTEST 44357Q . 45310Q) (CALLS.TOOFEWARGS 45312Q . 
46223Q) (CALLS.TOOMANYARGS 46225Q . 47065Q) (CALLS.COUNTTEST 47067Q . 50051Q) (BIND.UNBIND.TEST 50053Q
 . 51272Q) (BIND.UNBIND.TEST2 51274Q . 52440Q) (PVAR←.SETQ 52442Q . 54122Q) (PVAR.SETUP 54124Q . 
54736Q) (FVAR.GLOBAL 54740Q . 56153Q) (FVAR.FREE 56155Q . 57257Q) (FVAR.TEST 57261Q . 60346Q) (
FVAR.TEST2 60350Q . 60641Q) (FVAR.TEST3 60643Q . 61047Q) (CONST.TEST2 61051Q . 61660Q) (CAR.CDR.TEST 
61662Q . 63175Q) (UNBIND.TEST 63177Q . 63542Q) (DUNBIND.TEST 63544Q . 64140Q) (APPLYFN.TEST 64142Q . 
66016Q) (FCOPY.TEST 66020Q . 66322Q) (FJUMPX.TEST 66324Q . 67527Q) (SETI.TEST 67531Q . 71070Q) (
SETP.TEST 71072Q . 73171Q) (SIC.TEST 73173Q . 73414Q) (IPLUS.TEST 73416Q . 75326Q) (IPLUS.N.TEST 
75330Q . 76621Q) (LOGOR.TEST 76623Q . 100125Q) (LOGAND.TEST 100127Q . 101412Q) (LOGXOR.TEST 101414Q . 
102717Q) (IGREATERP.TEST 102721Q . 104062Q) (LRSH.TEST 104064Q . 104735Q) (LLSH.TEST 104737Q . 105456Q
) (TYPE.TEST 105460Q . 106055Q) (HILOC.TEST 106057Q . 106543Q) (LOLOC.TEST 106545Q . 107241Q) (
GETBITS.TEST 107243Q . 107543Q) (PUTBITS.TEST.ZERO 107545Q . 110231Q) (PUTBITS.TEST.ONES 110233Q . 
110555Q) (VAG2.TEST 110557Q . 111314Q) (ADDBASE.TEST 111316Q . 112060Q) (GLOBALVAL.TEST 112062Q . 
112345Q) (CAR.UFN.TEST 112347Q . 112671Q) (CDR.UFN.TEST 112673Q . 113215Q) (LOGAND2.UFN.TEST 113217Q
 . 113716Q) (LOGOR2.UFN.TEST 113720Q . 114336Q) (BASE.UFN.TEST 114340Q . 115250Q) (ARITH.UFN.TEST 
115252Q . 116766Q) (PUTBITS.UFN.TEST 116770Q . 117344Q) (RPLAC.UFN.TEST 117346Q . 120050Q) (
IGREATERP.UFN.TEST 120052Q . 120521Q) (LSH.UFN.TEST 120523Q . 121577Q) (MISC.UFN.TEST 121601Q . 
122603Q) (PUSHSTKOV.TEST 122605Q . 125013Q) (CALL.TEST 125015Q . 133063Q) (INTERP.TEST 133065Q . 
135034Q)) (135547Q 145166Q (DIAGNOSTICERROR 135561Q . 135752Q) (GETGLOBAL 135754Q . 136240Q) (
DIAGNOSTICLOOP 136242Q . 137104Q) (PRINTN 137106Q . 137431Q) (FUNCTION.WITH.FRAME.STUCK 137433Q . 
140516Q) (CHECK.STUCK.FRAME 140520Q . 142004Q) (STUCK.CALLER 142006Q . 142360Q) (BUMP.CALLERS.USE 
142362Q . 142712Q) (CLEANUP.BUMPED.FRAME 142714Q . 144430Q) (DEQ 144432Q . 145164Q)) (145167Q 161052Q 
(FN.FIRSTARG 145201Q . 145251Q) (FN.FIRSTARG.PVARS 145253Q . 145503Q) (FN.FIRSTARG.FVARS 145505Q . 
146005Q) (FN.FIRSTARG.PVARS.FVARS 146007Q . 146351Q) (FN.LASTARG 146353Q . 146501Q) (FN.LASTARG.PVARS 
146503Q . 147003Q) (FN.LASTARG.FVARS 147005Q . 147352Q) (FN.LASTARG.FVARS.PVARS 147354Q . 147772Q) (
FN.ARGCOUNT 147774Q . 150032Q) (CALL.VAG2.LOC 150034Q . 150406Q) (FVAR.TESTN 150410Q . 150607Q) (
FN.FREE.SKIPPVARS 150611Q . 151112Q) (FN.FREEPVAR 151114Q . 151444Q) (FN.FVAR3 151446Q . 151615Q) (
FN.FREEARG 151617Q . 152013Q) (FN.FR1 152015Q . 152277Q) (FN.FR2 152301Q . 152531Q) (FN.FR3 152533Q . 
153135Q) (UNBOUND.VARIABLE 153137Q . 153465Q) (FAULTTEST 153467Q . 155354Q) (CHECKCALL 155356Q . 
155530Q) (CHECKCALLERSFRAME 155532Q . 156416Q) (CHECKCALL.1 156420Q . 156633Q) (CHECKCALL.15 156635Q
 . 157231Q) (CHECKCALL.PVAR 157233Q . 157555Q) (CHECKCALL.PVAR.1 157557Q . 160151Q) (CHECKCALL.PVAR.15
 160153Q . 160726Q) (TRUE 160730Q . 161050Q)) (174705Q 222067Q (SMALLPOSP 174717Q . 175121Q) (\CAR.UFN
 175123Q . 175525Q) (\CDR.UFN 175527Q . 176131Q) (\CONS.UFN 176133Q . 176531Q) (\HARDRETURN 176533Q . 
176706Q) (\LISPERROR 176710Q . 177060Q) (\UNKNOWN.UFN 177062Q . 177275Q) (FMEMB 177277Q . 177631Q) (
\GETBASEBYTE 177633Q . 200201Q) (GETPROP 200203Q . 200527Q) (\SLOWIDIFFERENCE 200531Q . 202214Q) (
\SLOWIGREATERP 202216Q . 203046Q) (\SLOWIPLUS2 203050Q . 205322Q) (\MAKENUMBER 205324Q . 206725Q) (
\PUTBITS.UFN 206727Q . 210256Q) (\SLOWLLSH1 210260Q . 210744Q) (\SLOWLLSH8 210746Q . 211427Q) (
\SLOWLOGAND2 211431Q . 212433Q) (\SLOWLOGOR2 212435Q . 213175Q) (\SLOWLRSH1 213177Q . 213526Q) (
\SLOWLRSH8 213530Q . 214057Q) (\PUTBASEBYTE 214061Q . 214731Q) (\RPLACA.UFN 214733Q . 215304Q) (
\RPLACD.UFN 215306Q . 215657Q) (\VAG2 215661Q . 216275Q) (\SETGLOBAL.UFN 216277Q . 216633Q) (
\SETGLOBALVAL.UFN 216635Q . 217050Q) (\SETFVAR.UFN 217052Q . 217332Q) (\ADDBASE 217334Q . 221365Q) (
\SLOWLOGXOR2 221367Q . 222065Q)) (222502Q 224475Q (\BLT 222514Q . 223260Q) (\ZEROWORDS 223262Q . 
224473Q)))))
STOP