(FILECREATED "26-Feb-85 12:10:41" {ERIS}<LISPCORE>SOURCES>DMISC.;25 44710 changes to: (VARS DMISCCOMS) (FNS BLKFLOATP2COMP BLKSMALLP2FLOAT BLKMAG BLKEXPONENT BLKSEP BLKFDIFF BLKFPLUS BLKPERM BLKFTIMES IBLT1 IBLT2 \MISC3.UFN \MISC4.UFN \MISC5.UFN \MISC8.UFN) previous date: "14-Feb-85 23:33:21" {ERIS}<LISPCORE>SOURCES>DMISC.;23) (* Copyright (c) 1982, 1983, 1984, 1985 by Xerox Corporation. All rights reserved. The following program was created in 1982 but has not been published within the meaning of the copyright law, is furnished under license, and may not be used, copied and/or disclosed except in accordance with the terms of said license.) (PRETTYCOMPRINT DMISCCOMS) (RPAQQ DMISCCOMS [[COMS (FNS BACKSPACEDEL) (DECLARE: DOCOPY DONTEVAL@LOAD (P (BACKSPACEDEL \ORIGTERMTABLE) (BACKSPACEDEL NIL] (COMS (* TIMEALL) (FNS TIMEALL COPYMISCSTATS COPYTIMESTATS CREATEMISCSTATS DIFFMISCSTATS DIFFTIMESTATS PRINTMISCSTATS PRINTMISCSTATSITEM) (DECLARE: DONTCOPY (RECORDS STATSOBJECT))) [COMS (FNS PERIODICALLYRECLAIM) (DECLARE: DONTEVAL@LOAD DOCOPY [INITVARS (RECLAIMWAIT 4) (\LASTRECLAIM (\DAYTIME0 (NCREATE (QUOTE FIXP] (APPENDVARS (BACKGROUNDFNS PERIODICALLYRECLAIM] (FNS APROPOS \APROPOS.MARGINSET) (COMS (FNS \DIRTYBACKGROUND \SAVEVMBACKGROUND COPYVM) (INITVARS (BACKGROUNDPAGEMIN 40) (BACKGROUNDPAGECNT 0) (BACKGROUNDPAGEFREQ 4)) (INITVARS (SAVINGCURSOR) (SAVEVMMAX 600) (SAVEVMWAIT 300)) (ADDVARS (BACKGROUNDFNS \DIRTYBACKGROUND) (TTYBACKGROUNDFNS \SAVEVMBACKGROUND)) (GLOBALVARS BACKGROUNDPAGEMIN BACKGROUNDPAGEFREQ BACKGROUNDPAGECNT)) (COMS (* Setting the time) (FNS SETTIME)) [COMS (* Bells and whistles) (FNS RINGBELLS FLASHWINDOW \DISMISS.WITHOUT.BLOCKING PLAYTUNE) (GLOBALRESOURCES \PlayTimer) (DECLARE: DONTEVAL@LOAD DOCOPY (* Overrides definition in the shared MISC) (P (MOVD (QUOTE RINGBELLS) (QUOTE PRINTBELLS] [COMS (* Changing display) (FNS DISPLAYDOWN SETDISPLAYHEIGHT VIDEORATE) (INITVARS (\VIDEORATE (QUOTE NORMAL))) (DECLARE: DONTEVAL@LOAD DOCOPY (ADDVARS (BREAKRESETFORMS (SETDISPLAYHEIGHT T)) (RESETFORMS (SETDISPLAYHEIGHT T] (DECLARE: DONTEVAL@LOAD DOCOPY (VARS (#EOLCHARS 1)) [P (OR (LISTP (EVALV (QUOTE EDITCHARACTERS))) (RPAQ EDITCHARACTERS (QUOTE (J X Z Y N] (ADDVARS (POSTGREETFORMS (CNDIR)) (LISPUSERSDIRECTORIES))) [COMS (PROP VARTYPE BAKTRACELST) (ALISTS (BREAKMACROS BT BTV BTVPP BT!) (BAKTRACELST EVAL APPLY)) (DECLARE: DONTEVAL@LOAD DOCOPY (INITVARS (CLEANUPOPTIONS (QUOTE (RC] (COMS (FNS DOAROUNDEXITFORMS) (ADDVARS (AROUNDEXITFNS DOAROUNDEXITFORMS) (BEFORELOGOUTFORMS) (AFTERLOGOUTFORMS))) (DECLARE: DONTEVAL@LOAD DOCOPY (INITVARS (ADVISEDFNS))) [COMS (* from FASTARRAYS) (FNS POINTERARRAY WORDARRAY FIXPARRAY) (P (MAPC (QUOTE ((ELT FASTELT FASTELTN FASTELTW) (SETA FASTSETA FASTSETAN FASTSETAW) (GETHASH IGETHASH) (PUTHASH IPUTHASH))) (FUNCTION (LAMBDA (X) (MAPC (CDR X) (FUNCTION (LAMBDA (Y) (MOVD? (CAR X) Y] (COMS (* Versions) (FNS REALMEMORYSIZE LISPVERSION MICROCODEVERSION BCPLVERSION REQUIREVERSION)) (COMS (* Misc ops) (FNS READPRINTERPORT WRITEPRINTERPORT \READPRINTERPORT.UFN \WRITEPRINTERPORT.UFN \MISC1.UFN \MISC2.UFN \MISC3.UFN \MISC4.UFN \MISC5.UFN \MISC6.UFN \MISC7.UFN \MISC8.UFN) (* sub-functions of floating-point ufns) (FNS BLKFLOATP2COMP BLKSMALLP2FLOAT BLKMAG BLKEXPONENT) (FNS BLKSEP BLKFDIFF BLKFPLUS BLKPERM BLKFTIMES) (FNS IBLT1 IBLT2)) (LOCALVARS . T) (DECLARE: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA) (NLAML TIMEALL) (LAMA]) (DEFINEQ (BACKSPACEDEL [LAMBDA (TTBL) (* lmm "24-JUN-80 23:16") (* Hack for causing char-delete to backspace display. Also suppress ## when reach the left margin. - This should be executed after the chardelete in TTBL has been established. - ERASECHARCODE is in INITCONSTANTS on LLPARAMS) (DELETECONTROL (QUOTE 1STCHDEL) (CHARACTER ERASECHARCODE) TTBL) (DELETECONTROL (QUOTE NTHCHDEL) (CHARACTER ERASECHARCODE) TTBL) (DELETECONTROL (QUOTE POSTCHDEL) "" TTBL) (DELETECONTROL (QUOTE EMPTYCHDEL) "" TTBL) (DELETECONTROL (QUOTE NOECHO) NIL TTBL) (ECHOCONTROL ERASECHARCODE (QUOTE REAL]) ) (DECLARE: DOCOPY DONTEVAL@LOAD (BACKSPACEDEL \ORIGTERMTABLE) (BACKSPACEDEL NIL) ) (* TIMEALL) (DEFINEQ (TIMEALL [NLAMBDA (TIMEFORM NUMBEROFTIMES TIMEWHAT INTERPFLG SHOWCODE) (* lmm "14-Aug-84 18:03") (* collects and prints stats on TIMEFORM. TIMEWHAT indicates what to collect stats on: if T, all of the system times are collected; if NIL, the system times plus all data allocations are kept; if a list, it should be a list of DATATYPES (or numbers) and may include the atom TIME if system times should be included. This function sets the variables BEFORESTATS, AFTERSTATS and DIFFERENCESTATS to the values of the stats objects before, after and the difference between them. These can be examined via the function PRINTMISCSTATS.) (DECLARE (GLOBALVARS BEFORESTATS AFTERSTATS DIFFERENCESTATS DFNFLG OPTIMIZATIONSOFF) (SPECVARS LCFIL STRF LAPFLG)) (PROG [VALUE (TIMEFLG (OR (NULL TIMEWHAT) (EQ TIMEWHAT T) (MEMB (QUOTE TIME) TIMEWHAT))) (DATATYPES (COND ((NULL TIMEWHAT) (DATATYPES)) ((EQ TIMEWHAT T) NIL) (T (for X inside TIMEWHAT bind NAME join (COND ((SETQ NAME (DATATYPEP X)) (CONS NAME)) ((EQ X (QUOTE TIME)) NIL) (T (printout T X " is not a datatype." T) NIL] (* create all necessary storage before performing test form.) (OR (NUMBERP NUMBEROFTIMES) (SETQ NUMBEROFTIMES 1)) [COND ([OR (NLISTP AFTERSTATS) (NOT (EQUAL DATATYPES (fetch DATATYPES of AFTERSTATS] (SETQ DIFFERENCESTATS (CREATEMISCSTATS DATATYPES TIMEFLG)) (SETQ BEFORESTATS (CREATEMISCSTATS DATATYPES TIMEFLG)) (SETQ AFTERSTATS (CREATEMISCSTATS DATATYPES TIMEFLG] [COND [(OR INTERPFLG (EQ NUMBEROFTIMES 1)) (COPYMISCSTATS BEFORESTATS DATATYPES) (SETQ VALUE (FRPTQ NUMBEROFTIMES (EVAL TIMEFORM] (T [RESETVARS ((DFNFLG T)) (PROG ((STRF T) (LCFIL) (LAPFLG SHOWCODE)) (COMPILE1 (QUOTE TIMEDUMMYFUNCTION) (LIST (QUOTE LAMBDA) NIL (LIST (QUOTE FRPTQ) NUMBEROFTIMES TIMEFORM] (COPYMISCSTATS BEFORESTATS DATATYPES) (SETQ VALUE (TIMEDUMMYFUNCTION] (COPYMISCSTATS AFTERSTATS DATATYPES T) (PRINTMISCSTATS (DIFFMISCSTATS BEFORESTATS AFTERSTATS DIFFERENCESTATS) DATATYPES) (RETURN VALUE]) (COPYMISCSTATS [LAMBDA (STATS DATATYPES BEFOREFLG) (* bvm: "28-MAR-82 22:00") (* smashes the fields of STATS to be the current values of stats in the system. BEFOREFLG indicates whether elapsed time should be taken before or after the bulk of the work.) (DECLARE (GLOBALVARS \MISCSTATS)) [COND (BEFOREFLG (CLOCK0 (fetch ELAPSEDTIME of STATS)) (for TYPE in DATATYPES as X on (fetch DATACOUNTERS of STATS) do (RPLACA X (BOXCOUNT TYPE] (AND (fetch TIMEBLOCK of STATS) (COPYTIMESTATS \MISCSTATS (fetch TIMEBLOCK of STATS))) (COND ((NOT BEFOREFLG) (for TYPE in DATATYPES as X on (fetch DATACOUNTERS of STATS) do (RPLACA X (BOXCOUNT TYPE))) (CLOCK0 (fetch ELAPSEDTIME of STATS]) (COPYTIMESTATS [LAMBDA (REFSTATS STATS) (* lmm " 6-Jan-85 14:52") (replace SWAPWAITTIME of STATS with (fetch SWAPWAITTIME of REFSTATS)) (replace KEYBOARDWAITTIME of STATS with (fetch KEYBOARDWAITTIME of REFSTATS)) (replace GCTIME of STATS with (fetch GCTIME of REFSTATS)) (replace PAGEFAULTS of STATS with (fetch PAGEFAULTS of REFSTATS)) (replace SWAPWRITES of STATS with (fetch SWAPWRITES of REFSTATS)) (replace TOTALTIME of STATS with (fetch TOTALTIME of REFSTATS)) (replace STARTTIME of STATS with (fetch STARTTIME of REFSTATS)) (replace DISKIOTIME of STATS with (fetch DISKIOTIME of REFSTATS)) (replace NETIOTIME of STATS with (fetch NETIOTIME of REFSTATS)) (replace DISKOPS of STATS with (fetch DISKOPS of REFSTATS)) (replace NETIOOPS of STATS with (fetch NETIOOPS of REFSTATS]) (CREATEMISCSTATS [LAMBDA (DATATYPES TIMEBLOCKFLG) (* bvm: " 6-OCT-82 15:28") (* creates a stats object for the types datatypes.) (create STATSOBJECT ELAPSEDTIME ←(CLOCK 0) TIMEBLOCK ←(AND TIMEBLOCKFLG (create MISCSTATS)) DATACOUNTERS ←(APPEND DATATYPES) DATATYPES ← DATATYPES]) (DIFFMISCSTATS [LAMBDA (BEFORE AFTER DIFFERENCES) (* bvm: " 6-OCT-82 15:30") (* puts the differences between two stats objects in a third stats object.) [for D on (fetch DATACOUNTERS of DIFFERENCES) as B in (fetch DATACOUNTERS of BEFORE) as A in (fetch DATACOUNTERS of AFTER) as TYPE in (fetch DATATYPES of DIFFERENCES) bind (LARGECNT ← 0) LARGECNTTAIL do (COND ((EQ TYPE (QUOTE FIXP)) (SETQ LARGECNTTAIL D))) (OR (SMALLP (COND (LARGECNTTAIL B) (T A))) (add LARGECNT 2)) (* The BOXCOUNT in COPYMISCSTATS for this datatype came out large, and thus did 2 number boxes (one to fetch main count, one to add in aux cnt), counted in the stats period) (FRPLACA D (IDIFFERENCE A B)) finally (COND ((AND (IGREATERP LARGECNT 0) LARGECNTTAIL) (* Adjust FIXP count to take into account all BOXCOUNT's that used up largep's) (FRPLACA LARGECNTTAIL (IDIFFERENCE (CAR LARGECNTTAIL) LARGECNT] (replace ELAPSEDTIME of DIFFERENCES with (IDIFFERENCE (fetch ELAPSEDTIME of AFTER) (fetch ELAPSEDTIME of BEFORE))) (AND (fetch TIMEBLOCK of BEFORE) (fetch TIMEBLOCK of AFTER) (fetch TIMEBLOCK of DIFFERENCES) (DIFFTIMESTATS (fetch TIMEBLOCK of BEFORE) (fetch TIMEBLOCK of AFTER) (fetch TIMEBLOCK of DIFFERENCES))) DIFFERENCES]) (DIFFTIMESTATS [LAMBDA (BEFOREBLOCK AFTERBLOCK DIFFERENCESBLOCK) (* lmm " 6-Jan-85 15:10") (* copies the difference between two stats blocks into a third stats block.) (replace SWAPWAITTIME of DIFFERENCESBLOCK with (IDIFFERENCE (fetch SWAPWAITTIME of AFTERBLOCK) (fetch SWAPWAITTIME of BEFOREBLOCK))) (replace KEYBOARDWAITTIME of DIFFERENCESBLOCK with (IDIFFERENCE (fetch KEYBOARDWAITTIME of AFTERBLOCK) (fetch KEYBOARDWAITTIME of BEFOREBLOCK))) (replace GCTIME of DIFFERENCESBLOCK with (IDIFFERENCE (fetch GCTIME of AFTERBLOCK) (fetch GCTIME of BEFOREBLOCK))) (replace PAGEFAULTS of DIFFERENCESBLOCK with (IDIFFERENCE (fetch PAGEFAULTS of AFTERBLOCK) (fetch PAGEFAULTS of BEFOREBLOCK))) (replace SWAPWRITES of DIFFERENCESBLOCK with (IDIFFERENCE (fetch SWAPWRITES of AFTERBLOCK) (fetch SWAPWRITES of BEFOREBLOCK))) (replace TOTALTIME of DIFFERENCESBLOCK with (IDIFFERENCE (fetch TOTALTIME of AFTERBLOCK) (fetch TOTALTIME of BEFOREBLOCK))) (replace STARTTIME of DIFFERENCESBLOCK with (IDIFFERENCE (fetch STARTTIME of AFTERBLOCK) (fetch STARTTIME of BEFOREBLOCK))) (replace DISKIOTIME of DIFFERENCESBLOCK with (IDIFFERENCE (fetch DISKIOTIME of AFTERBLOCK) (fetch DISKIOTIME of BEFOREBLOCK))) (replace NETIOTIME of DIFFERENCESBLOCK with (IDIFFERENCE (fetch NETIOTIME of AFTERBLOCK) (fetch NETIOTIME of BEFOREBLOCK))) (replace DISKOPS of DIFFERENCESBLOCK with (IDIFFERENCE (fetch DISKOPS of AFTERBLOCK) (fetch DISKOPS of BEFOREBLOCK))) (replace NETIOOPS of DIFFERENCESBLOCK with (IDIFFERENCE (fetch NETIOOPS of AFTERBLOCK) (fetch NETIOOPS of BEFOREBLOCK))) DIFFERENCESBLOCK]) (PRINTMISCSTATS [LAMBDA (STATS DATATYPES) (* bvm: " 6-JAN-83 18:13") (* prints the fields of MISCSTATS) [PROG ((CPUTIME (fetch ELAPSEDTIME of STATS))) (PRINTMISCSTATSITEM "Elapsed Time" CPUTIME T) (COND ((fetch TIMEBLOCK of STATS) (* printout time stats) (PROG ((STATSBLOCK (fetch TIMEBLOCK of STATS)) MSECS) [SETQ CPUTIME (IDIFFERENCE CPUTIME (SETQ MSECS (fetch SWAPWAITTIME of STATSBLOCK] (PRINTMISCSTATSITEM "SWAP time" MSECS T) [SETQ CPUTIME (IDIFFERENCE CPUTIME (SETQ MSECS (fetch KEYBOARDWAITTIME of STATSBLOCK] (PRINTMISCSTATSITEM "KEYWAIT time" MSECS T) [SETQ CPUTIME (IDIFFERENCE CPUTIME (SETQ MSECS (fetch GCTIME of STATSBLOCK] (PRINTMISCSTATSITEM "GC time" MSECS T) [SETQ CPUTIME (IDIFFERENCE CPUTIME (SETQ MSECS (fetch DISKIOTIME of STATSBLOCK] (PRINTMISCSTATSITEM "Disk i/o time" MSECS T) (PRINTMISCSTATSITEM "CPU Time" CPUTIME T) (PRINTMISCSTATSITEM (QUOTE PAGEFAULTS) (fetch PAGEFAULTS of STATSBLOCK)) (PRINTMISCSTATSITEM (QUOTE SWAPWRITES) (fetch SWAPWRITES of STATSBLOCK)) (PRINTMISCSTATSITEM (QUOTE DISKOPS) (fetch DISKOPS of STATSBLOCK)) (PRINTMISCSTATSITEM (QUOTE NETIOTIME) (fetch NETIOTIME of STATSBLOCK) T) (PRINTMISCSTATSITEM (QUOTE NETIOOPS) (fetch NETIOOPS of STATSBLOCK] (* construct a list of the elements that will fit on one line.) (bind PRINTABLES RESULT COL←0 (LINELENGTH ←(LINELENGTH)) for DT in DATATYPES as DIF in (fetch DATACOUNTERS of STATS) unless (EQ DIF 0) do [COND ((IGREATERP (SETQ COL (IPLUS COL (NCHARS DT))) LINELENGTH) (* line break) (SETQ PRINTABLES (NCONC1 PRINTABLES (DREVERSE RESULT))) (SETQ RESULT) (SETQ COL (NCHARS DT] (SETQ RESULT (CONS (CONS (add COL 1) (CONS DT DIF)) RESULT)) finally [COND (RESULT (SETQ PRINTABLES (NCONC1 PRINTABLES (DREVERSE RESULT] (for LINE in PRINTABLES do (for PR in LINE do (LISPXPRIN1 (CADR PR) T) (* Print datatype names) (LISPXTAB (CAR PR) NIL T)) (LISPXTERPRI T) (for PR in LINE do (LISPXPRIN2 (CDDR PR) T) (* Print amount used) (LISPXTAB (CAR PR) NIL T)) (LISPXTERPRI T]) (PRINTMISCSTATSITEM [LAMBDA (STR NUM TIMEFLG) (* bvm: "26-MAR-82 16:25") (COND ((NOT (EQP NUM 0)) (LISPXPRIN1 STR T) (LISPXPRIN1 " = ") (COND (TIMEFLG (LISPXTAB 16 0 T) (PRINTNUM (QUOTE (FLOAT 9 NIL NIL NIL 3)) (SETQ NUM (FQUOTIENT NUM 1000.0)) T) (* 3 significant digits) (LISPXPRIN2 NUM T T T) (* Record on history without printing) (LISPXPRIN1 " seconds" T)) (T (LISPXPRIN2 NUM T))) (LISPXTERPRI T]) ) (DECLARE: DONTCOPY [DECLARE: EVAL@COMPILE (RECORD STATSOBJECT (ELAPSEDTIME TIMEBLOCK DATACOUNTERS . DATATYPES)) ] ) (DEFINEQ (PERIODICALLYRECLAIM [LAMBDA NIL (* bvm: "21-JUL-83 16:49") (DECLARE (GLOBALVARS \RECLAIM.COUNTDOWN \LASTUSERACTION RECLAIMWAIT \LASTRECLAIM)) (PROG (LU) (if (AND \RECLAIM.COUNTDOWN (\SECONDSCLOCKGREATERP \LASTUSERACTION RECLAIMWAIT) (\SECONDSCLOCKGREATERP \LASTRECLAIM RECLAIMWAIT)) then (RECLAIM) (\DAYTIME0 \LASTRECLAIM]) ) (DECLARE: DONTEVAL@LOAD DOCOPY (RPAQ? RECLAIMWAIT 4) (RPAQ? \LASTRECLAIM (\DAYTIME0 (NCREATE (QUOTE FIXP)))) (APPENDTOVAR BACKGROUNDFNS PERIODICALLYRECLAIM) ) (DEFINEQ (APROPOS [LAMBDA (STRING ALLFLG QUIETFLG) (* JonL " 7-May-84 01:31") (PROG ((FILTERFN (AND ALLFLG (NEQ ALLFLG T) (FNTYP ALLFLG) ALLFLG)) (DISPLAYSTREAM (DISPLAYSTREAMP (\OUTSTREAMARG T))) (BLOCKCOUNT 1) RESULT) (DECLARE (SPECVARS RESULT FILTERFN DISPLAYSTREAM)) [RESETFORM (PRINTLEVEL 3 5) (MAPATOMS (FUNCTION (LAMBDA (ATOM) (PROG (VAL PROPL MARGSET) (DECLARE (USEDFREE RESULT FILTERFN)) (COND ((EQ 0 (IMOD (add BLOCKCOUNT 1) 32)) (SETQ BLOCKCOUNT 1) (BLOCK))) (COND ([COND (FILTERFN (AND (STRPOS STRING ATOM) (APPLY* FILTERFN ATOM))) (T (AND (OR ALLFLG (GETD ATOM) (GETPROPLIST ATOM) (NEQ (GETTOPVAL ATOM) (QUOTE NOBIND))) (STRPOS STRING ATOM) (OR ALLFLG (AND (NOT (GENSYM? ATOM)) (NEQ (CHCON1 ATOM) (CHARCODE \)) (NOT (\SUBFNDEF ATOM] (COND (QUIETFLG (push RESULT ATOM)) (T (PRIN2 ATOM T) (SPACES 1 T) (SETQ PROPL (GETPROPLIST ATOM)) [COND ((OR (NEQ (GETTOPVAL ATOM) (QUOTE NOBIND)) PROPL (GETD ATOM)) [COND ((GETD ATOM) (TAB 16 NIL T) (PRIN1 "- " T) (OR (NULL DISPLAYSTREAM) (SETQ MARGSET (DSPXPOSITION NIL DISPLAYSTREAM))) (PRIN1 "Function arglist: " T) (COND [DISPLAYSTREAM (RESETFORM (\APROPOS.MARGINSET MARGSET DISPLAYSTREAM) (PRIN2 (ARGLIST ATOM] (T (PRIN2 (ARGLIST ATOM] [COND ((NEQ (SETQ VAL (GETTOPVAL ATOM)) (QUOTE NOBIND)) (TAB 16 NIL T) (PRIN1 "- " T) (OR (NULL DISPLAYSTREAM) MARGSET (SETQ MARGSET (DSPXPOSITION NIL DISPLAYSTREAM))) (PRIN1 "Variable value: " T) (COND (DISPLAYSTREAM (RESETFORM ( \APROPOS.MARGINSET MARGSET DISPLAYSTREAM) (PRIN2 VAL))) (T (PRIN2 VAL] (COND ((SETQ VAL (GETPROPLIST ATOM)) (TAB 16 NIL T) (PRIN1 "- " T) (OR (NULL DISPLAYSTREAM) MARGSET (SETQ MARGSET (DSPXPOSITION NIL DISPLAYSTREAM))) (PRIN1 "Property list: " T) (COND (DISPLAYSTREAM (RESETFORM ( \APROPOS.MARGINSET MARGSET DISPLAYSTREAM) (PRIN2 VAL))) (T (PRIN2 VAL] (TERPRI T] (RETURN RESULT]) (\APROPOS.MARGINSET [LAMBDA (X DISPLAYSTREAM) (if (AND (LISTP X) (NULL DISPLAYSTREAM)) then (SETQ DISPLAYSTREAM (CADR X)) (SETQ X (CAR X))) (LIST (DSPLEFTMARGIN X DISPLAYSTREAM) DISPLAYSTREAM]) ) (DEFINEQ (\DIRTYBACKGROUND [LAMBDA NIL (* lmm "14-AUG-83 16:08") (DECLARE (GLOBALVARS SAVEVMMAX \LASTUSERACTION SAVEVMWAIT SAVINGCURSOR \DIRTYPAGEHINT)) (COND ((AND BACKGROUNDPAGEFREQ (ILEQ (add BACKGROUNDPAGECNT -1) 0)) (\WRITEDIRTYPAGE BACKGROUNDPAGEMIN) (SETQ BACKGROUNDPAGECNT BACKGROUNDPAGEFREQ]) (\SAVEVMBACKGROUND [LAMBDA NIL (* bvm: "14-Feb-85 23:27") (COND ((AND (ILESSP \DIRTYPAGEHINT SAVEVMMAX) (NEQ (fetch (IFPAGE Key) of \InterfacePage) \IFPValidKey) (FIXP SAVEVMWAIT) (\SECONDSCLOCKGREATERP \LASTUSERACTION SAVEVMWAIT)) (COND ((AND (ILESSP (SETQ \DIRTYPAGEHINT (\COUNTREALPAGES (QUOTE DIRTY))) SAVEVMMAX) (\FLUSHVMOK? (QUOTE SAVEVM) T)) (* Recalculate the hint before deciding it's okay) (RESETLST (AND SAVINGCURSOR (GETD (QUOTE CURSOR)) (RESETSAVE (CURSOR SAVINGCURSOR))) (SAVEVM]) (COPYVM [LAMBDA (FILE) (* bvm: "12-Jan-84 12:07") (DECLARE (GLOBALVARS \VMEM.INHIBIT.WRITE)) (RESETVARS ((\VMEM.INHIBIT.WRITE T)) (RETURN (COND ((EQ (fetch (IFPAGE Key) of \InterfacePage) \IFPValidKey) (\COPYSYS FILE NIL T)) (T "Can't--virtual memory has been written to"]) ) (RPAQ? BACKGROUNDPAGEMIN 40) (RPAQ? BACKGROUNDPAGECNT 0) (RPAQ? BACKGROUNDPAGEFREQ 4) (RPAQ? SAVINGCURSOR ) (RPAQ? SAVEVMMAX 600) (RPAQ? SAVEVMWAIT 300) (ADDTOVAR BACKGROUNDFNS \DIRTYBACKGROUND) (ADDTOVAR TTYBACKGROUNDFNS \SAVEVMBACKGROUND) (DECLARE: DOEVAL@COMPILE DONTCOPY (GLOBALVARS BACKGROUNDPAGEMIN BACKGROUNDPAGEFREQ BACKGROUNDPAGECNT) ) (* Setting the time) (DEFINEQ (SETTIME [LAMBDA (DT) (* bvm: "26-Jul-84 15:32") (if (OR (AND (NULL DT) (\NET.SETTIME)) (PROG [(IDT (AND DT (LISP.TO.ALTO.DATE (OR (IDATE DT) (ERROR "Invalid date" DT] RETRY [COND ((NOT IDT) (printout T "Enter date and time as string in double quotes: ") (COND ([SETQ IDT (IDATE (OR (SETQ DT (READ T T)) (RETURN "time not set"] (SETQ IDT (LISP.TO.ALTO.DATE IDT))) (T (printout T "Sorry, couldn't parse that" T) (GO RETRY] (\SETDAYTIME0 (COND ((SMALLP IDT) (create FIXP HINUM ← 0 LONUM ← IDT)) (T IDT))) (RETURN T))) then (DATE (DATEFORMAT TIME.ZONE]) ) (* Bells and whistles) (DEFINEQ (RINGBELLS (LAMBDA (N) (* JonL "18-Feb-84 10:02") (OR (FIXP N) (SETQ N 1)) (SELECTQ (MACHINETYPE) (DANDELION (PROG ((L1 (QUOTE ((1000 . 1000) (800 . 1000) (600 . 1000) (500 . 1000) (400 . 1000) (NIL . 500) (440 . 1000) (484 . 1000) (540 . 1000) (600 . 1000)))) (L2 (QUOTE ((2000 . 1000) (1600 . 1000) (1200 . 1000) (1000 . 1000) (800 . 1000) (NIL . 500) (880 . 1000) (968 . 1000) (1080 . 1000) (1188 . 1000))))) (to N do (PLAYTUNE L1) (FLASHWINDOW NIL NIL 100) (PLAYTUNE L2)))) (FLASHWINDOW NIL N)))) (FLASHWINDOW [LAMBDA (WIN? N FLASHINTERVAL SHADE) (* lmm "14-Aug-84 18:23") (* This is an "attention getting" action.) (* rrb - added shade argument so contrast of flash could be explored.) (OR (FIXP N) (SETQ N 1)) (OR (FIXP FLASHINTERVAL) (SETQ FLASHINTERVAL 200)) [COND ((WINDOWP WIN?) (SETQ WIN? (GETSTREAM WIN? (QUOTE OUTPUT] (GLOBALRESOURCE (\PlayTimer) (for I to N bind (WHOLEP ← (NOT (DISPLAYSTREAMP WIN?))) COLORP first [COND (WHOLEP (SETQ COLORP (NULL (VIDEOCOLOR] do (UNINTERRUPTABLY (* Open-coded "during" loops so that no one else can sneak in and steal cycles) (COND [WHOLEP (* Flash the whole screen) (VIDEOCOLOR (PROG1 (VIDEOCOLOR COLORP) (\DISMISS.WITHOUT.BLOCKING FLASHINTERVAL \PlayTimer] (T (* Although VIDEOCOLOR is nearly instantaneous, INVERTW may require a time approaching the interval time and thus this path could be much longer) (INVERTW WIN? SHADE) (\DISMISS.WITHOUT.BLOCKING FLASHINTERVAL \PlayTimer) (INVERTW WIN? SHADE)))) (COND ((NEQ I N) (BLOCK 250]) (\DISMISS.WITHOUT.BLOCKING (LAMBDA (DURATION TIMER? timerUnits) (* JonL "18-Feb-84 09:48") ((LAMBDA (\DurationLimit) (DECLARE (LOCALVARS \DurationLimit)) (until (TIMEREXPIRED? \DurationLimit timerUnits) do NIL)) (SETUPTIMER DURATION TIMER? timerUnits)))) (PLAYTUNE (LAMBDA (Frequency/Duration.pairlist) (* JonL "22-SEP-83 15:25") (* Frequency/Duration.pairlist is a list of Frequency/Duration pairs. The durations are in TICKS which means that a "tune" must be re-scaled between the DLion and the other machines.) (RESETLST (RESETSAVE NIL (QUOTE (BEEPOFF))) (GLOBALRESOURCE (\PlayTimer) (for X in Frequency/Duration.pairlist do (if (CAR X) then (BEEPON (CAR X)) else (BEEPOFF)) (forDuration (CDR X) timerUnits (QUOTE TICKS) usingTimer \PlayTimer do (* Just "busy-wait" to pass the time) NIL)))) T)) ) (DECLARE: DONTCOPY (DECLARE: EVAL@COMPILE [PUTDEF (QUOTE \PlayTimer) (QUOTE RESOURCES) (QUOTE (NEW (SETUPTIMER 0] ) ) (/SETTOPVAL (QUOTE \\PlayTimer.GLOBALRESOURCE)) (DECLARE: DONTEVAL@LOAD DOCOPY (MOVD (QUOTE RINGBELLS) (QUOTE PRINTBELLS)) ) (* Changing display) (DEFINEQ (DISPLAYDOWN [LAMBDA (FORM NSCANLINES) (* rrb "27-MAR-82 12:23") (* evaluates form with the number of scan lines set down.) (RESETFORM (SETDISPLAYHEIGHT (OR (SMALLP NSCANLINES) 0)) (EVAL FORM]) (SETDISPLAYHEIGHT [LAMBDA (NSCANLINES) (DECLARE (GLOBALVARS \DisplayStarted \EM.DISPLAYHEAD)) (* bvm: " 5-JAN-83 18:48") (* sets the number of scan lines to be displayed.) (* returns previous setting.) (* the number of lines in the dcb is 1/2 of the total. High bit is on to indicate long pointers.) (OR \DisplayStarted (HELP "Display must be initialized.")) (AND \EM.DISPLAYHEAD (PROG [(MAGICADDR (EMPOINTER (IPLUS (\GETBASE \EM.DISPLAYHEAD 0) 3] (RETURN (PROG1 (ITIMES [LOGAND (\GETBASE MAGICADDR 0) (CONSTANT (SUB1 (EXPT 2 (SUB1 BITSPERWORD] 2) (* number of dcb lines may need to be even.) (COND (NSCANLINES (COND [(SMALLP NSCANLINES) (COND ((IGREATERP 0 NSCANLINES) (\ILLEGAL.ARG NSCANLINES)) ((IGREATERP NSCANLINES SCREENHEIGHT) (SETQ NSCANLINES SCREENHEIGHT] ((EQ NSCANLINES T) (SETQ NSCANLINES SCREENHEIGHT)) (T (\ILLEGAL.ARG NSCANLINES))) (\PUTBASE MAGICADDR 0 (LOGOR (ITIMES (LRSH NSCANLINES 2) 2) (CONSTANT (EXPT 2 (SUB1 BITSPERWORD]) (VIDEORATE [LAMBDA (TYPE) (* bvm: " 7-NOV-83 17:28") (DECLARE (GLOBALVARS \VIDEORATE)) (PROG1 \VIDEORATE (* Return old setting) (AND TYPE (SETQ \VIDEORATE (SELECTC \MACHINETYPE (\DOLPHIN (SELECTQ TYPE ((NORMAL 77) (\DSPRATE 9 0 0) (QUOTE NORMAL)) ((TAPE 60) (\DSPRATE 139 0 0) (QUOTE TAPE)) (\ILLEGAL.ARG TYPE))) (\DORADO (SELECTQ TYPE ((NORMAL 77) (\DSPRATE 18 14 430) (QUOTE NORMAL)) ((TAPE 60) (\DSPRATE 18 14 560) (QUOTE TAPE)) ((PHILLIPS TAPEP) (\DSPRATE 58 25 520) (QUOTE PHILLIPS)) (\ILLEGAL.ARG TYPE))) (\DANDELION (SELECTQ TYPE ((NORMAL 77) (\DEVICE.OUTPUT 14 7) (QUOTE NORMAL)) ((TAPE 60) (\DEVICE.OUTPUT 142 7) (QUOTE TAPE)) (\ILLEGAL.ARG TYPE))) (QUOTE NORMAL]) ) (RPAQ? \VIDEORATE (QUOTE NORMAL)) (DECLARE: DONTEVAL@LOAD DOCOPY (ADDTOVAR BREAKRESETFORMS (SETDISPLAYHEIGHT T)) (ADDTOVAR RESETFORMS (SETDISPLAYHEIGHT T)) ) (DECLARE: DONTEVAL@LOAD DOCOPY (RPAQQ #EOLCHARS 1) [OR (LISTP (EVALV (QUOTE EDITCHARACTERS))) (RPAQ EDITCHARACTERS (QUOTE (J X Z Y N] (ADDTOVAR POSTGREETFORMS (CNDIR)) (ADDTOVAR LISPUSERSDIRECTORIES ) ) (PUTPROPS BAKTRACELST VARTYPE ALIST) (ADDTOVAR BREAKMACROS (BT (BAKTRACE LASTPOS NIL (BREAKREAD (QUOTE LINE)) 0 T)) (BTV (BAKTRACE LASTPOS NIL (BREAKREAD (QUOTE LINE)) 1 T)) (BTVPP (PROG ((SYSPRETTYFLG T)) (BAKTRACE LASTPOS NIL (BREAKREAD (QUOTE LINE)) 1 T))) (BT! (BAKTRACE LASTPOS NIL (BREAKREAD (QUOTE LINE)) 0 T))) (ADDTOVAR BAKTRACELST (EVAL (**BREAK** LISPX ERRORSET BREAK1A ERRORSET BREAK1) (**TOP** LISPX ERRORSET EVALQT T) (**EDITOR** ((MAPCAR APPLY) (ERRORSET LISPX)) ERRORSET ERRORSET ERRORSET EDITL1 EDITL0 ERRORSET ((ERRORSET ERRORSET ERRORSET EDITL1 EDITL0 ERRORSET) -) EDITL ERRORSET ERRORSET EDITE ((EDITF) (EDITV) (EDITP) -)) (**USEREXEC** ERRORSET LISPX ERRORSET ERRORSET USEREXEC)) (APPLY (**BREAK** LISPX ERRORSET BREAK1A ERRORSET BREAK1) (**TOP** LISPX ERRORSET EVALQT T) (**EDITOR** LISPX ERRORSET ERRORSET ERRORSET EDITL1 EDITL0 ERRORSET ((ERRORSET ERRORSET ERRORSET EDITL1 EDITL0 ERRORSET) -) EDITL ERRORSET ERRORSET EDITE ((EDITF) (EDITV) (EDITP) -)) (**USEREXEC** LISPX ERRORSET ERRORSET USEREXEC))) (DECLARE: DONTEVAL@LOAD DOCOPY (RPAQ? CLEANUPOPTIONS (QUOTE (RC))) ) (DEFINEQ (DOAROUNDEXITFORMS (LAMBDA (EVENT) (* JonL "13-Sep-84 13:42") (* For backward compatibility, handle the xxxFORMS that used to be in advise around LOGOUT, SYSOUT, MAKESYS) (for $$FORM in (SELECTQ EVENT (BEFORELOGOUT BEFORELOGOUTFORMS) (AFTERLOGOUT AFTERLOGOUTFORMS) (BEFORESYSOUT BEFORESYSOUTFORMS) (AFTERSYSOUT AFTERSYSOUTFORMS) (BEFOREMAKESYS BEFOREMAKESYSFORMS) (AFTERMAKESYS AFTERMAKESYSFORMS) NIL) do (ERSETQ (\EVAL $$FORM))))) ) (ADDTOVAR AROUNDEXITFNS DOAROUNDEXITFORMS) (ADDTOVAR BEFORELOGOUTFORMS ) (ADDTOVAR AFTERLOGOUTFORMS ) (DECLARE: DONTEVAL@LOAD DOCOPY (RPAQ? ADVISEDFNS ) ) (* from FASTARRAYS) (DEFINEQ (POINTERARRAY [LAMBDA (N INIT) (* lmm " 4-DEC-80 16:58") (ARRAY N (QUOTE POINTER) INIT 0]) (WORDARRAY [LAMBDA (N) (* lmm " 4-DEC-80 16:58") (ARRAY N (QUOTE SMALLPOSP) 0 0]) (FIXPARRAY [LAMBDA (N) (* lmm " 4-DEC-80 16:58") (ARRAY N (QUOTE FIXP) 0 0]) ) [MAPC (QUOTE ((ELT FASTELT FASTELTN FASTELTW) (SETA FASTSETA FASTSETAN FASTSETAW) (GETHASH IGETHASH) (PUTHASH IPUTHASH))) (FUNCTION (LAMBDA (X) (MAPC (CDR X) (FUNCTION (LAMBDA (Y) (MOVD? (CAR X) Y] (* Versions) (DEFINEQ (REALMEMORYSIZE [LAMBDA NIL (* bvm: "19-JAN-83 17:06") (fetch NRealPages of \InterfacePage]) (LISPVERSION [LAMBDA NIL (* bvm: "19-JAN-83 17:07") (fetch LVersion of \InterfacePage]) (MICROCODEVERSION [LAMBDA NIL (* bvm: "19-JAN-83 17:07") (fetch RVersion of \InterfacePage]) (BCPLVERSION [LAMBDA NIL (* bvm: "19-JAN-83 17:07") (fetch BVersion of \InterfacePage]) (REQUIREVERSION [LAMBDA (LISP MICROCODE BCPL) (* bvm: "19-JAN-83 17:15") (PROG (TYPE NEEDED) (RETURN (COND ([SETQ TYPE (OR (AND LISP (LESSP (fetch LVersion of \InterfacePage) (SETQ NEEDED LISP)) (QUOTE LISP)) (AND MICROCODE (LESSP (fetch RVersion of \InterfacePage) (SETQ NEEDED MICROCODE)) (QUOTE MICROCODE)) (AND BCPL (LESSP (fetch BVersion of \InterfacePage) (SETQ NEEDED BCPL)) (QUOTE BCPL] (ERROR (CONCAT "This " TYPE " version is too old. The minimum version required is ") NEEDED) NIL) (T T]) ) (* Misc ops) (DEFINEQ (READPRINTERPORT [LAMBDA NIL (* bvm: "18-JAN-83 18:06") ((OPCODES READPRINTERPORT]) (WRITEPRINTERPORT [LAMBDA (DATUM) (* bvm: "18-JAN-83 18:06") ((OPCODES WRITEPRINTERPORT) DATUM]) (\READPRINTERPORT.UFN [LAMBDA NIL (* hdj "16-Sep-84 21:37") (if (EQ \MACHINETYPE \DANDELION) then (\DEVICE.INPUT 7]) (\WRITEPRINTERPORT.UFN [LAMBDA (DATUM) (* hdj "16-Sep-84 21:45") (if (EQ \MACHINETYPE \DANDELION) then (\DEVICE.OUTPUT DATUM 14]) (\MISC1.UFN [LAMBDA (ARG ALPHA) (* bvm: "18-JAN-83 18:07") (RAID "Unimplemented MISC1 op" ALPHA]) (\MISC2.UFN [LAMBDA (ARG1 ARG2 ALPHA) (* bvm: "18-JAN-83 18:07") (RAID "Unimplemented MISC2 op" ALPHA]) (\MISC3.UFN [LAMBDA (ARG1 ARG2 ARG3 ALPHA) (* hdj "26-Feb-85 11:50") (SELECTQ ALPHA (0 (BLKEXPONENT ARG1 ARG2 ARG3)) (1 (BLKMAG ARG1 ARG2 ARG3)) (2 (BLKSMALLP2FLOAT ARG1 ARG2 ARG3)) (3 (BLKFLOATP2COMP ARG1 ARG2 ARG3)) (RAID "Illegal op to \MISC3.UFN --" ALPHA]) (\MISC4.UFN [LAMBDA (ARG1 ARG2 ARG3 ARG4 ALPHA) (* hdj "26-Feb-85 11:52") (SELECTQ ALPHA (0 (BLKFTIMES ARG1 ARG2 ARG3 ARG4)) (1 (BLKPERM ARG1 ARG2 ARG3 ARG4)) (2 (BLKFPLUS ARG1 ARG2 ARG3 ARG4)) (3 (BLKFDIFF ARG1 ARG2 ARG3 ARG4)) (4 (BLKSEP ARG1 ARG2 ARG3 ARG4)) (RAID "Illegal op to \MISC4.UFN -- " ALPHA]) (\MISC5.UFN [LAMBDA (ARG1 ARG2 ARG3 ARG4 ARG5 ALPHA) (* hdj "26-Feb-85 11:54") (RAID "illegal op to \MISC5.UFN -- ALPHA"]) (\MISC6.UFN [LAMBDA (ARG1 ARG2 ARG3 ARG4 ARG5 ARG6 ALPHA) (* hdj "19-Sep-84 14:33") (RAID "Unimplemented MISC6 op" ALPHA]) (\MISC7.UFN [LAMBDA (ARG1 ARG2 ARG3 ARG4 ARG5 ARG6 ARG7 ALPHA) (* hdj "19-Sep-84 14:34") (RAID "Unimplemented MISC7 op" ALPHA]) (\MISC8.UFN [LAMBDA (ARG1 ARG2 ARG3 ARG4 ARG5 ARG6 ARG7 ARG8 ALPHA) (* hdj "26-Feb-85 11:56") (SELECTQ ALPHA (0 (IBLT1 ARG1 ARG2 ARG3 ARG4 ARG5 ARG6 ARG7 ARG8)) (1 (IBLT2 ARG1 ARG2 ARG3 ARG4 ARG5 ARG6 ARG7 ARG8)) (RAID "Illegal op to \MISC8.UFN --" ALPHA]) ) (* sub-functions of floating-point ufns) (DEFINEQ (BLKFLOATP2COMP [LAMBDA (source destination kount) (* hdj "21-Jun-84 19:03") (* * moves the contents of a Real array into a Complex array; sets imaginary part to 0) (* \CHECKARRAYINDEX destination (SUB1 kount)) (for sourceElt from 0 to (SUB1 kount) do (SETCOMPLEX (\ADDBASE destination (LLSH sourceElt 2)) (\GETBASEFLOATP source (LLSH sourceElt 1)) 0.0]) (BLKSMALLP2FLOAT [LAMBDA (source destination kkount) (* edited: "22-Jun-84 04:21") (* * convert an array of SMALLPs to FLOATPs) (* \CHECKARRAYINDEX destination (SUB1 kount)) (for NN from 0 to (SUB1 kkount) do (\PUTBASEFLOATP destination (LLSH NN 1) (FLOAT (\GETBASE source NN]) (BLKMAG [LAMBDA (complexArray magnitudeArray kount) (* hdj "21-Jun-84 18:53") (* \CHECKARRAYINDEX magnitudeArray (SUB1 kount)) (for magnitude from 0 to (SUB1 kount) bind complexcount real imag do (SETQ complexcount (LLSH magnitude 2)) (SETQ real (\GETBASEFLOATP complexArray complexcount)) (SETQ imag (\GETBASEFLOATP complexArray (IPLUS complexcount 2))) (\PUTBASEFLOATP magnitudeArray (LLSH magnitude 1) (FPLUS (FTIMES real real) (FTIMES imag imag]) (BLKEXPONENT [LAMBDA (source destination kount) (* edited: "24-Jun-84 23:44") (* * extract the exponent of each element of source, stick it in destination) (* \CHECKARRAYINDEX destination (SUB1 kount)) (for X from 0 to (SUB1 kount) do (\PUTBASE destination X (fetch (FLOATP EXPONENT) of (\GETBASEFLOATP source (LLSH X 1]) ) (DEFINEQ (BLKSEP [LAMBDA (SOURCE1 SOURCE2 DEST KOUNT) (* hdj "12-Nov-84 16:02") (* *) (for ALPHAINDEX from 0 to (DOUBLE (SUB1 KOUNT)) by 8 bind BETAINDEX GAMMAINDEX DELTAINDEX do (SETQ BETAINDEX (IDIFFERENCE KOUNT ALPHAINDEX)) (SETQ GAMMAINDEX (IPLUS ALPHAINDEX 2)) (SETQ DELTAINDEX (IPLUS BETAINDEX 2)) (\PUTBASEFLOATP DEST ALPHAINDEX (FPLUS (\GETBASEFLOATP SOURCE1 ALPHAINDEX) (\GETBASEFLOATP SOURCE2 BETAINDEX))) (\PUTBASEFLOATP DEST (IPLUS ALPHAINDEX 2) (FDIFFERENCE (\GETBASEFLOATP SOURCE1 GAMMAINDEX) (\GETBASEFLOATP SOURCE2 DELTAINDEX))) (\PUTBASEFLOATP DEST (IPLUS ALPHAINDEX 4) (FPLUS (\GETBASEFLOATP SOURCE1 GAMMAINDEX) (\GETBASEFLOATP SOURCE2 DELTAINDEX))) (\PUTBASEFLOATP DEST (IPLUS ALPHAINDEX 6) (FDIFFERENCE (\GETBASEFLOATP SOURCE1 ALPHAINDEX) (\GETBASEFLOATP SOURCE2 BETAINDEX]) (BLKFDIFF [LAMBDA (SOURCE1 SOURCE2 DEST KOUNT) (* hdj "20-Sep-84 12:35") (for INDEX from 0 to (DOUBLE (SUB1 KOUNT)) by 2 do (\PUTBASEFLOATP DEST INDEX (FDIFFERENCE (\GETBASEFLOATP SOURCE1 INDEX) (\GETBASEFLOATP SOURCE2 INDEX]) (BLKFPLUS [LAMBDA (SOURCE1 SOURCE2 DEST KOUNT) (* hdj "20-Sep-84 12:36") (for INDEX from 0 to (DOUBLE (SUB1 KOUNT)) by 2 do (\PUTBASEFLOATP DEST INDEX (FPLUS (\GETBASEFLOATP SOURCE1 INDEX) (\GETBASEFLOATP SOURCE2 INDEX]) (BLKPERM [LAMBDA (orig permutations destination kount) (* hdj "21-Jun-84 19:26") (* * destination (x) ← orig (perm (x))) (* * args are arrays of smallps (words)) (* * must fold initial into offset for compatibility with microcode) (* \CHECKARRAYINDEX destination (SUB1 kount)) (for X from 0 to (SUB1 kount) do (\PUTBASE destination X (\GETBASE orig (\GETBASE permutations X]) (BLKFTIMES [LAMBDA (SOURCE1 SOURCE2 DEST KOUNT) (* hdj "21-Jun-84 19:11") (* \CHECKARRAYINDEX DEST (SUB1 KOUNT)) (for INDEX from 0 to (LLSH (SUB1 KOUNT) 1) by 2 do (\PUTBASEFLOATP DEST INDEX (FTIMES (\GETBASEFLOATP SOURCE1 INDEX) (\GETBASEFLOATP SOURCE2 INDEX]) ) (DEFINEQ (IBLT1 [LAMBDA (ValueArray TextureArray XCoord BitmapAddr BitmapWidth ValHeight ValWidth Kount) (* hdj " 2-Jul-84 17:52") (* * ValueArray - an array of 128 elements, 8 bits each) (* * TextureArray - an array of 256 elements, each a texture) (* * XCoord - bit offset from left of destination bitmap) (* * BitmapAddr - destination) (* * BitmapWidth - width of dest bitmap in words) (* * ValHeight - height of bar) (* * ValWidth - width of bar) (* * Kount - how many elements of ValueArray to graph) (PROG (TEXTURE (BITMAPOFFSET BitmapAddr)) (for val from (SUB1 Kount) to 0 by -1 do (SETQ TEXTURE (\GETBASE TextureArray (\GETBASE ValueArray val))) (for X from 1 to ValHeight do (\PUTBASEBITS BITMAPOFFSET XCoord ValWidth TEXTURE) (SETQ BITMAPOFFSET (\ADDBASE BITMAPOFFSET BitmapWidth]) (IBLT2 [LAMBDA (ValueArray TextureArray XCoord BitmapAddr BitmapWidth ValHeight ValWidth Kount) (* hdj "20-Sep-84 12:20") (* * Steps by 2, as opposed to IBLT1, which steps by 1) (* * ValueArray - an array of 128 elements, 8 bits each) (* * TextureArray - an array of 256 elements, each a texture) (* * XCoord - bit offset from left of destination bitmap) (* * BitmapAddr - destination) (* * BitmapWidth - width of dest bitmap in words) (* * ValHeight - height of bar) (* * ValWidth - width of bar) (* * Kount - how many elements of ValueArray to graph) (PROG (TEXTURE (BITMAPOFFSET BitmapAddr)) (for val from (SUB1 Kount) to 0 by -2 do (SETQ TEXTURE (\GETBASE TextureArray (\GETBASE ValueArray val))) (for X from 1 to ValHeight do (\PUTBASEBITS BITMAPOFFSET XCoord ValWidth TEXTURE) (SETQ BITMAPOFFSET (\ADDBASE BITMAPOFFSET BitmapWidth]) ) (DECLARE: DOEVAL@COMPILE DONTCOPY (LOCALVARS . T) ) (DECLARE: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDTOVAR NLAMA ) (ADDTOVAR NLAML TIMEALL) (ADDTOVAR LAMA ) ) (PUTPROPS DMISC COPYRIGHT ("Xerox Corporation" T 1982 1983 1984 1985)) (DECLARE: DONTCOPY (FILEMAP (NIL (3873 4610 (BACKSPACEDEL 3883 . 4608)) (4714 16823 (TIMEALL 4724 . 7177) (COPYMISCSTATS 7179 . 8046) (COPYTIMESTATS 8048 . 9139) (CREATEMISCSTATS 9141 . 9551) (DIFFMISCSTATS 9553 . 11230) ( DIFFTIMESTATS 11232 . 13459) (PRINTMISCSTATS 13461 . 16267) (PRINTMISCSTATSITEM 16269 . 16821)) (16947 17387 (PERIODICALLYRECLAIM 16957 . 17385)) (17564 20510 (APROPOS 17574 . 20275) (\APROPOS.MARGINSET 20277 . 20508)) (20511 22026 (\DIRTYBACKGROUND 20521 . 20903) (\SAVEVMBACKGROUND 20905 . 21644) ( COPYVM 21646 . 22024)) (22442 23234 (SETTIME 22452 . 23232)) (23266 26614 (RINGBELLS 23276 . 24080) ( FLASHWINDOW 24082 . 25548) (\DISMISS.WITHOUT.BLOCKING 25550 . 25860) (PLAYTUNE 25862 . 26612)) (26898 29815 (DISPLAYDOWN 26908 . 27251) (SETDISPLAYHEIGHT 27253 . 28705) (VIDEORATE 28707 . 29813)) (31536 32186 (DOAROUNDEXITFORMS 31546 . 32184)) (32391 32844 (POINTERARRAY 32401 . 32551) (WORDARRAY 32553 . 32699) (FIXPARRAY 32701 . 32842)) (33122 34464 (REALMEMORYSIZE 33132 . 33293) (LISPVERSION 33295 . 33451) (MICROCODEVERSION 33453 . 33614) (BCPLVERSION 33616 . 33772) (REQUIREVERSION 33774 . 34462)) ( 34486 37010 (READPRINTERPORT 34496 . 34640) (WRITEPRINTERPORT 34642 . 34800) (\READPRINTERPORT.UFN 34802 . 34996) (\WRITEPRINTERPORT.UFN 34998 . 35201) (\MISC1.UFN 35203 . 35353) (\MISC2.UFN 35355 . 35505) (\MISC3.UFN 35507 . 35848) (\MISC4.UFN 35850 . 36237) (\MISC5.UFN 36239 . 36397) (\MISC6.UFN 36399 . 36552) (\MISC7.UFN 36554 . 36707) (\MISC8.UFN 36709 . 37008)) (37060 39262 (BLKFLOATP2COMP 37070 . 37612) (BLKSMALLP2FLOAT 37614 . 38075) (BLKMAG 38077 . 38736) (BLKEXPONENT 38738 . 39260)) ( 39263 42041 (BLKSEP 39273 . 40313) (BLKFDIFF 40315 . 40678) (BLKFPLUS 40680 . 41038) (BLKPERM 41040 . 41606) (BLKFTIMES 41608 . 42039)) (42042 44425 (IBLT1 42052 . 43200) (IBLT2 43202 . 44423))))) STOP