(FILECREATED " 2-Jan-84 18:04:52" {PHYLUM}<LISPCORE>SOURCES>LLCODE.;29 20059  

      changes to:  (VARS \OPCODES)

      previous date: "31-Dec-83 22:25:35" {PHYLUM}<LISPCORE>SOURCES>LLCODE.;27)


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

(PRETTYCOMPRINT LLCODECOMS)

(RPAQQ LLCODECOMS [(* reading in compiled code)
	(FNS DCODERD DCODESKIP \RENAMEDFN \REALNAMEP)
	[VARS (CODERDTBL (COPYREADTABLE (QUOTE ORIG]
	(GLOBALVARS CODERDTBL FILERDTBL)
	(P (SETSYNTAX 25 [QUOTE (MACRO (LAMBDA (FILE RDTBL)
					       (EVAL (READ FILE RDTBL]
		      CODERDTBL))
	[DECLARE: EVAL@COMPILE DONTCOPY DONTEVAL@LOAD (FILES (LOADCOMP)
							     MODARITH RENAMEMACROS)
		  (P (SELECTQ (COMPILEMODE)
			      ((D ALTO)
			       NIL)
			      (FILESLOAD (LOADCOMP)
					 DCODEFOR10]
	(VARS CODEINDICATOR)
	(GLOBALVARS CODEINDICATOR)
	(PROP CODEREADER * (LIST CODEINDICATOR))
	(FNS EQDEFP)
	[COMS (* utilities)
	      (FNS \FINDOP)
	      (VARS \OPCODES)
	      (ADDVARS (\OPCODEARRAY))
	      (GLOBALVARS \OPCODEARRAY \OPCODES)
	      (DECLARE: EVAL@COMPILE DONTCOPY (EXPORT (MACROS DPUTCODE MCODEP)
						      (MACROS CODELT CODELT2 CODESETA2 CODESETA)
						      (ADDVARS (SYSSPECVARS CA))
						      (RECORDS CODEARRAY)
						      (RECORDS OPCODE)
						      (GLOBALVARS \OPCODES)
						      (CONSTANTS PVARCODE FVARCODE IVARCODE 
								 VARCODEMASK]
	(COMS (* for MAKEINIT and READSYS)
	      (DECLARE: DONTCOPY (ADDVARS (INEWCOMS
					    (FNS DCODERD)
					    [VARS \OPCODES (CODERDTBL (COPYREADTABLE (QUOTE ORIG]
					    (P (SETSYNTAX (CHARCODE ↑Y)
							  [QUOTE (MACRO (LAMBDA (FILE RDTBL)
										(EVALFORMAKEINIT
										  (READ FILE RDTBL]
							  CODERDTBL)))
					  (MKI.SUBFNS (\CODEARRAY . SCRATCHARRAY)
						      (DPUTCODE . I.PUTDEFN)
						      (CODERDTBL . I.CODERDTBL))
					  (EXPANDMACROFNS CODELT CODELT2 CODESETA CODESETA2 DPUTCODE 
							  MCODEP)
					  (RDCOMS (FNS \FINDOP)
						  (VARS \OPCODES)
						  (VARS (\OPCODEARRAY))
						  (GLOBALVARS \OPCODEARRAY \OPCODES)
						  (DECLARE: DONTCOPY (RECORDS OPCODE)))
					  (RD.SUBFNS (CODELT . VGETBASEBYTE)
						     (CODESETA . VPUTBASEBYTE])



(* reading in compiled code)

(DEFINEQ

(DCODERD
  [LAMBDA (FN)                                               (* JonL "31-Dec-83 22:25")
    (READC)
    (PROG ((COFD (GETOFD)))
          (PROG ((NAMETABLE (PROG1 (READ NIL CODERDTBL)
				   (READC)))
		 (CODELEN (IPLUS (LLSH (\BIN COFD)
				       8)
				 (\BIN COFD)))
		 (NLOCALS (\BIN COFD))
		 (NFREEVARS (\BIN COFD))
		 (ARGTYPE (\BIN COFD))
		 (NARGS (\BIN COFD))
		 (NTSIZE 0)
		 (FRAMENAME FN)
		 REALSIZE STARTPC NTWORDS CA FVAROFFSET LOCALARGS STARTLOCALS LOCALSIZE)
	        [COND
		  ((EQ (CAR NAMETABLE)
		       (QUOTE NAME))
		    (SETQ FRAMENAME (CADR NAMETABLE))
		    (SETQ NAMETABLE (CDDR NAMETABLE]
	        [COND
		  ((EQ (CAR NAMETABLE)
		       (QUOTE L))
		    (SETQ LOCALARGS (CADR NAMETABLE))
		    (SETQ NAMETABLE (CDDR NAMETABLE]
	        [COND
		  (NAMETABLE                                 (* NAMETABLE now is a sequence of flat triples, one per 
							     name to be stored in nametable)
			     (on NAMETABLE by CDDDR do (add NTSIZE 1))
			     (SETQ NTSIZE (CEIL (ADD1 NTSIZE)
						WORDSPERQUAD]
	        [SETQ NTWORDS (COND
		    (NAMETABLE (IPLUS NTSIZE NTSIZE))
		    (T (CONSTANT WORDSPERQUAD]

          (* NameTable must end in quadword which ends in 0 -
	  thus, round down and add a quad -
	  NTWORDS is the number of words allocated for nametable)


	        (SETQ STARTPC (UNFOLD (IPLUS (fetch (CODEARRAY OVERHEADWORDS) of T)
					     NTWORDS)
				      BYTESPERWORD))         (* initial pc for the function: after fixed header and 
							     double nametable)
	        [COND
		  (LOCALARGS (SETQ STARTLOCALS STARTPC)      (* Insert an extra nametable between the real one and 
							     the start pc where we store localvar args)
			     (SETQ LOCALSIZE (CEIL (ADD1 (FOLDLO (FLENGTH LOCALARGS)
								 2))
						   (IQUOTIENT WORDSPERQUAD 2)))
                                                             (* Number of words in half this nametable: must end in 
							     zero, when doubled is quad-aligned)
			     (SETQ LOCALSIZE (UNFOLD LOCALSIZE BYTESPERWORD))
                                                             (* size in bytes now)
			     (add STARTPC (UNFOLD LOCALSIZE 2]
	        (SETQ REALSIZE (CEIL (IPLUS STARTPC CODELEN)
				     BYTESPERQUAD))
	        (SETQ CA (\CODEARRAY REALSIZE (CEIL (ADD1 (FOLDHI STARTPC BYTESPERCELL))
						    CELLSPERQUAD)))
	        (AIN CA STARTPC CODELEN COFD)                (* Now build the name table, which has two parallel 
							     parts: the names, and where to find them on the stack)
	        (for X on NAMETABLE by (CDDDR X) as NT1 from (ADD1 (UNFOLD (fetch (CODEARRAY 
										    OVERHEADWORDS)
									      of T)
									   BYTESPERWORD))
		   by (CONSTANT BYTESPERWORD) bind (NTBYTESIZE ←(UNFOLD NTSIZE BYTESPERWORD))
		   do (\FIXCODENUM CA NT1 (\ATOMVALINDEX (CADDR X))
				   -1)                       (* Insert the name into first half of table)
		      (\FIXCODENUM CA (IPLUS NT1 NTBYTESIZE)
				   (IPLUS (CADR X)
					  (SELECTQ (CAR X)
						   (P (CONSTANT PVARCODE))
						   (F (OR FVAROFFSET (SETQ FVAROFFSET
							    (FOLDLO NT1 BYTESPERWORD)))
                                                             (* Save word offset of first FVAR in nametable, so ucode
							     can easily access FVAR n)
						      (CONSTANT FVARCODE))
						   (I (CONSTANT IVARCODE))
						   (SHOULDNT)))
				   -1)                       (* Code type and index into second half)
		      )
	        [COND
		  (LOCALARGS                                 (* Build invisible name table for locals)
			     (for X on LOCALARGS by (CDDR X) as NT from (ADD1 STARTLOCALS)
				by BYTESPERWORD
				do (\FIXCODENUM CA NT (\ATOMVALINDEX (CADR X))
						-1)          (* Name in first half)
				   (\FIXCODENUM CA (IPLUS NT LOCALSIZE)
						(IPLUS (CAR X)
						       (CONSTANT IVARCODE))
						-1)          (* index in second half)
				   ]
	        (PROGN                                       (* Fill in function header)
		       (replace (CODEARRAY NA) of CA with (COND
							    ((EQ ARGTYPE 2)
							      -1)
							    (T NARGS)))
		       (replace (CODEARRAY PV) of CA with (SUB1 (FOLDHI (IPLUS NLOCALS NFREEVARS)
									CELLSPERQUAD)))
		       (replace (CODEARRAY STARTPC) of CA with STARTPC)
		       (replace (CODEARRAY ARGTYPE) of CA with ARGTYPE)
		       (replace (CODEARRAY FRAMENAME) of CA with FRAMENAME)
		       (replace (CODEARRAY NTSIZE) of CA with NTSIZE)
		       (replace (CODEARRAY NLOCALS) of CA with NLOCALS)
		       (replace (CODEARRAY FVAROFFSET) of CA with (OR FVAROFFSET 0))
		       (replace (CODEARRAY FIXED) of CA with T))
	        (for X on (READ NIL CODERDTBL) by (CDDR X) do (\FIXCODENUM CA (IPLUS (CAR X)
										     STARTPC)
									   (\ATOMDEFINDEX
									     (CADR X))
									   -1))
	        (for X on (READ NIL CODERDTBL) by (CDDR X) do (\FIXCODENUM CA (IPLUS (CAR X)
										     STARTPC)
									   (\ATOMPNAMEINDEX
									     (CADR X))
									   -1))
	        [for X on (READ NIL CODERDTBL) by (CDDR X) do (\FIXCODEPTR CA (IPLUS (CAR X)
										     STARTPC)
									   (EVQ (CADR X]
	        (DPUTCODE FN CA (IPLUS STARTPC CODELEN])

(DCODESKIP
  [LAMBDA (FN FLG)                                           (* lmm " 2-DEC-81 23:52")
    (READC)
    (RESETVARS ((FILERDTBL CODERDTBL))
	       (PROG ((P (AND FLG (GETFILEPTR)))
		      LC
		      (COFD (GETOFD)))
		     (SKREAD)
		     (READC)
		     (SETQ LC (IPLUS (LLSH (\BIN COFD)
					   8)
				     (\BIN COFD)))
		     (\BIN COFD)
		     (\BIN COFD)
		     (\BIN COFD)
		     (\BIN COFD)
		     (SETFILEPTR NIL (IPLUS (GETFILEPTR)
					    LC))
		     (SKREAD)
		     (SKREAD)
		     (SKREAD)
		     (READC)
		     (COND
		       (FLG (PRIN2 FN)
			    (SPACES 1)
			    (PRINT CODEINDICATOR)
			    (COPYBYTES NIL NIL P (GETFILEPTR])

(\RENAMEDFN
  [LAMBDA (DEF FN)                                           (* lmm "15-OCT-81 00:34")
                                                             (* USED BY PUTD WHEN DOING MOVDS FROM ONE FUNCTION TO 
							     ANOTHER)
    (PROG (NEWCA (SIZE (ARRAYSIZE DEF))
		 (FB (fetch (CODEARRAY STARTPC) of DEF)))
          (SETQ NEWCA (\CODEARRAY SIZE (CEIL (ADD1 (FOLDHI FB BYTESPERCELL))
					     CELLSPERQUAD)))
          (for I from 0 to (SUB1 SIZE) do (CODESETA NEWCA I (CODELT DEF I)))
          (replace (CODEARRAY FRAMENAME) of NEWCA with FN)
          (RETURN NEWCA])

(\REALNAMEP
  [LAMBDA (X)                                                (* lmm "15-OCT-81 00:16")
    (AND (NEQ X (QUOTE ERRORSET))
	 (NEQ (NTHCHAR X 1)
	      (QUOTE \])
)

(RPAQ CODERDTBL (COPYREADTABLE (QUOTE ORIG)))
(DECLARE: DOEVAL@COMPILE DONTCOPY

(ADDTOVAR GLOBALVARS CODERDTBL FILERDTBL)
)
(SETSYNTAX 25 [QUOTE (MACRO (LAMBDA (FILE RDTBL)
				    (EVAL (READ FILE RDTBL]
	   CODERDTBL)
(DECLARE: EVAL@COMPILE DONTCOPY DONTEVAL@LOAD 
(FILESLOAD (LOADCOMP)
	   MODARITH RENAMEMACROS)

(SELECTQ (COMPILEMODE)
	 ((D ALTO)
	  NIL)
	 (FILESLOAD (LOADCOMP)
		    DCODEFOR10))
)

(RPAQQ CODEINDICATOR D1)
(DECLARE: DOEVAL@COMPILE DONTCOPY

(ADDTOVAR GLOBALVARS CODEINDICATOR)
)

(PUTPROPS D1 CODEREADER (DCODERD . DCODESKIP))
(DEFINEQ

(EQDEFP
  [LAMBDA (CA1 CA2)                                          (* lmm "16-MAY-82 19:43")
                                                             (* determines whether two code arrays CA1 and CA2 are 
							     equivalent (same except for framename))
    (AND (EQ (ARRAYTYP CA1)
	     (QUOTE CODE))
	 (EQ (ARRAYTYP CA2)
	     (QUOTE CODE))
	 (for I from 0 to (SUB1 (IMIN (ARRAYSIZE CA1)
				      (ARRAYSIZE CA2)))
	    always (OR (EQ (CODELT CA1 I)
			   (CODELT CA2 I))
		       (AND (IGEQ I (fetch FRAMENAME# of CA1))
			    (ILESSP I (IPLUS (fetch FRAMENAME# of CA1)
					     BYTESPERCELL])
)



(* utilities)

(DEFINEQ

(\FINDOP
  [LAMBDA (OPNAME FLG)                                       (* lmm " 5-SEP-81 23:37")
    (ALLOCAL (PROGN [OR \OPCODEARRAY (PROGN (SETQ \OPCODEARRAY (ARRAY 256))
					    (for X in \OPCODES
					       do (PUTPROP (fetch OPCODENAME of X)
							   (QUOTE DOPCODE)
							   X)
						  (for I from (fetch OP# of X)
						     to (OR (fetch OPLAST of X)
							    (fetch OP# of X))
						     by 1 do (SETA \OPCODEARRAY (ADD1 I)
								   X]
		    (OR [COND
			  ((LITATOM OPNAME)
			    (GETPROP OPNAME (QUOTE DOPCODE)))
			  ((FIXP OPNAME)
			    (ELT \OPCODEARRAY (ADD1 OPNAME]
			(AND FLG (ERROR OPNAME FLG])
)

(RPAQQ \OPCODES ((248 FLOATBLT 0 T -4 NIL \FLOATBLT)
		 (249 FFTSTEP 0 T -1 NIL \FFTSTEP)
		 (250 unused NIL NIL NIL 252)
		 (0 -X- 0)
		 (1 CAR 0 T 0 NIL \CAR.UFN)
		 (2 CDR 0 T 0 NIL \CDR.UFN)
		 (3 LISTP 0 T 0 NIL LISTP)
		 (4 NTYPX 0 T 0 NIL NTYPX)
		 (5 TYPEP 1 TYPEP 0)
		 (6 DTEST 2 ATOM 0 NIL \DTESTFAIL)
		 (7 CDDR 0 T 0 NIL CDDR)
		 (8 FN0 2 FN 1)
		 (9 FN1 2 FN 0)
		 (10 FN2 2 FN -1)
		 (11 FN3 2 FN -2)
		 (12 FN4 2 FN -3)
		 (13 FNX 3 FNX FNX)
		 (14 APPLYFN 0 T -1)
		 (15 CHECKAPPLY* 0 T 0 NIL \CHECKAPPLY*)
		 (16 RETURN 0 T 0 NIL \HARDRETURN)
		 (17 BIND 2)
		 (18 UNBIND 0)
		 (19 DUNBIND 0)
		 (20 RPLPTR.N 1 T -1 NIL \RPLPTR.UFN)
		 (21 GCREF 1 T 0 NIL \HTFIND)
		 (22 was.htfind 0 T)
		 (23 GVAR← 2 ATOM 0 NIL \SETGLOBALVAL.UFN)
		 (24 RPLACA 0 T -1 NIL \RPLACA.UFN)
		 (25 RPLACD 0 T -1 NIL \RPLACD.UFN)
		 (26 CONS 0 T -1 NIL \CONS.UFN)
		 (27 GETP 0 T -1 NIL GETPROP)
		 (28 FMEMB 0 T -1 NIL FMEMB)
		 (29 GETHASH 0 T -1 NIL GETHASH)
		 (30 PUTHASH 0 T -2 NIL PUTHASH)
		 (31 CREATECELL 0 T 0 NIL \CREATECELL)
		 (32 BIN 0 T 0 NIL \BIN)
		 (33 BOUT 0 T -1 NIL \BOUT)
		 (34 BITBLT 0 T -1 NIL BitBltSUBR)
		 (35 LIST1 0 T 0 NIL CONS)
		 (36 DOCOLLECT 0 T -1 NIL DOCOLLECT)
		 (37 ENDCOLLECT 0 T -1 NIL ENDCOLLECT)
		 (38 RPLCONS 0 T -1 NIL \RPLCONS)
		 (39 unused)
		 (40 ELT 0 T -1 NIL ELT)
		 (41 NTHCHC 0 T -1 NIL NTHCHARCODE)
		 (42 SETA 0 T -2 NIL SETA)
		 (43 RPLCHARCODE 0 T -2 NIL RPLCHARCODE)
		 (44 EVAL 0 T 0 NIL \EVAL)
		 (45 EVALV 0 T 0 NIL \EVALV1)
		 (46 unused)
		 (47 STKSCAN 0 T 0 NIL \STKSCAN)
		 (48 unused NIL NIL NIL 58)
		 (59 \MU.DRAWLINE 0 T -8 NIL \DRAWLINE.UFN)
		 (60 STORE.N 1 T 0)
		 (61 COPY.N 1 T 1)
		 (62 RAID 0 T 0 NIL RAID)
		 (63 \RETURN 0 T 0 NIL \RETURN)
		 (64 IVAR 0 IVAR 1 70)
		 (71 IVARX 1 IVAR 1)
		 (72 PVAR 0 PVAR 1 78)
		 (79 PVARX 1 PVAR 1)
		 (80 FVAR 0 FVAR 1 86)
		 (87 FVARX 1 FVAR 1)
		 (88 PVAR← 0 PVAR 0 94)
		 (95 PVARX← 1 PVAR 0)
		 (96 GVAR 2 ATOM 1)
		 (97 ARG0 0 T 0 NIL \ARG0)
		 (98 IVARX← 1 IVAR 0)
		 (99 FVARX← 1 FVAR 0)
		 (100 COPY 0 T 1)
		 (101 MYARGCOUNT 0 T 1 NIL \MYARGCOUNT)
		 (102 MYALINK 0 T 1)
		 (103 ACONST 2 ATOM 1)
		 (104 'NIL 0 T 1)
		 (105 'T 0 T 1)
		 (106 '0 0 T 1)
		 (107 '1 0 T 1)
		 (108 SIC 1 SIC 1)
		 (109 SNIC 1 SNIC 1)
		 (110 SICX 2 SICX 1)
		 (111 GCONST 3 GCONST 1)
		 (112 ATOMNUMBER 2 ATOM 1)
		 (113 READFLAGS 0 T 0 NIL \READFLAGS)
		 (114 READRP 0 T 0 NIL \READRP)
		 (115 WRITEMAP 0 T -2 NIL \WRITEMAP)
		 (116 READPRINTERPORT 0 T 1 NIL NILL)
		 (117 WRITEPRINTERPORT 0 T 0 NIL NILL)
		 (118 PILOTBITBLT 0 T -1 NIL \PILOTBITBLT)
		 (119 RCLK 0 T 0 NIL \RCLKSUBR)
		 (120 MISC1 1 T 0 NIL \MISC1.UFN)
		 (121 MISC2 1 T -1 NIL \MISC2.UFN)
		 (122 RECLAIMCELL 0 T 0 NIL \GCRECLAIMCELL)
		 (123 GCSCAN1 0 T 0 NIL \GCSCAN1)
		 (124 GCSCAN2 0 T 0 NIL \GCSCAN2)
		 (125 SUBRCALL 2)
		 (126 CONTEXTSWITCH 0 T 0 NIL \CONTEXTSWITCH)
		 (127 AUDIO 0 T 0 NIL NILL)
		 (128 JUMP 0 JUMP JUMP 143)
		 (144 FJUMP 0 JUMP CJUMP 159)
		 (160 TJUMP 0 JUMP CJUMP 175)
		 (176 JUMPX 1 JUMPX JUMP)
		 (177 JUMPXX 2 JUMPXX JUMP)
		 (178 FJUMPX 1 JUMPX CJUMP)
		 (179 TJUMPX 1 JUMPX CJUMP)
		 (180 NFJUMPX 1 JUMPX NCJUMP)
		 (181 NTJUMPX 1 JUMPX NCJUMP)
		 (182 jeq)
		 (183 jlistp)
		 (184 PVAR←↑ 0 PVAR -1 190)
		 (191 POP 0 T -1)
		 (192 was.getbase)
		 (193 was.getbaseptr)
		 (194 GETBASEBYTE 0 T -1 NIL \GETBASEBYTE)
		 (195 was.scanbase)
		 (196 BLT 0 T -2 NIL \BLT)
		 (197 was.putbase)
		 (198 was.putbaseptr)
		 (199 PUTBASEBYTE 0 T -2 NIL \PUTBASEBYTE)
		 (200 GETBASE.N 1 T 0)
		 (201 GETBASEPTR.N 1 T 0)
		 (202 GETBITS.N.FD 2 T 0)
		 (203 unused)
		 (204 unused)
		 (205 PUTBASE.N 1 T -1 NIL \PUTBASE.UFN)
		 (206 PUTBASEPTR.N 1 T -1 NIL \PUTBASEPTR.UFN)
		 (207 PUTBITS.N.FD 2 T -1 NIL \PUTBITS.UFN)
		 (208 ADDBASE 0 T -1 NIL \ADDBASE)
		 (209 VAG2 0 T -1 NIL \VAG2)
		 (210 HILOC 0 T 0)
		 (211 LOLOC 0 T 0)
		 (212 PLUS2 0 T -1 NIL PLUS)
		 (213 DIFFERENCE 0 T -1 NIL DIFFERENCE)
		 (214 TIMES2 0 T -1 NIL TIMES)
		 (215 QUOTIENT 0 T -1 NIL QUOTIENT)
		 (216 IPLUS2 0 T -1 NIL \SLOWIPLUS2)
		 (217 IDIFFERENCE 0 T -1 NIL \SLOWIDIFFERENCE)
		 (218 ITIMES2 0 T -1 NIL \SLOWITIMES2)
		 (219 IQUOTIENT 0 T -1 NIL \SLOWIQUOTIENT)
		 (220 IREMAINDER 0 T -1 NIL IREMAINDER)
		 (221 IPLUS.N 1 T 0 NIL \SLOWIPLUS2)
		 (222 IDIFFERENCE.N 1 T 0 NIL \SLOWIDIFFERENCE)
		 (223 unused)
		 (224 LLSH1 0 T 0 NIL \SLOWLLSH1)
		 (225 LLSH8 0 T 0 NIL \SLOWLLSH8)
		 (226 LRSH1 0 T 0 NIL \SLOWLRSH1)
		 (227 LRSH8 0 T 0 NIL \SLOWLRSH8)
		 (228 LOGOR2 0 T -1 NIL \SLOWLOGOR2)
		 (229 LOGAND2 0 T -1 NIL \SLOWLOGAND2)
		 (230 LOGXOR2 0 T -1 NIL \SLOWLOGXOR2)
		 (231 unused)
		 (232 FPLUS2 0 T -1 NIL FPLUS2)
		 (233 FDIFFERENCE 0 T -1 NIL FDIFFERENCE)
		 (234 FTIMES2 0 T -1 NIL FTIMES2)
		 (235 FQUOTIENT 0 T -1 NIL FQUOTIENT)
		 (236 unused NIL NIL NIL 239)
		 (240 EQ 0 T -1)
		 (241 IGREATERP 0 T -1 NIL \SLOWIGREATERP)
		 (242 FGREATERP 0 T -1 NIL FGREATERP)
		 (243 GREATERP 0 T -1 NIL GREATERP)
		 (244 unused)
		 (245 MAKENUMBER 0 T -1 NIL \MAKENUMBER)
		 (246 BOXIPLUS 0 T -1 NIL \BOXIPLUS)
		 (247 BOXIDIFFERENCE 0 T -1 NIL \BOXIDIFFERENCE)
		 (248 unused NIL NIL NIL 252)
		 (253 SWAP 0 T 0)
		 (254 NOP 0 T 0)
		 (255 UPCTRACE 0 T 0 NIL NILL)))

(ADDTOVAR \OPCODEARRAY )
(DECLARE: DOEVAL@COMPILE DONTCOPY

(ADDTOVAR GLOBALVARS \OPCODEARRAY \OPCODES)
)
(DECLARE: EVAL@COMPILE DONTCOPY 
(* FOLLOWING DEFINITIONS EXPORTED)


(DECLARE: EVAL@COMPILE 

(PUTPROPS DPUTCODE MACRO ((FN CA SIZE)
			  (SELECTQ (SYSTEMTYPE)
				   (D (DEFC FN CA))
				   (/PUTPROP FN (QUOTE DCODE)
					     CA))))

(PUTPROPS MCODEP MACRO [(X)
			(OR (ARRAYP X)
			    (AND (LITATOM X)
				 (ARRAYP (SELECTQ (SYSTEMTYPE)
						  (D (GETD X))
						  (GETPROP X (QUOTE DCODE])
)
(DECLARE: EVAL@COMPILE 

(PUTPROPS CODELT MACRO ((CA N)
			(\BYTELT CA N)))

(PUTPROPS CODELT2 MACRO [OPENLAMBDA (DEF LC)
				    (LOGOR (LLSH (CODELT DEF LC)
						 BITSPERBYTE)
					   (CODELT DEF (ADD1 LC])

(PUTPROPS CODESETA2 MACRO [OPENLAMBDA (DEF LC VALUE)
				      (CODESETA DEF LC (LRSH VALUE BITSPERBYTE))
				      (CODESETA DEF (ADD1 LC)
						(IMOD VALUE (CONSTANT (LLSH 1 BITSPERBYTE])

(PUTPROPS CODESETA MACRO ((CA N NV)
			  (\BYTESETA CA N NV)))
)

(ADDTOVAR SYSSPECVARS CA)
[DECLARE: EVAL@COMPILE 

(ACCESSFNS CODEARRAY ((STKMIN (CODELT2 DATUM 0)
			      (CODESETA2 DATUM 0 NEWVALUE))
	    (NA (SIGNED (CODELT2 DATUM 2)
			BITSPERWORD)
		(CODESETA2 DATUM 2 (UNSIGNED NEWVALUE BITSPERWORD)))
	    (PV (SIGNED (CODELT2 DATUM 4)
			BITSPERWORD)
		(CODESETA2 DATUM 4 (UNSIGNED NEWVALUE BITSPERWORD)))
	    (STARTPC (CODELT2 DATUM 6)
		     (CODESETA2 DATUM 6 NEWVALUE))
	    [ARGTYPE (LOGAND (LRSH (CODELT DATUM 8)
				   4)
			     3)
		     (CODESETA DATUM 8 (LOGOR (LOGAND (CODELT DATUM 8)
						      65487)
					      (LLSH (LOGAND NEWVALUE 3)
						    4]
	    (FRAMENAME (\VAG2 (CODELT DATUM 9)
			      (CODELT2 DATUM 10))
		       (\FIXCODEPTR DATUM 11 (EVQ NEWVALUE)))
	    (NTSIZE (CODELT2 DATUM 12)
		    (CODESETA2 DATUM 12 NEWVALUE))
	    (NLOCALS (CODELT DATUM 14)
		     (CODESETA DATUM 14 NEWVALUE))
	    (FVAROFFSET (CODELT DATUM 15)
			(CODESETA DATUM 15 NEWVALUE)))
	   [ACCESSFNS CODEARRAY
		      ((LSTARP (ILESSP (fetch (CODEARRAY NA) of DATUM)
				       0))
		       (OVERHEADWORDS (PROGN 8))
		       (ALIGNED (IPLUS (fetch (CODEARRAY NTSIZE) of DATUM)
				       (fetch (CODEARRAY OVERHEADWORDS) of T)))
		       (FIXED NIL (replace (CODEARRAY STKMIN) of DATUM
				     with (IPLUS (UNFOLD (IPLUS (fetch (CODEARRAY NA) of DATUM)
								(UNFOLD (ADD1 (fetch (CODEARRAY
										       PV)
										 of DATUM))
									CELLSPERQUAD))
							 WORDSPERCELL)
						 12 32)))
		       (FRAMENAME# (PROGN 8])
]
[DECLARE: EVAL@COMPILE 

(RECORD OPCODE (OP# OPCODENAME OPNARGS OPPRINT LEVADJ OPLAST UFNFN))
]
(DECLARE: DOEVAL@COMPILE DONTCOPY

(ADDTOVAR GLOBALVARS \OPCODES)
)
(DECLARE: EVAL@COMPILE 

(RPAQQ PVARCODE 32768)

(RPAQQ FVARCODE 49152)

(RPAQQ IVARCODE 0)

(RPAQQ VARCODEMASK 49152)

(CONSTANTS PVARCODE FVARCODE IVARCODE VARCODEMASK)
)


(* END EXPORTED DEFINITIONS)

)



(* for MAKEINIT and READSYS)

(DECLARE: DONTCOPY 

(ADDTOVAR INEWCOMS (FNS DCODERD)
		   [VARS \OPCODES (CODERDTBL (COPYREADTABLE (QUOTE ORIG]
		   (P (SETSYNTAX (CHARCODE ↑Y)
				 [QUOTE (MACRO (LAMBDA (FILE RDTBL)
						       (EVALFORMAKEINIT (READ FILE RDTBL]
				 CODERDTBL)))

(ADDTOVAR MKI.SUBFNS (\CODEARRAY . SCRATCHARRAY)
		     (DPUTCODE . I.PUTDEFN)
		     (CODERDTBL . I.CODERDTBL))

(ADDTOVAR EXPANDMACROFNS CODELT CODELT2 CODESETA CODESETA2 DPUTCODE MCODEP)

(ADDTOVAR RDCOMS (FNS \FINDOP)
		 (VARS \OPCODES)
		 (VARS (\OPCODEARRAY))
		 (GLOBALVARS \OPCODEARRAY \OPCODES)
		 (DECLARE: DONTCOPY (RECORDS OPCODE)))

(ADDTOVAR RD.SUBFNS (CODELT . VGETBASEBYTE)
		    (CODESETA . VPUTBASEBYTE))
)
(PUTPROPS LLCODE COPYRIGHT ("Xerox Corporation" 1981 1982 1983 1984))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (2195 9171 (DCODERD 2205 . 7685) (DCODESKIP 7687 . 8350) (\RENAMEDFN 8352 . 8988) (
\REALNAMEP 8990 . 9169)) (9738 10405 (EQDEFP 9748 . 10403)) (10428 11134 (\FINDOP 10438 . 11132)))))
STOP