(FILECREATED "10-Sep-86 13:05:59" {ERIS}<TAMARIN>UCODE>RELOAD.;30 6017   

      changes to:  (FNS RELOADEMULATOR)

      previous date: " 2-Sep-86 10:39:58" {ERIS}<TAMARIN>UCODE>RELOAD.;29)


(* Copyright (c) 1986 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT RELOADCOMS)

(RPAQQ RELOADCOMS ((FNS RELOADEMULATOR LOADLATEST LOADTAMOPCODES MAKETAMOPCODEARRAY2 PUTTAM DOMAKE))
)
(DEFINEQ

(RELOADEMULATOR
  [LAMBDA (NOSRC)                                            (* edited: "10-Sep-86 13:05")
    (LOAD? (QUOTE {eris}<Lisp>Koto>Library>EXPORTS.ALL))
    (CNDIR (QUOTE {ERIS}<TAMARIN>UCODE>))
    (LOADLATEST (QUOTE TAMARINEMULATOR)
		  NOSRC)
    (LOADLATEST (QUOTE MICROASSEMBLER)
		  NOSRC)
    (LOADLATEST (QUOTE EMULATORSUPPORT)
		  NOSRC)
    (LOADLATEST (QUOTE GENERATETAM)
		  NOSRC)
    (LOAD? (QUOTE LLB.DCOM))
    (LOAD? (QUOTE TESTOPS))
    (CNDIR (QUOTE {ERIS}<TAMARIN>WORK>SIMULATE>))
    (LOADLATEST (QUOTE TSIMULATE)
		  NOSRC)
    (LOADLATEST (QUOTE TACCESS)
		  NOSRC)
    (LOADLATEST (QUOTE TOPEDIT)
		  NOSRC)
    (LOADTAMOPCODES)
    (MAKETAMOPCODEARRAY2)
    (CNDIR (QUOTE {ERIS}<TAMARIN>TSIM>))
    (LOADLATEST (QUOTE SIMCOMPARES)
		  NOSRC)
    (LOADLATEST (QUOTE NoRefCount)
		  T)
    (LOADLATEST (QUOTE SIM)
		  NOSRC)
    (LOADLATEST (QUOTE SIMSUPPORT)
		  NOSRC)
    (CNDIR (QUOTE {ERIS}<TAMARIN>UCODE>])

(LOADLATEST
  [LAMBDA (FNAME NOSRC)                                      (* rtk "13-Jun-86 18:19")
    (PROG [(DN (MKATOM (CONCAT FNAME ".DCOM"]
	    (PROG ((DCOMDATE NIL)
		     (SRCDATE NIL)
		     (FSRCNAME (INFILEP FNAME))
		     (FDCOMNAME (INFILEP DN))
		     (CURRSRCDATE NIL)
		     (CURRDCOMDATE NIL)
		     (DCOMLOADNAME NIL)
		     (SRCLOADNAME NIL)
		     DCOMFLAG)
		    [if FDCOMNAME
			then (SETQ DCOMDATE (GETFILEINFO DN (QUOTE ICREATIONDATE]
		    [if FSRCNAME
			then (SETQ SRCDATE (GETFILEINFO FNAME (QUOTE ICREATIONDATE]
		    (if (FMEMB FSRCNAME LOADEDFILELST)
			then (SETQ SRCLOADNAME FSRCNAME))
		    (if (AND (FMEMB FDCOMNAME LOADEDFILELST)
				 DCOMDATE SRCDATE (GREATERP DCOMDATE SRCDATE))
			then (SETQ DCOMLOADNAME FDCOMNAME))
		    (SETQ DCOMFLAG NIL)
		    (if [AND DCOMDATE (OR (NOT SRCDATE)
						(AND (GREATERP DCOMDATE SRCDATE)
						       (NOT DCOMLOADNAME]
			then (PRINTOUT T "Loading Dcom: " DN T)
			       (LOAD DN)
			       (SETQ DCOMLOADNAME FDCOMNAME)
			       (SETQ DCOMFLAG (QUOTE PROP)))
		    (if [OR (EQ NOSRC (QUOTE ALL))
				(AND DCOMFLAG (NOT NOSRC))
				(AND SRCDATE (NOT (EQUAL FSRCNAME SRCLOADNAME))
				       (OR (NOT NOSRC)
					     (NOT DCOMFLAG]
			then (if DCOMLOADNAME
				   then (SETQ DCOMFLAG (QUOTE PROP)))
			       (PRINTOUT T "Loading Source: " FNAME)
			       (if DCOMFLAG
				   then (PRINTOUT T " Prop"))
			       (PRINTOUT T T)
			       (LOAD FNAME DCOMFLAG)
			       (SETQ SRCLOADNAME FSRCNAME])

(LOADTAMOPCODES
  [LAMBDA NIL                                                (* rtk "21-May-86 11:13")
    (PROG (PROP (THEFILE ""))
	    (PRINT "READING TAMARIN OPCODES")
	    (SETQ THEFILE (OPENFILE (QUOTE TAMOPS)
					(QUOTE INPUT)))
	    (SETQ PROP (READ THEFILE))
	    (SETQ \TAMOPCODES (HREAD THEFILE))
	    (CLOSEF THEFILE)
	    (PRINT "SETTING TAMARIN PROPERTIES")
	    (for I in \TAMOPCODES do (PUTPROP (fetch (TOPCODE OPCODENAME) of I)
						      PROP I])

(MAKETAMOPCODEARRAY2
  [LAMBDA NIL                                                (* rtk "18-Mar-86 07:48")
    (LET (OPNUM LOCARR)
         (SETQ LOCARR (ARRAY 256 (QUOTE POINTER)
				 NIL 0))
         (PRINT "MAKEING   \TAMOPCODEARRAY")
         (for I in \TAMOPCODES
	    do (PUTPROP (fetch (TOPCODE OPCODENAME) of I)
			    (QUOTE TOPCODE)
			    I)
		 (SETQ OPNUM (fetch (TOPCODE OP#) of I))
		 (if (LISTP OPNUM)
		     then (for J from (CAR OPNUM) to (CADR OPNUM)
			       do (SETA LOCARR J I))
		   else (SETA LOCARR OPNUM I)))
         (SETQ \TAMOPCODEARRAY LOCARR])

(PUTTAM
  [LAMBDA (logot)                                            (* edited: " 2-Sep-86 10:39")
    (PROG ((DUMPFILES (for I in FILELST when (GREATERP (LENGTH (GETPROP I (QUOTE
											FILE)))
								 1)
			   collect I)))
	    (CLOSEALL)
	    (CNDIR (QUOTE {ERIS}<TAMARIN>WORK>SIMULATE>))
	    (DOMAKE DUMPFILES (QUOTE TSIMULATE)
		      (QUOTE (C ST)))
	    (DOMAKE DUMPFILES (QUOTE TACCESS)
		      (QUOTE (C ST)))
	    (CNDIR (QUOTE {ERIS}<TAMARIN>TSIM))
	    (DOMAKE DUMPFILES (QUOTE SIMCOMPARES)
		      (QUOTE (C ST)))
	    (DOMAKE DUMPFILES (QUOTE SIM)
		      (QUOTE (C ST)))
	    (DOMAKE DUMPFILES (QUOTE SIMSUPPORT)
		      (QUOTE (C ST)))
	    (CNDIR (QUOTE {ERIS}<TAMARIN>UCODE))
	    (DOMAKE DUMPFILES (QUOTE TESTOPS))
	    (DOMAKE DUMPFILES (QUOTE MICROASSEMBLER)
		      (QUOTE (C ST)))
	    (InitEmulator T)
	    (AUCode)
	    (DOMAKE DUMPFILES (QUOTE TAMARINEMULATOR)
		      (QUOTE (C ST)))
	    (DOMAKE DUMPFILES (QUOTE EMULATORSUPPORT)
		      (QUOTE (C ST)))
	    (DOMAKE DUMPFILES (QUOTE GENERATETAM)))
    (if logot
	then (LOGOUT])

(DOMAKE
  [LAMBDA (DUMPFILES FNAME OPTIONS)                          (* rtk "17-Jun-86 10:42")
    (if (FMEMB FNAME DUMPFILES)
	then (MAKEFILE FNAME OPTIONS])
)
(PUTPROPS RELOAD COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (402 5940 (RELOADEMULATOR 412 . 1518) (LOADLATEST 1520 . 3245) (LOADTAMOPCODES 3247 . 
3793) (MAKETAMOPCODEARRAY2 3795 . 4486) (PUTTAM 4488 . 5754) (DOMAKE 5756 . 5938)))))
STOP