1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530 |
- University of Utah Symbolic Computation Group July 1978
- Technical Report No. TR-2 First Revision - March 1979
- MANUAL
- for
- STANDARD LISP
- on
- DECSYSTEM 10 and 20
- by
- Inge B. Frick
- University of Utah
- Salt Lake City, UT 84112
- ABSTRACT
- An implementation of Standard Lisp on the DECsystem
- 10 and 20 is presented. The implementation is based
- on Stanford Lisp 1.6.
- Work supported in part by the National Science Foundation under Grant
- No. MCS 76-15035.
- STANDARD LISP ON DECSYSTEM 10 AND 20
- Table of Contents
_____ __ ________
- 1. PRELIMINARIES ......................................... 1
- 1.1 Document Conventions ................................. 1
- 1.2 Special Terminal Control Characters .................. 2
- 1.3 Data Types ........................................... 2
- 1.4 Property Lists ....................................... 5
- 1.5 Value Cells .......................................... 6
- 1.6 Function Cells ....................................... 6
- 1.7 The OBLIST ........................................... 7
- 2. EXTENSIONS AND DIFFERENCES FROM STANDARD LISP ......... 8
- 2.1 Boolean Arguments And Predicates ..................... 8
- 2.2 Error Handling ....................................... 8
- 2.3 I/O .................................................. 11
- 2.4 The Interpreter ...................................... 15
- 2.5 The Fap Loader ....................................... 18
- 2.6 Logical Routines And LAP Support ..................... 18
- 2.7 The Alternative Scanner SCAN ......................... 20
- 2.7.1 Scanner Functions .................................. 20
- 2.8 Other Functions ...................................... 22
- 2.9 Memory Allocation .................................... 24
- 2.9.1 Storage Allocation Areas ........................... 24
- 2.9.2 Allocation ......................................... 25
- 2.9.3 Reallocating Space ................................. 25
- 2.10 The Garbage Collector ............................... 26
- 3. GLOBAL (FLUID) SYSTEM VARIABLES ....................... 28
- 4. ERROR MESSAGES AND WARNINGS ........................... 32
- 4.1 Error messages not starting with a bad part .......... 32
- 4.2 Error messages starting with a bad part .............. 36
- 4.3 Warnings and diagnostic messages ..................... 38
- 5.0 DIFFERENCES BETWEEN LISP 1.6 AND STANDARD LISP ....... 40
- 6.0 REFERENCES ........................................... 42
- INDEX .................................................... 43
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 1
- 1.0 PRELIMINARIES
- This manual describes Standard Lisp implemented on the DECsystem 10
- and 20. The code for Stanford Lisp 1.6 has been changed in order to
- make it conform to the specifications in the Standard Lisp report
- [1]. For this reason the parts of the STANFORD LISP 1.6 MANUAL [2],
- that still are relevant have been included here, so that [2] is no
- longer necessary. This Standard Lisp system contains the system
- described in [1] as a subset. This manual is therefore intended as a
- complement to [1] and features fully discussed in [1] are not
- described here.
- 1.1 Document Conventions
- In the description of the primitive data structures, the following
- pictorial notation is used:
- ---------
- | | | ->
- ---------
- |
- v
- represents a 36-bit word in FREE STORAGE (a Lisp cell) with 2
- 18-bit pointers. The CAR part is to the left and the CDR part to
- the right.
- -----------
- | ABC | | ->
- -----------
- is similar to the previous, but the ABC stands for a pointer to
- the identifier ABC. I.e. CAR of the structure is ABC.
- ---------
- | |
- ---------
- represents a 36-bit word in full word space.
- Character conventions: The characters altmode, carriage return,
- linefeed, formfeed, horizontal tab, space and rubout (delete) will
- sometimes be represented as <alt>, <cr>, <lf>, <ff>, <tab>, <sp> and
- <del>. Control characters are usually written as ^ followed by an
- ordinary character, e.g. control-A is written ^A.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 2
- 1.2 Special Terminal Control Characters
- The time-sharing system treats many control characters in special
- ways. For a complete discussion of control characters see the
- appropriate DECsystem 10 or 20 manuals. Briefly the following
- special control characters are used in Lisp.
- Character Meaning
- ^C Exit Lisp and talk to the monitor.
- ^G (Bell) Stop the current Lisp process and go to the top
- level of Lisp. Only effective when Lisp is asking
- for input.
- ^O Suppress console printout until an input is
- requested.
- ^U (^X in Tenex) Delete the entire input line now
- being typed. This is only effective when *DDTIN is
- NIL.
- <del> (^A in Tenex) Delete the last character typed if
- *DDTIN is NIL. If *DDTIN is true, then <del> (in
- Tenex too) will delete the entire S-expression
- being read.
- ^R Retypes the current input line. No special meaning
- in Tenex.
- 1.3 Data Types
- This section describes the implementation of the primitive data types
- discussed in [1] 2.1. It should be noted that some of the details
- given in this section are temporary and may be changed. These
- changes will be transparent to the user if he does not access parts
- of an atom by using CAR, CDR, RPLACA or RPLACD etc..
- All atoms (except INUMs, see below) start with one word that contains
- a type tag in the left half and a pointer to the rest of the atom in
- the right half.
- Integer - There are three representations for integers depending on
_______
- the numerical magnitude of the integer: INUM, FIXNUM and BIGNUM.
- Their ranges are as follows:
- INUM abs(n) < K K is usually 2^16-8
- FIXNUM K =< abs(n) < 2^35
- BIGNUM 2^35 =< abs(n)
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 3
- INUMs are small integers represented by pointers outside of the
- normal LISP addressing space. INUMs are addresses in the range
- 2^18-2K-J+1 to 2^18-1-J, where J at present is 8. The
- representation for zero is INUM0 = 2^18-K-J.
- FIXNUMs are represented by list structure of the following form:
- -------------- ---------
- | fixtag | | -> | value |
- -------------- ---------
- where value is the 2's complement representation of the fixed
- point number and fixtag at present is -6.
- BIGNUMs are represented by list structure of the following forms:
- Positive BIGNUMs:
- -------------- --------- -----------
- | postag | | -> | | | -> ... -> | | NIL |
- -------------- --------- -----------
- | |
- v v
- --------- -----------
- | N0 | | Nn |
- --------- -----------
- Negative BIGNUMs:
- -------------- --------- -----------
- | negtag | | -> | | | -> ... -> | | NIL |
- -------------- --------- -----------
- | |
- v v
- --------- -----------
- | N0 | | Nn |
- --------- -----------
- where N0 ... Nn are positive 36 bit integers ordered from
- least to most significant and at present postag is -7 and
- negtag is -8. The value of a BIGNUM is:
- sign * (N0 + N1*2^35 + N2*(2^35)^2 +...+Nn*(2^35)^n)
- The syntax for integers is as described in [1] 2.1, with the
- exception that an integer followed by a ".", is read as an integer
- with decimal radix instead of a floating point number with no
- exponent and no fractional part. With this exception the radix
- when reading a number is specified by the value of the variable
- IBASE. The radix when printing an integer is specified by the
- value of the variable BASE. When the value of BASE is 10
- (decimal), then integers will print with a following ".", unless
- the variable *NOPOINT is not NIL.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 4
- Floating - Floating point numbers are represented by list structure
________
- of the following form:
- -------------- ---------
- | flotag | | -> | value |
- -------------- ---------
- where value is in DECsystem 10 2's complement representation and
- flotag at present is -5.
- The radix for a floating point number is always decimal. A
- floating point number must be in the (approximate) range:
- 10^-38 < abs(x) < 10^+38 or x = 0
- A floating point number has approximately eight significant digits
- of accuracy.
- String - Strings are represented by a header word followed by a list
______
- of full words, each containing five ASCII characters.
- Example: The string "Time of day" is represented as follows:
- -------------- --------- --------- -----------
- | strtag | | -> | | | -> | | | -> | | NIL |
- -------------- --------- --------- -----------
- | | |
- v v v
- --------- --------- ---------
- | Time | | of da | | y^^^^ |
- --------- --------- ---------
- where ^ means null or ASCII 0, and strtag at present is -4. The
- number of characters in a string is limited only by available full
- word space.
- vector - A vector is internally represented as a dotted pair of the
______
- following form:
- --------------
- | vectag | | -> vector in BPS
- --------------
- where vectag at present is -3. The size of a vector is only
- limited by the available BPS.
- code-pointer - A code pointer is represented as a dotted pair of the
____________
- following form:
- --------------
- | codtag | | -> binary code in BPS
- --------------
- where codtag at present is -2.
- id - An identifier is represented by a dotted pair of the following
__
- form:
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 5
- -------------
- | idtag | | -> property list
- -------------
- where idtag at present is -1.
- The syntax for identifiers is similar to that specified in [1] 2.1
- with the following differences:
- <lead-character> ::= <special-character>|<letter>
- <regular-character> ::= <lead-character>|<digit>|+|-|'
- <letter> ::= <alphabetic>|<extra-letter>
- <delimiter> ::= (|)|<|>|[|]|<alt>|<rub>
- <ignored> ::= <tab>|<lf>|<vtab>|<ff>|<cr>|<space>|,
- <special-control> ::= <null>|<control-Z>|'|+|-|.|E|"|!
- <extra-letter> ::= <any character not a digit, ignored,
- delimiter or special-control>
- The number of characters in an id is limited only by available
- full word space.
- 1.4 Property Lists
- The property list of an identifier is a list of flags and (property
- name, property value) pairs associated with that identifier. All
- identifiers have a PNAME (print name) property with a property value
- that is a list of full words with the same format as for a string.
- Example: The identifier A is represented by:
- ---------- -----------
- | -1 | | -> | | NIL |
- ---------- -----------
- |
- v
- ------------- -----------
- | PNAME | | -> | | NIL |
- ------------- -----------
- |
- v
- ---------
- | A^^^^ |
- ---------
- Example: After the commands (FLAG '(A) 'NFLG) and (PUT 'A 'TYP 'K)
- then the identifier A is represented by:
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 6
- ---------- --------- ------------ -----------
- | -1 | | -> | | | -> | NFLG | | -> | | NIL |
- ---------- --------- ------------ -----------
- | |
- v v
- ----------- ------------- -----------
- | TYP | K | | PNAME | | -> | | NIL |
- ----------- ------------- -----------
- |
- v
- ---------
- | A^^^^ |
- ---------
- 1.5 Value Cells
- When a value is assigned to an identifier, the property name VALUE is
- put on the identifier's property list with property value being a
- pointer to a value cell. The CDR of the value cell holds the value
- of the identifier. The address of a value cell remains constant for
- that identifier unless REMPROPed, to enable compiled functions to
- directly reference the values of global or fluid variables.
- Example: After the command (SETQ A 'B), the identifier A is
- represented by:
- ---------- --------- -----------
- | -1 | | -> | | | -> | | NIL |
- ---------- --------- -----------
- | |
- v v
- ------------- ------------- -----------
- | VALUE | | -- | PNAME | | -> | | NIL |
- ------------- | ------------- -----------
- v |
- --------- v
- | 0 | B | ---------
- --------- | A^^^^ |
- ---------
- 1.6 Function Cells
- When an identifier is defined as a function by PUTD, DE, DF or DM,
- the property name FUNCELL is put on the identifier's property list
- with property value being a pointer to a function cell. The CAR of
- the function cell is the function type, EXPR, FEXPR or MACRO. The
- CDR of the function cell is a lambda expression or a code pointer.
- It is possible that future versions of Standard Lisp will use the
- value cell as a function cell. For that reason the function cell
- should only be accessed by means of PUTD, GETD and REMD. The value
- cell should only be accessed by SET, SETQ and EVAL. At present
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 7
- (GETD x) is identical to (GET x 'FUNCELL).
- Example: After the command (PUTD 'A 'type 'body), the identifier A
- is represented by:
- ---------- --------- -----------
- | -1 | | -> | | | -> | | NIL |
- ---------- --------- -----------
- | |
- v v
- --------------- ------------- -----------
- | FUNCELL | | -- | PNAME | | -> | | NIL |
- --------------- | ------------- -----------
- v |
- --------------- v
- | type | body | ---------
- --------------- | A^^^^ |
- ---------
- where "type" should be one of EXPR, FEXPR or MACRO and "body" should
- be either a lambda expression or a code pointer.
- 1.7 The OBLIST
- For the sake of searching efficiency, the OBLIST has two levels: the
- first level contains sequentially stored "buckets" which are "hashed"
- into as a function of the print name of the identifier. Each bucket
- is a list of all distinct identifiers which have hashed into that
- bucket. Thus, (CAR OBLIST) is the first bucket, and (CAAR OBLIST) is
- the first identifier of the first bucket.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 8
- 2.0 EXTENSIONS AND DIFFERENCES FROM STANDARD LISP
- The following functions are implemented exactly according to their
- definitions in [1].
- ABS, AND, APPEND, ATOM, CONS, DE, DEFLIST, DELETE, DF, DIFFERENCE,
- DIVIDE, DM, EJECT, EQ, EQN, EQUAL, EXPAND, EXPT, FIX, FLAG, FLAGP,
- FLOAT, FLUIDP, FUNCTION, GENSYM, GET, GETD, GETV, GLOBALP, GREATERP,
- IDP, INTERN, LENGTH, LESSP, LIST, LPOSN, MAP, MAPC, MAPCAN, MAPCAR,
- MAPCON, MAPLIST, MAX, MAX2, MEMBER, MEMQ, MIN, MINUS, MIN2, MKVECT,
- NOT, NULL, OR, PAGELENGTH, PAIR, PLUS, PLUS2, POSN, PRINT, PRIN1,
- PRIN2, PROG, PROGN, PUT, PUTV, QUOTE, QUOTIENT, REMAINDER, REMD,
- REMFLAG, REMOB, REMPROP, REVERSE, SASSOC, SUBLIS, SUBST, TERPRI,
- TIMES, TIMES2, UPBV.
- The rest of this section describes new functions and functions that
- differ from those in Standard Lisp.
- 2.1 Boolean Argument And Predicates
- In this Standard Lisp implementation all booleans are actually
- extra-boolean, i.e. functions that test boolean arguments test for
- NIL or not NIL, they never test for T. The predicates BIGP,
- CONSTANTP, DIGIT, FILEP, FIXP, FLOATP, INUMP, LITER, NUMBERP, PAIRP
- and STRINGP return their argument instead of T when the tested
- condition is true. VECTORP is identical to UPBV so that it returns
- the upper limit if its argument is a vector. Currently CODEP returns
- T if its argument is a code-pointer, but this might change in future
- versions.
- 2.2 Error Handling
- Error handling is somewhat different from that described in [1] 3.8.
- Almost no Lisp system errors use the ERROR function. They are
- handled internally in a similar way as a call to ERROR, the only
- difference from a call to ERROR, is that the global variable EMSG* is
- set to the offending expression (not the entire message) for messages
- that include an offending part and to NIL for others.
- After an error various types of backtraces will be printed depending
- on the value of the variable *BAKGAG. If *BAKGAG is not NIL then a
- backtrace is printed as a series of function calls, determined from
- the regular pushdown list (stack), starting from the most recent
- function call. If *BAKGAG is 0 or a negative integer then
- S-expressions found on the stack (RPDL) will also be printed. If
- *BAKGAG is +N or -N where N is an integer, then only the N last slots
- on the stack will be considered (besides function calls and
- S-expressions, the stack may contain other objects that are not
- printed). The format for printing is:
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 9
- printout meaning
________ _______
- fn1-fn2 Function 1 called function 2
- fn1-EVALARGS The arguments to fn1 are being evaluated
- before entering function 1.
- fn1-ENTER Function 1 is entered.
- ?-fn1 Some internal LISP function called function
- 1.
- NIL-fn1 Function 1 was called from a place other
- than BPS or the Lisp system code. Something
- is very wrong.
- =sexp1 The S-expression 1 was on the stack.
- Note: The BACKTRACE printout is often confused by compiled function
- calls of the form (RETURN (FOO X)) which is compiled as
- (JCALL (E FOO)) which will not show up in the BACKTRACE.
- ERROR(ERVAL:any, MESSAGE:any)
_____________________________
- This function is similar to that in [1] 3.8 but ERVAL is not
- necessarily an integer and the backtrace is somewhat different.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 10
- EXPR PROCEDURE ERROR(ERVAL,MESSAGE);
- BEGIN SCALAR OCH;
- EMSG!*:=MESSAGE;
- IF NULL !*ERRMSG THEN GOTO ER
- ELSE IF !*ERRMSG NEQ 0 THEN OCH:=WRS NIL;
- IF NULL MESSAGE THEN GOTO BR;
- TERPRI();
- PRIN2 "***** ";
- IF ATOM MESSAGE THEN <<PRIN2 MESSAGE; GOTO BR>>;
- PRIN1 CAR MESSAGE;
- PRINC '! ;
- FOR EACH Y IN CDR MESSAGE DO <<PRIN2 Y; PRINC '! >>;
- BR: IF NOT !*BAKGAG THEN GOTO NB
- ELSE IF NOT FIXP !*BAKGAG THEN
- {backtrace stack back to ERRORSET, printing function calls}
- ELSE IF !*BAKGAG = 0 THEN
- {backtrace stack back to ERRORSET,
- printing function calls and arguments}
- ELSE IF !*BAKGAG > 0 THEN
- {backtrace !*BAKGAG last slots on stack,
- printing function calls}
- ELSE IF !*BAKGAG < 0 THEN
- {backtrace -!*BAKGAG last slots on stack,
- printing function calls and arguments}
- TERPRI();
- IF !*ERRMSG NEQ 0 THEN WRS OCH;
- ER: {return ERVAL to a surrounding ERRORSET, unbinding
- FLUID variables to the environment of the ERRORSET}
- END;
- ERRORSET(U:any, !*ERRMSG:any, !*BAKGAG:any):any
_______________________________________________
- Type: EVAL, SPREAD
- The difference from the definition in [1] 3.8 are that the second and
- third variables are FLUID and of type any. The effect of these
- variables can be seen in the preceding definition of ERROR. Note
- that messages are printed on the standard output device or the
- current output device, not on both.
- If the GLOBAL variable !*RSET, of type boolean, is T then an ERROR
- that is not surrounded by ERRORSET (except the top level of Lisp)
- doesn't restore the environment of the top level. This makes it
- possible to examine the variable bindings after an error. To restore
- variable bindings to their top level values, type a bell ( ^G ).
- WARNING(MESSAGE:any):NIL
________________________
- Type: EVAL, SPREAD
- Prints a message in a format similar to error messages, but preceded
- by 3 asterisks instead of 5. If !*ERRMSG is 0 then the message is
- printed on the current output device, otherwise on the standard
- output device. If !*MSG is NIL then no message is printed.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 11
- EXPR PROCEDURE WARNING MESSAGE;
- BEGIN SCALAR OCH;
- IF NOT !*MSG THEN RETURN;
- IF !*ERRMSG NEQ 0 THEN OCH:=WRS NIL;
- TERPRI();
- PRIN2 "*** ";
- IF ATOM MESSAGE THEN <<PRIN2 MESSAGE; GOTO BR>>;
- PRIN1 CAR MESSAGE;
- PRINC '! ;
- FOR EACH Y IN CDR MESSAGE DO <<PRIN2 Y; PRINC '! >>;
- BR: TERPRI();
- IF !*ERRMSG NEQ 0 THEN WRS OCH
- END;
- TIME():integer
______________
- Type: EVAL, SPREAD
- TIME returns the CPU-time in milliseconds since the job was logged
- in.
- 2.3 I/O
- The I/O routines OPEN, CLOSE, RDS and WRS are similar to those in
- [1]. A description of the system dependent parts and the (minor)
- differences from [1] is given below.
- OPEN(FILENAME-LIST:list, HOW:id):{integer, NIL}
_______________________________________________
- OPEN associates the specified files (might be more than one) with one
- of the 16 possible I/O channels in Lisp and returns as value the
- number of the channel. This number is then used as argument to
- CLOSE, RDS and WRS. The channels are numbered from 0 to 15. Channel
- 0 is the standard device (i.e. the TTY). It is always open for both
- input and output and cannot be closed. Instead of 0, NIL can be used
- and 0 is always converted to NIL by RDS and WRS before assigning
- values to the globals INC* and OUTC*.
- The syntax for FILENAME-LIST is as follows:
- <filename-list> ::= (<file-spec>)
- ::= <id or string>
- <file-spec> ::= <filename>
- ::= <file-spec> <filename>
- ::= <device-name> <file-spec>
- <devicename> ::= <id or string>:
- ::= (<atom> <atom>)
- ::= DIR: <id or string>
- <filename> ::= <id or string>
- ::= (<id or string> . <id or string>)
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 12
- Semantics:
- A filename-list that is an atom is the same as device DSK:, the atom
- as filename and no extension.
- A device-name is either an identifier or string ending with colon (:)
- which is the name of an input or output device, or a list containing
- a project-programmer number, or (not in TOPS-10 version) DIR:
- followed by an identifier or string which is the name of a disk
- directory. In the two last cases, the disk is implicitly specified.
- I/O device names may not have more than three characters plus a
- colon.
- A filename is either an identifier or string which specifies a
- filename with a blank extension, or a dotted pair of filename and
- extension. In both cases the filename applies to the recently (to
- the left) specified device-name. If no device-name is specified,
- then DSK: is assumed. A filename may not be longer than six, and an
- extension not longer than three characters.
- HOW must be either INPUT, OUTPUT, INBIN or OUTBIN. The last two
- keywords are used for binary I/O together with BINI and BINO. They
- are mainly intended for the Fap loader.
- CLOSE(CHANNELNAME:{integer, NIL}):{integer, NIL}
________________________________________________
- Type: EVAL, SPREAD
- CLOSE closes the specified channel if it is open and returns its
- argument as value. If CHANNELNAME is NIL or 0 then nothing happens
- and NIL is returned.
- RDS(CHANNELNAME:{integer, NIL}):{integer, NIL}
______________________________________________
- Type: EVAL, SPREAD
- RDS selects the specified channel for input and returns as value the
- channelname for the previously selected channel. When the end of the
- selected channel is reached, the channel is automatically closed.
- RDS sets the global variable INC* to the channel name for the
- currently selected input channel.
- WRS(CHANNELNAME:{integer, NIL}):{integer, NIL}
______________________________________________
- Type: EVAL, SPREAD
- WRS selects the specified channel for output and returns as value the
- channel name for the previously selected channel. WRS sets the
- global variable OUTC* to the channel name for the currently selected
- output channel.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 13
- FILEP(FILENAME-LIST:list):{list, NIL}
_____________________________________
- Type: EVAL, SPREAD
- FILENAME-LIST specifies a file in the same way as the first argument
- to OPEN. If this is an existing file, then FILEP returns its
- argument, otherwise NIL is returned.
- SETSYS(SYSDEVICE:any):{integer, string}
_______________________________________
- Type: EVAL, SPREAD
- SETSYS redefines the meaning of the device SYS: for OPEN. It is a
- different function when running on a Tenex machine as compared with
- running on a Tops-10 or Tops-20 machine.
- On a Tenex machine, if SYSDEVICE is a non-negative integer, then SYS:
- is set to mean the directory with directory number SYSDEVICE.
- On a Tops machine, if SYSDEVICE is an identifier or string ending
- with a colon ":", then SYSDEVICE is regarded as the name of an I/O
- device and SYS: is set to mean that device. The device name may not
- contain more than three characters, not counting the colon.
- If SYSDEVICE is anything else, then nothing is changed. The value of
- SETSYS is the directory number respectively the device name
- associated with SYS: after the call to SETSYS.
- SETPCHAR(PROMPT:{id or string}):id
__________________________________
- Type: EVAL, SPREAD
- SETPCHAR sets the Lisp prompter to the four first characters of
- PROMPT and returns the previous prompter as a non interned id.
- RDSLSH(U:boolean):boolean
_________________________
- Type: EVAL, SPREAD
- RDSLSH affects how READ reads the characters "%", "@", "'", "/", "!",
- "[", "]", "<" and ">". If U is NIL then READ is set to read Standard
- Lisp, which means that "'" is quote, "%" is start of a comment ending
- at (but not including) <lf>, "!" is escape (slashifier), "[" and "]"
- surround a vector, "<" and ">" are super parentheses and "@" and "/"
- are letters. If U is not NIL (e.g. T) then READ is set to read
- LISP 1.6, which means that "@" is quote, "/" is escape, "[" and "]"
- are super parentheses and "%", "<", ">", "'" and "!" are letters.
- RDSLSH ends by calling SCANSET(NIL).
- PGLINE():pair
_____________
- Type: EVAL, SPREAD
- PGLINE returns a dotted pair of current line and current page of
- input. When the input is coming from the TTY, then the the answer is
- always (1 . 1). When the input is coming from a file with SOS or
- EDIT line numbers, then those line numbers are returned, otherwise
- the line and page numbers are found by counting line and page feeds.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 14
- READ():any
__________
- Type: EVAL, SPREAD
- READ is the same as in [1] with the following differences. The
- delimiters "<" and ">" operate as "super-parentheses". A right angle
- bracket ">" will close all open left parentheses "(" up to matching
- left angle bracket "<". If there is no matching left angle bracket,
- it will close the entire S-expression.
- When the input is comming from the terminal, then the character
- altmode (or escape) will end the input line and close the
- S-expression being read in the same way as a rigth angle bracket
- without a matching left angle bracket.
- SKIPTO(SKPCH:{id, string}):integer
__________________________________
- Type: EVAL, SPREAD
- SKIPTO skips characters from the selected input channel until a
- character is found that matches the first character in the print name
- of SKPCH. The ASCII code for that character is returned as value.
- TYI():integer
_____________
- Type: EVAL, SPREAD
- TYI reads the next character from the selected input channel and
- returns the ASCII code for that character.
- UNREADCH(BCHR:id):id
____________________
- Type: EVAL, SPREAD
- UNREADCH puts the first character in BCHRs print name in an internal
- backspace buffer and returns BCHR. This has as effect that when a
- character is to be read from the selected input channel, then it is
- instead taken from the backspace buffer and the buffer is cleared so
- that subsequent characters are read from the selected input channel.
- The buffer can only contain one character at a time. If a second
- UNREADCH is executed before the buffer is cleared, then the buffer is
- overwritten with the new BCHR, undoing the effect of the first
- UNREADCH.
- UNREADCH should only be used after TYI or READCH. The reason for
- this is that functions that read atoms (READ and SCAN), uses the
- backspace buffer to store the delimiter.
- TYO(OCHR:integer):integer
_________________________
- TYO prints the character whose ASCII code is OCHR and returns OCHR.
- PAGELENGTH and LINELENGTH
__________ __________
- are similar to their definition in [1] but there is no upper limit to
- their argument. The argument should be a positive number or NIL.
- PAGELENGTH also accepts 0 as argument. Calls to PAGELENGTH or
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 15
- LINELENGTH do only affect the presently selected output channel.
- Each output channel that is OPENed, has initially LINELENGTH 112
- (decimal) and PAGELENGTH 0 (i.e. no paging). The TTY channel
- (channel NIL) has initially LINELENGTH 69 and PAGELENGTH 0.
- The character ^Z (Ascii 32) is used by PRIN1, PRIN2 and PRINT to
- break an atom that is to long to fit in on the current line. All
- reading routines (TYI, READCH and READ) will ignore everything
- between a ^Z and a <lf> including the end points.
- Standard Lisp uses the character ^_ (Ascii 37) internaly as end of
- line character. The reading routines will interpret a single <lf>, a
- single <ff> or a <cr> followed by a <lf> or a <ff> as an end of line.
- The printing routines print ^_ as <cr><lf>, except for TYO: (TYO 37)
- (octal) prints ^_ (control ).
- 2.4 The Interpreter
- The interpreter is an extension of that defined in [1]. The main
- differences from [1] are:
- The body of a lambda expression is an implied PROGN.
- Environments can be passed around (FUNARG feature).
- The LABEL construct is supported.
- FEXPRs may have a second argument that is the environment.
- The compiler doesn't support these features.
- EVAL(U:any):any
_______________
- Type: EVAL, SPREAD
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 16
- EXPR PROCEDURE EVAL U;
- BEGIN SCALAR FN;
- RETURN
- IF ATOM U THEN
- IF NOT IDP U THEN U
- ELSE IF A:=GET(U,VALUE) AND NOT(A:=CDR A EQ 'UNBOUND) THEN A
- ELSE ERROR(29,LIST(U,"UNBOUND VARIABLE))
- ELSE IF IDP CAR U THEN
- IF A:=GETD CAR U THEN
- IF CAR A EQ 'EXPR THEN APPLY(CDR A,EVLIS CDR U)
- ELSE IF CAR A EQ 'FEXPR THEN APPLY(CDR A, LIST CDR U)
- ELSE IF CAR A EQ 'MACRO THEN EVAL APPLY(CDR A, LIST U)
- ELSE ERROR(28,LIST(CAR U,"UNDEFINED FUNCTION"))
- ELSE IF A:=GET(CAR U,'VALUE) AND NOT((A:=CDR A) EQ 'UNBOUND)
- AND NOT(A EQ CAR U) THEN EVAL A . CDR U
- ELSE ERROR(28,LIST(CAR U,"UNDEFINED FUNCTION"))
- ELSE IF PAIRP CAR U OR CODEP CAR U
- THEN APPLY(CAR U, EVLIS CDR U)
- ELSE ERROR(28,LIST(CAR U,"UNDEFINED FUNCTION"))
- END;
- Note: The identifier UNBOUND is not interned and the ERROR function
- is not used.
- APPLY(FN:any, ARGS:list):any
____________________________
- Type: EVAL, SPREAD
- EXPR PROCEDURE APPLY(FN,ARGS);
- BEGIN SCALAR A;
- RETURN
- IF ATOM FN THEN
- IF IDP FN THEN
- IF A:=GETD FN THEN
- IF CAR A EQ 'EXPR THEN APPLY(CDR A, ARGS)
- ELSE ERROR(31,LIST(FN,"NOT EXPR - APPLY"))
- ELSE IF A:=GET(FN,'VALUE) AND NOT((A:=CDR A) EQ 'UNBOUND)
- AND NOT(A EQ FN) THEN APPLY(A,ARGS)
- ELSE ERROR(30,LIST(FN,"UNDEFINED FUNCTION - APPLY"))
- ELSE IF CODEP FN THEN
- IF LENGTH ARGS > 14 THEN ERROR(145,"TO MANY ARGS FOR EXPR")
- ELSE {spread the actual parameters in ARGS, transfer to entry
- point of the function and return the value returned
- by the function}
- ELSE ERROR(30,LIST(FN,"UNDEFINED FUNCTION - APPLY"))
- ELSE IF CAR FN EQ 'LAMBDA THEN
- IF A:=CADR FN AND IDP FN THEN ERROR(146,"ILLEGAL LAMBDA FORMAT")
- ELSE IF (A:=LENGTH A - LENGTH ARGS) < 0 THEN
- ERROR(147,"TO MANY ARGUMENTS SUPPLIED - APPLY")
- ELSE IF A > 0 THEN
- IF A=1 AND LENGTH ARGS =1 AND
- {APPLY was called from EVAL to evaluate FEXPR call} THEN
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 17
- APPLY(FN,LIST(CAR ARGS,{binding context pointer (BCP)}))
- ELSE ERROR(148,"TO FEW ARGUMENTS SUPPLIED - APPLY")
- ELSE <<{bind the actual parameters in ARGS to the formal
- parameters in CADR FN};
- A:=EVAL('PROGN . CDDR FN);
- {unbind formal parameters};
- A>>
- ELSE IF CAR FN EQ 'FUNARG THEN
- <<{unbind parameters back to BCP in CADDR FN};
- A:=APPLY(CADR FN,ARGS);
- {restore bindings};
- A>>
- ELSE IF CAR FN EQ 'LABEL THEN
- <<{bind function in CADDR FN to formal name in CADR FN};
- A:=APPLY(CADDR FN,ARGS);
- {unbind name};
- A>>
- ELSE APPLY(EVAL FN,ARGS)
- END;
- !%EVAL(U:any,ENV:{list, integer}):any
_____________________________________
- Type: EVAL, SPREAD
- EXPR PROCEDURE !%EVAL(U,ENV);
- BEGIN SCALAR A;
- IF PAIRP ENV THEN FOR EACH X IN ENV DO
- {bind actual parameter in CDR X to formal parameter in CAR X}
- ELSE {ENV is a BCP. Unbind parameters back to BCP};
- A:=EVAL U;
- {restore parameters};
- RETURN A
- END;
- !%APPLY(FN:any,ARGS:list,ENV:{list, integer}):any
_________________________________________________
- Type: EVAL, SPREAD
- EXPR PROCEDURE !%APPLY(FN,ARGS,ENV);
- !%EVAL(LIST('APPLY,FN,ARGS),ENV);
- !*FUNCTION(FN:any)
__________________
- Type: EVAL, SPREAD
- !*FUNCTION is used instead of FUNCTION when it is necessary to pass
- along an environment together with a function definition.
- FEXPR PROCEDURE !*FUNCTION FN;
- LIST('FUNARG,CAR FN,{BCP for current environment});
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 18
- 2.5 The Fap Loader
- The Fap loader loads binary files generated by the compiler.
- FLOAD(FILE-LIST:list):NIL
_________________________
- Type: NOEVAL, NOSPREAD
- FILE-LIST is a list of identifiers or strings, each of which is the
- name of a file with the implied extension FAP. FLOAD loads these
- files with the Fap loader.
- FEXPR PROCEDURE FLOAD FILES;
- FOR EACH X IN FILES DO FISLM X;
- FISLM(FILE:id):NIL
__________________
- Type: EVAL, SPREAD
- FISLM loads the Fap file FILE.FAP.
- If the global variable *PREDEF is not NIL then the Fap loader prints
- the message:
- *** x REDEFINED
- if the function x is redefined.
- If the global variable *PURIFY is not NIL then the Fap loader will
- try to convert the function links in the loaded binary code, from
- slow to fast links.
- 2.6 Logical Routines And LAP Support
- The following routines are mainly intended for use by the Lisp
- Assembler (LAP).
- !*BOX(POINTER:any):integer
__________________________
- Type: EVAL, SPREAD
- !*BOX converts POINTER from its machine representation to a Lisp
- number. !*BOX is the inverse operation to NUMVAL.
- NUMVAL(NUM:number):any
______________________
- Type: EVAL, SPREAD
- NUMVAL converts the number NUM from its Lisp representation to its
- machine representation. NUMVAL(!*BOX(x)) is EQ to x for any x.
- !*BOX(NUMVAL(x)) is EQUAL to x if x is an INUM or a FIXNUM.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 19
- MKCODE(ADR:integer, NARG:integer):codepointer
_____________________________________________
- Type: EVAL, SPREAD
- MKCODE converts the address ADR into a code pointer. NARG is the
- number of arguments.
- BOOLE(OPR:integer, A:integer, B:integer):integer
________________________________________________
- Type: EVAL, SPREAD
- BOOLE performs a 36 bit Boolean operation on A and B. OPR specifies
- which of 16 Boolean operations to perform. These operations are
- defined in the following table of the result for the i:th bit in the
- answer with given value of OPR and i:th bit of A and B. In the table
- "-" stands for boolean not.
- A,B 0,0 1,0 0,1 1,1
- OPR
- 0 0 0 0 0 0
- 1 A^B 0 0 0 1
- 2 -A^B 0 0 1 0
- 3 B 0 0 1 1
- 4 A^-B 0 1 0 0
- 5 A 0 1 0 1
- 6 -A=B 0 1 1 0
- 7 AvB 0 1 1 1
- 8 -A^-B 1 0 0 0
- 9 A=B 1 0 0 1
- 10 -A 1 0 1 0
- 11 -AvB 1 0 1 1
- 12 -B 1 1 0 0
- 13 Av-B 1 1 0 1
- 14 -Av-B 1 1 1 0
- 15 1 1 1 1 1
- As can be seen from above, OPR is the number whose binary
- representation is the corresponding table entry.
- LSH(NUM:integer, SHIFT:integer):integer
_______________________________________
- Type: EVAL, SPREAD
- LSH performs a logical 36 bit left shift of SHIFT places on NUM. If
- SHIFT is negative, then NUM will be shifted right. In both cases,
- vacated bits are filled with zeros.
- EXAMINE(ADR:integer):integer
____________________________
- Type: EVAL, SPREAD
- EXAMINE converts the word at address ADR in memory to a Lisp number
- and returns it.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 20
- DEPOSIT(NUM:number, ADR:integer):integer
________________________________________
- Type: EVAL, SPREAD
- DEPOSIT deposits the 36 bit machine representation of NUM in the word
- at address ADR in memory. NUM is returned as value.
- 2.7 The Alternative Scanner SCAN
- Lisp uses a table driven scanner. There are two scanner tables, the
- Standard Lisp table and a second table that may be modified by the
- user for the purpose of implementing scanners for other languages.
- The syntax when using the second table is:
- <alphabetic> ::= A|B| ... |Z|a| ... |z
- <extra letter> ::= <initially no character>
- <letter> ::= <alphabetic>|<extra letter>
- <ignored> ::= <tab>|<lf>|<vtab>|<ff>|<cr>|<space>
- <digit> ::= 1|2|3|4|5|6|7|8|9
- <delimiter> ::= <all characters except letter, digit or
- ignored>
- <special control> ::= <null>|^Z|+|-|.|E|<comment start>|<comment
- end>|<string start>|<string end>|<slashifier>
- <identifier> ::= <letter>
- ::= <slashifier><any character>
- ::= <identifier><digit>
- ::= <identifier><identifier>
- <comment> ::= <comment start><any characters except comment
- end>
- ::= ^Z<any characters except lf or ff><lf or ff>
- <string-text> ::= <any character except string end>
- ::= <string end><string end>
- ::= <string-text><string-text>
- <string> ::= <string start><string-text><string end>
- The syntax for numbers is as usual (see 1.3), except that leading
- signs ("+" or "-") in numbers are treated as delimiters.
- In the above syntax letter, delimiter, ignored, comment start,
- comment end, string start, string end and slashifier can be changed
- by the user. Initially comment start is "%", comment end is <lf>,
- string start and string end is " (double quote) and the slashifier is
- "!", i.e. the same as for the ordinary Lisp scanner. Note that "^Z"
- starts a comment also when comment start has been defined as
- something else. Note also that the comment end is not commented out
- in a comment started by something else than ^Z.
- 2.7.1 Scanner Functions - In the following descriptions, all
- characters are specified by their ASCII code. E.g. " " is (in octal)
- 40 and "A" is 101.
- SCANSET(SWITCH:extraboolean):extraboolean
_________________________________________
- Type EVAL, SPREAD
- SCANSET switches the scanners attention between the two scanner
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 21
- tables. If SWITCH is NIL the Standard Lisp scanner table is used,
- otherwise the user settable scanner table is used. SCANSET returns
- the previous setting.
- SCANINIT(COMMENT-START:integer, COMMENT-END:integer,
____________________________________________________
- STRING-START:integer, STRING-END:integer, SLASHIFIER:integer):NIL
_________________________________________________________________
- Type EVAL, SPREAD
- SCANINIT reinitializes the scanner so that all characters except
- alphabetics and digits, are delimiters (no ignored). It then sets
- comment start, comment end, string start, string end and slashifier
- to be the specified characters.
- DELIMIT(CHAR:integer):integer
_____________________________
- Type EVAL, SPREAD
- DELIMIT specifies to the scanner that CHAR is a delimiter. CHAR is
- returned as value.
- LETTER(CHAR:integer):integer
____________________________
- Type EVAL, SPREAD
- LETTER specifies to the scanner that CHAR is a letter, and thus
- allows CHAR to be in an identifier. CHAR is returned as value.
- IGNORE(CHAR:integer):integer
____________________________
- Type EVAL, SPREAD
- IGNORE specifies to the scanner that CHAR is not to be returned as a
- delimiter from scan, but instead will be ignored. However, CHAR will
- still function as a delimiter inside a number or an identifier.
- SCAN():integer
______________
- Type EVAL, SPREAD
- SCAN reads an atom or delimiter and sets the variable SCNVAL to the
- value read, and returns a number corresponding to the syntactical
- type read as follows:
- Type SCAN value SCNVAL value
- identifier 0 the uninterned identifier
- string 1 the string
- number 2 the number
- delimiter 3 an interned id with the delimiter
- as print name
- SCAN will give different results depending on which scanner is used.
- READ checks which scanner is used and will temporarily switch to the
- Standard Lisp scanner if that scanner is not already used. An error
- in READ might leave the Standard Lisp scanner in use even though it
- wasn't before the READ.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 22
- 2.8 Other Functions
- INTERNP(U:any):extra-boolean
____________________________
- Type: EVAL, SPREAD
- INTERNP returns T if U is an interned id, otherwise NIL.
- INUMP(U:any):extra-boolean
__________________________
- Type: EVAL, SPREAD
- INUMP returns U if it is an INUM, otherwise NIL.
- BIGP(U:any):extra-boolean
_________________________
- Type: EVAL, SPREAD
- BIGP returns U if it is a BIGNUM, otherwise NIL.
- GCD(A:integer, B:integer):integer
_________________________________
- Type: EVAL, SPREAD
- GCD returns the greatest common divisor of A and B.
- COMPRESS(U:id-list):any
_______________________
- Type: EVAL, SPREAD
- COMPRESS is similar to the definition in [1], but it is currently
- more general. It uses READ to read the character ids in U and it can
- read an arbitrary S-expression.
- EXPLODE(U:any):id-list
______________________
- Type: EVAL, SPREAD
- EXPLODE is similar to the definition in [1], but it is currently more
- general as it can explode any S-expression. This is done by using
- PRIN1 to print to a list. EXPLODE uses the Standard Lisp scanner
- table and will temporarily switch scanner tables if necessary.
- EXPLODEC(U:any):id-list
_______________________
- Type: EVAL, SPREAD
- EXPLODEC is similar to EXPLODE but it uses PRIN2 instead of PRIN1.
- This means that the escape character does not prefix special
- characters and strings are not enclosed by " ... ".
- SET and SETQ
___ ____
- are the same as in [1] except that they do not declare unknown
- variables to be FLUID.
- FLUID, UNFLUID and GLOBAL
______ _______ ___ ______
- are similar to their definition in [1] but they presently have some
- side effects used by REDUCE.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 23
- PUTD(U:id,V:id,W:any):id
________________________
- Type: EVAL, SPREAD.
- If U is flagged LOSE, then PUTD does nothing. If V is EXPR, FEXPR or
- MACRO, then U is defined as a function of type V with function
- property W else PUTD is the same as PUT.
- If *COMP is on and FLAGP(V,'COMPILE) and W is a LAMBDA expression
- then W is compiled. Initially EXPR and FEXPR are flagged COMPILE.
- ATSOC(U:any, V:alist):{dotted-pair, NIL}
________________________________________
- Type: EVAL, SPREAD
- ATSOC is similar to ASSOC but it uses EQ instead of EQUAL.
- EXPR PROCEDURE ATSOC(U, V);
- IF NULL V THEN NIL
- ELSE IF U EQ CAAR V THEN CAR V
- ELSE ASSOC(U, CDR V);
- ASCII(COD:integer):integer
__________________________
- Type: EVAL, SPREAD
- ASCII returns an non-interned single character identifier such that
- the ASCII code for the character is COD.
- Example: (ASCII 101) returns an identifier with print name "A".
- COND([U:cond-form]):any
_______________________
- Type: NOEVAL, NOSPREAD
- Cond-form is more general than that defined in [1] 2.3. A cond-form
- is a list of N+1 element lists of the form:
- (ANTECEDENT:any CONSEQUENT-1:any ... CONSEQUENT-N:any)
- where N is a non-negative integer.
- The Antecedents are evaluated in their order of appearance until a
- non-NIL value is encountered. The consequents of the selected U are
- evaluated from left to right and the value of the last consequent is
- returned as value of COND. If there are no consequents then the
- value of the antecedent is returned.
- FREEZE(U:boolean)
_________________
- Type: EVAL, SPREAD
- FREEZE halts the Lisp system in such a way that it can later be
- restarted. The value of U determines what happens when the system is
- restarted: If U is true (not NIL) then any additional memory is
- allocated and the the system is back at the top level. If U is NIL
- then the system is restored to where it was (except for that all
- files are closed), and NIL is returned as value of FREEZE.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 24
- 2.9 Memory Allocation
- The Standard Lisp system has many different areas of memory for
- storing data which can independently vary in size. Some LISP
- applications demand larger allocations for these areas than others.
- To allow users to adjust the sizes of these areas to their own needs,
- a memory allocation procedure exists.
- 2.9.1 Storage Allocation Areas -
- BINARY PROGRAM SPACE Compiled functions and vectors.
- FREE STORAGE LISP pairs
- FULL WORD SPACE Numbers and print names
- BIT TABLES Used by garbage collector
- REGULAR PUSHDOWN LIST Return addresses for function calls and
- local variables in interpreter and
- compiled code.
- SPECIAL PUSHDOWN LIST Old bindings of fluid variables.
- EXPANDED CORE I/O buffers.
- The various areas are differently allocated on a Tops-10 machine as
- compared with a Tops-20 or Tenex machine. The memory map for the two
- cases are as follows:
- TOPS-10 TENEX or TOPS-20
- TOP OF CORE
- -------------------------
- | BINARY PROGRAM SPACE |
- -------------------------
- BOTTOM OF HIGH CORE
- TOP OF CORE TOP OF LOW CORE
- ------------------------- -------------------------
- | EXPANDED CORE | | EXPANDED CORE |
- ------------------------- -------------------------
- | SPECIAL PUSHDOWN LIST | | SPECIAL PUSHDOWN LIST |
- ------------------------- -------------------------
- | REGULAR PUSHDOWN LIST | | REGULAR PUSHDOWN LIST |
- ------------------------- -------------------------
- | BIT TABLES | | BIT TABLES |
- ------------------------- -------------------------
- | FULL WORD SPACE | | FULL WORD SPACE |
- ------------------------- -------------------------
- | FREE STORAGE | | FREE STORAGE |
- ------------------------- -------------------------
- | BINARY PROGRAM SPACE | | LISP INTERPRETER |
- ------------------------- -------------------------
- | LISP INTERPRETER | BOTTOM OF CORE
- -------------------------
- BOTTOM OF CORE
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 25
- 2.9.2 Allocation -
- When the Lisp system is initially started, it asks the user:
- ALLOC?
- If this is answered with "Y" then the following questions are asked,
- otherwise the default values are used. The questions vary slightly
- between a Tops-10, a Tops-20 and a Tenex machine:
- Tops-10 Tops-20 Tenex Default Meaning
- Core (K): Core (K): 12 K words core (decimal).
- SYS: SYS: SYS: Meaning of SYS: in OPEN.
- SYS: dir# Dir# for Meaning of SYS: in OPEN.
- <REDUCE> or 0.
- FWDS= FWDS= FWDS= 400+1/4FREE Words full word space
- (octal)
- BPS.= 2000 Words binary program
- space (octal)
- SPDL= SPDL= SPDL= 1000 Words special pushdown
- list (octal)
- RPDL= RPDL= RPDL= 1000 Words regular pushdown
- list (octal)
- HASH= HASH= HASH= 77 Number of buckets in
- oblist (octal)
- There are two basic responses to any of these questions:
- 1. A space causes the default value to be used.
- 2. A number ended by a space or a cr causes the number to be
- used.
- 2.9.3 Reallocating Space -
- CORE(SIZE:integer):integer
__________________________
- Type: EVAL, SPREAD
- If SIZE is 0 then CORE returns the (low-)core size including extended
- core. If SIZE is negative then CORE returns the (low-)core size
- excluding extended core (i.e. Lisp allocated core).If SIZE is a
- positive integer then the system will try to allocate SIZE K words
- (low-)core.
- If SIZE is smaller than current Lisp alloc. core, then the warning
- message:
- *** CAN'T CUT CORE INTO ALLOCATED SPACE
- is printed, no action is taken and the value returned is the same
- as that when SIZE is negative (i.e. minimum positive value of
- SIZE).
- Otherwise the core will be expanded to SIZE K words and (if not a
- (EXCORE n) has been executed) then the additional core will be
- reallocated in the following way:
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 26
- 1/4 for full words space
- 1/64 for each push down list
- about 1/16 for bit tables
- the remainder for free storage (Lisp cells)
- The above described allocation scheme is also used if the run of Lisp
- is stopped (by an error or by a ^C) and then either started again by
- the START command or SAVEd and then RUN again. When BPS is in high
- core (Tops-20 or Tenex) then it is automatically expanded as long as
- there is free high core. When BPS is in low core (Tops-10) then The
- binary program space can not actually be expanded, but an extra
- binary program space can be defined in the expanded core by the
- following function.
- EXCORE(ARG:any):any
___________________
- Type: EVAL, SPREAD
- EXCORE has two effects:
- 1. The allocation procedure described in CORE, is inhibited if
- ARG is not NIL.
- 2. In case of a Tops-10 machine, there is also a second effect:
- If ARG is a positive integer then ARG K words of binary
- space is defined in extra core and BPORG and BPEND are set
- to the beginning and end of this extra BPS. If ARG is 0 or
- NIL then BPORG and BPEND are set to their old values in
- ordinary BPS if they have been set to point into extra BPS.
- EXCISE():T
__________
- Type: EVAL, SPREAD
- EXCISE contracts core to its size excluding extra core.
- Note that if a Lisp core image is saved and later RUN, then the extra
- core will be reallocated as described in CORE.
- 2.10 The Garbage Collector
- The garbage collector in LISP is called whenever FREE STORAGE or FULL
- WORD SPACE is exhausted. The garbage collector analyzes the entire
- state of list structure which is pointed to by either the OBLIST, the
- regular pushdown list, the special pushdown list, list arrays, and a
- few other special cells. By recursively marking all words in free
- and full word spaces which are pointed to in this manner, it is
- possible to determine which words are not pointed to and are
- therefore garbage. Such words are collected together on their
- respective free storage or full word space lists.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 27
- RECLAIM():NIL
_____________
- Type: EVAL, SPREAD
- RECLAIM causes a garbage collection to occur and returns NIL.
- GCTIME():integer
________________
- Type: EVAL, SPREAD
- GCTIME returns the number of milliseconds LISP has spent garbage
- collecting since it was started.
- SPEAK():integer
_______________
- Type: EVAL, SPREAD
- SPEAK returns the total number of CONSes which have been executed
- since LISP was started.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 28
- 3.0 GLOBAL (FLUID) SYSTEM VARIABLES
- *RAISE, NIL and T are implemented as described in [1]..
- The following variables differ from those defined in [1].
- *COMP - Initial value = NIL
_____
- See description of PUTD in section 2.8.
- EMSG* - Initial value = NIL
_____
- Most of the system errors do not use ERROR and only part of their
- message is found as the value of EMSG*. See ERROR.
- $EOF$ - Initial value = $EOF$
_____
- $EOF$ is returned to a surrounding ERRORSET (or the top level if
- there is none) when a input function reaches the end of the currently
- selected input file.
- $EOL$ - Initial value = ^_ (Ascii 37)
_____
- See description of ^_ at the end of section 2.3.
- The following variables are extensions of Standard Lisp:
- *BAKGAG - Initial value = NIL
_______
- *BAKGAG is the third argument to ERRORSET. If *BAKGAG is not NIL
- then a backtrace will be printed when an error occurs. For the
- different forms of backtraces depending on the value of *BAKGAG see
- ERROR.
- *DDTIN - Initial value = NIL
______
- *DDTIN controls whether input from the TTY is seen line by line or
- character by character.
- If *DDTIN is NIL, then input is seen line by line, i.e. the input
- buffer is only sent to the Lisp system when a carriage return, a line
- feed, a form feed or an altmode is typed on the TTY. This means that
- terminal editing characters like ^U, <rub> etc. (or corresponding in
- a Tenex system) can be used.
- If *DDTIN is not NIL (e.g. T) then input is seen character by
- character, i.e. each character is sent to the Lisp system when it is
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 29
- typed on the TTY. This means that editing characters can't be used,
- but <rub> will delete the entire S-expression being read and start
- reading again.
- *ERRMSG - Initial value = T
_______
- *ERRMSG is the second argument to ERRORSET. If *ERRMSG is NIL then
- no error message will be printed. If *ERRMSG is 0 then error
- messages will be printed on the currently selected output channel.
- If *ERRMSG is anything else, then error messages will be printed on
- the TTY.
- *ECHO - Initial value = NIL
_____
- If *ECHO is not NIL then all characters read from a file (not TTY)
- are echoed to the current output file. No conversion from lower to
- upper case is done of the echoed character regardless of the value of
- !*RAISE. If a ^D is encountered in the file, the program will wait
- until a " " (a space) is typed on the TTY and then continue. The ^D
- is not echoed.
- If *ECHO is NIL no echoing takes place.
- *GCGAG - Initial value = NIL
______
- If *GCGAG is not NIL when a garbage collection occurs then the
- following is printed on the TTY:
- either
- *** FREE STG EXHAUSTED
- or
- *** FULL WORD SPACE EXHAUSTED
- or nothing
- followed by
- *** n FREE STG, m FULL WORDS AVAILABLE
- where n and m are the number of words (cells) printed in the current
- radix.
- If *GCGAG is NIL then these messages are not printed.
- *MSG - Initial value = T
____
- If *MSG is NIL then no warnings will be printed, e.g. PUTD will not
- print any message when a function is redefined.
- *NOPOINT - Initial value = NIL
________
- If *NOPOINT is NIL then integers printed (or EXPLODEd) with a decimal
- radix (BASE = 10.) are followed by a ".".
- If *NOPOINT is not NIL then decimal integers are not printed with a
- following ".".
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 30
- *NOUUO - Initial value = NIL
______
- If *NOUUO is not NIL then slow links in compiled code are converted
- to fast links when the code is executed. Fast links can't be TRaced
- as can slow links.
- *PREDEF - Initial value = NIL
_______
- If *PREDEF is not NIL then the Fap loader will print
- *** x REDEFINED
- on the TTY, when x is a function that is being redefined.
- If *PREDEF is NIL then no message is printed.
- *PURIFY - Initial value = NIL
_______
- If *PURIFY is not NIL then the Fap loader will try to convert slow
- links to fast links in the loaded binary code.
- If *PURIFY is NIL then this conversion will not take place at load
- time. It will take place when executing the code if *NOUUO is not
- NIL.
- *RSET - Initial value = NIL
_____
- If an error occurs that is not surrounded by an ERRORSET so that the
- system will go to the top level, then the value of *RSET determines
- whether fluid variables will be restored to their top level values or
- kept at the values they had when the error occurred:
- If *RSET is NIL then fluid variables will be restored to top level
- values.
- If *RSET is not NIL then the current values will be kept.
- BASE - Initial value = 10 (decimal)
____
- The value of BASE is used as radix when printing integers. Floating
- point numbers are always decimal.
- IBASE - Initial value = 10 (decimal)
_____
- The value of IBASE is used as radix when reading integers. Floating
- point numbers are always decimal.
- INITFN* - Initial value = NIL
_______
- If INITFN* is not NIL, then it must be a function of no arguments.
- This is an initialization function that will be evaluated after a
- Lisp error return to the top level has occurred or when a BELL has
- been typed or when a Lisp core image is started again or when the
- memory is reallocated by CORE.
- INITFN* is useful when it is desirable to change the top level of
- Lisp.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 31
- (SETQ INITFN!* (FUNCTION EVALQUOTE))
- causes the top level to become EVALQUOTE instead of EVAL.
- BPEND - Value = Address of end of BPS
_____
- (NUMVAL BPEND) points to the end of BPS.
- BPORG - Value = Address of beginning of free BPS
_____
- (NUMVAL BPORG) points to the beginning of free BPS.
- INC* - Value = Channel number for currently selected input channel.
____
- INC* is updated by calls to RDS and should not be changed in any
- other way. INC* is NIL when the current input channel is the TTY.
- OUTC* - Value = Channel number for currently selected output channel.
_____
- OUTC* is updated by calls to WRS and should not be changed in any
- other way. OUTC* is NIL when the current output channel is the TTY.
- OBLIST - Value = List of lists of interned identifiers.
______
- See 1.7
- SCNVAL - Initial value = NIL
______
- See SCAN.
- SYSTEM* - Value = 1, 0 or -1.
_______
- SYSTEM* indicates what operating system the current Lisp system is
- intended for:
- System Value of SYSTEM*
- Tenex 1
- Tops-10 0
- Tops-20 -1
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 32
- 4.0 ERROR MESSAGES AND WARNINGS
- The Lisp system checks for some error conditions and prints messages
- accordingly, but some of the error checking described in [1] is
- currently not implemented.
- In particular CAR, CDR, RPLACA and RPLACD do not check that their
- argument is a pair. This means also that improper arguments to NCONC
- or ASSOC are not checked.
- Illegal use of GO or RETURN is not checked, indeed GO and RETURN can
- currently be used almost anywhere in interpreted code.
- The use of an id as both a function and a variable is currently
- allowed.
- Erroneous conditions (e.g. illegal CAR or CDR) that are not tested,
- result in either the wrong message at some later time, or no error
- message at all. In the latter case the system has screwed itself
- without complaining.
- When error messages are printed, it is usually difficult to determine
- which function caused the error and which functions called it. In
- this situation, the BACKTRACE is useful, (see *BAKGAG). *RSET is
- also useful to determine the values of variables at the time of the
- error.
- The following is a list of error messages, their cause and in some
- cases their remedy. The messages are grouped in four groups and they
- are listed alphabetically within each group. The "*****" that
- precedes error messages and the "***" that precedes warnings have
- been omitted in the description. The error messages for some
- optional features that are not normaly available, are included. The
- descriptions of possible causes for the errors, sometimes includes
- functions that are not normaly available.
- 4.1 Error Messages Not Starting With A Bad Part
- These messages are of the type:
- ***** <message>.
- BIGNUM UNSUITABLE AS ARGUMENT
- BOOLE, DEPOSIT, EXAMINE, BINO, OPEN, ASCII, MKCODE, SETMOD,
- CPLUS, CDIF, CTIMES, CRECIP, MKVECT, LSH, %SOSSWAP, WBLK or
- EXCORE, was given a number that was not an INUM or a FIXNUM.
- This error might also occur in some other routines, if BPORG
- or BPEND have been set to BIGNUMs.
- BINARY PROGRAM SPACE EXCEEDED
- LAP, (ARRAY, EXARRAY or LOAD) has exceeded BINARY PROGRAM
- SPACE. If you are running on a Tenex or Tops-20 machine,
- this should not happen as the available BPS is about 100 K.
- If you are running on a Tops-10 machine you can either start
- again from a fresh LISP and allocate more BPS, or you can use
- EXCORE.
- CAN'T EXPAND CORE
- CORE, EXCORE, OPEN, (LOAD or ED) failed to expand core. In
- the case of CORE or EXCORE, try again with a smaller
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 33
- argument. A possible remedy might also be to EXCISE and then
- try again.
- COULDN'T SSAVE
- LSSAVE failed.
- COULDN'T SWAP SUCCESSFULLY
- %SOSSWAP failed.
- DOT CONTEXT ERROR
- READ doesn't like dots adjacent to parentheses or other dots.
- EXCORE x ON TOP LEVEL REQUIRED
- This error only occurs on a Tops-10 machine. There is not
- enough BPS for the Fap loader to load code into BPS. As the
- input is coming from a file, the Fap loader can't use EXCORE
- to get more BPS, as that would clobber the input buffer.
- Execute (EXCORE x) and try again.
- FASLOAD BUG
- A bug has been discovered in the Fap loader.
- FASLOAD EMPTY FILE
- A file to be loaded by the Fap loader was empty or the
- fisltable is not a vector.
- FASLOAD EXCEEDS BPS
- The Fap loader has run out of BPS. For a remedy, see message
- under BINARY PROGRAM SPACE EXCEEDED
- FASLOAD FORMAT ERR
- Something went wrong during the Fap loading process. There
- might be a format error in the Fap file. This error might be
- preceded by another Lisp error message telling what went
- wrong.
- FASLOAD GC-PRO ERR This error occurred during the last stage of the
- Fap loading process.
- FISLTABLE FULL
- The Fap loader needed a bigger fisltable. On a Tops-10
- system, set FISLSIZE to a larger number and try again. On a
- Tops-20 or a Tenex system, the fisltable should be big
- enough, but it can be enlarged by N words, by the following:
- subtract N from BPORG, add N to FISLSIZE, execute
- (SETQ FISLTABLE (MKVECT (DIFFERENCE (TIMES2 FISLSIZE 2) 1)))
- and set BPORG to its old value.
- FLOATING OVERFLOW
- A numeric routine detected a floating point overflow.
- GARBAGED OBLIST
- This error is always preceded by some other error. The error
- message routine for that error discovered an illegal address
- in the OBLIST or on the property list of some id on the
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 34
- OBLIST. You are in trouble.
- ILLEGAL LAMBDA FORMAT
- APPLY was given a lambda expression whose parameter list was
- an id other than NIL.
- INPUT ERROR
- Bad data was read from the selected input channel.
- LISP.ED MISSING
- An ED or GRINDEF command (not usually available) has been
- issued, but the system couldn't find the Alvine code file
- LISP.ED. Either you have defined SYS: to be a device on
- which LISP.ED isn't found, or there is no such file at your
- installation.
- LISP.ED OR LOD MISSING
- Either LISP.ED was not found (see previous message comment),
- or a LOAD command has been issued, but the file LISP.LOD
- wasn't found, in which case the situation is similar to an
- absence of LISP.ED.
- LISP.LOD MISSING
- LISP.LOD wasn't found, see previous message comment.
- LISP.SYM not found!! No load
- A LOAD command has been issued, the file LISP.LOD was found,
- but the symbol table file LISP.SYM wasn't found.
- MISSING PRINT NAME IN OBLIST
- INTERN found a member of the OBLIST that has no print name.
- You are in trouble.
- MORE THAN ONE S-EXPRESSION - COMPRESS
- COMPRESS objects to a list which constitutes the characters
- for more than one S-expression.
- NO FISLTABLE ROOM
- This can only occur on a Tops-10 machine. The available BPS
- is not enough for the Fap loaders fisltable. You need to get
- more BPS.
- NO FREE STG LEFT
- All free storage (Lisp cells) is used. The garbage collector
- couldn't find any unused cells. The unbinding of the stacks
- that occurs after this error (and others) will normaly
- release some storage. If that isn't enough, you can get more
- storage by using the CORE function.
- NO FULL WORDS LEFT
- All full words are being used for print names and numbers.
- The problem and its solution is similar to FREE STG.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 35
- NO INPUT - RDS
- The argument to RDS was not a channel OPENed for input.
- NO I/O CHANNELS LEFT
- OPEN failed to find a free I/O channel. There is a maximum
- of 16 (including the TTY) open I/O channels at the same time.
- NOGO
- This usually follows a previous error message from the Fap
- loader.
- NO LIST - COMPRESS
- NIL has been given as argument to COMPRESS.
- NON-INTEGRAL OPERAND
- DIVIDE, REMAINDER and GCD only accepts integers as arguments.
- NO OUTPUT - WRS
- The argument to WRS was not a channel OPENed for output.
- NO PRINT NAME
- Some routine couldn't find a print name. This might occur in
- several ways:
- 1. The argument to INTERN, SETPCHAR or (on Tenex or Tops-20
- machines) the element after DIR: in argument to OPEN,
- was not a string or an id.
- 2. The argument to PRINC or SKIPTO or an element of the
- argument to COMPRESS was not a string, an id or an INUM.
- 3. The argument to REMOB, INTERNP or one of the above
- functions, was a string or an id without a print name.
- NUMBER NOT DIGIT
- The argument to PRINC or SKIPTO or an element of the argument
- to COMPRESS was an INUM that was either negative or larger
- than 9.
- OUTPUT ERROR
- Data was improperly written on the selected output device.
- Possibly a write-locked DECTAPE.
- PDL OVERFLOW FROM GC - CAN'T CONTINUE
- There is not enough space on the regular stack to finish
- garbage collecting. This error forces the Lisp system to go
- to the top level, ignoring any ERRORSETs that might be in
- effect. The problem and its solution is similar to the error
- NO FREE STG LEFT.
- TOO FEW ARGUMENTS SUPPLIED - APPLY
- TOO MANY ARGUMENTS SUPPLIED - APPLY
- APPLY checks that interpreted functions have correct number
- of arguments.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 36
- TOO MANY ARGS FOR EXPR
- A function that spreads its argument, an EXPR, was given more
- than 14 arguments.
- ZERO DIVISOR
- The second argument to DIVIDE, REMAINDER or QUOTIENT was
- zero.
- 4.2 Error Messages Starting With A Bad Part
- The following messages are all of the form:
- ***** x <message> They are ordered alphabetically after the
- message part.
- x CALLED AS EXPR
- This error occurs when a call to "x" from a compiled function
- is to be performed and "x" is a FEXPR but the call has been
- compiled as if "x" was an EXPR. This means that the
- arguments to "x" have been evaluated when the call is made.
- At present this error doesn't occur. Instead the system
- makes a (dubious) try to recover. It quotes all the
- arguments and makes a list of them and then calls "x" with
- this list as argument.
- x CAN'T FIND FILE
- OPEN couldn't find the file specified by "x". If you were
- looking for a file on SYS:, maybe your definition of SYS: is
- wrong.
- x DEVICE NOT AVAILABLE
- The device specified to OPEN in the file name list "x", was
- not available.
- x DIRECTORY FULL
- The directory is full for the device specified in the file
- name list "x".
- x FILE IS WRITE PROTECTED
- OPEN found that the file specified by "x" is write protected
- and may not be opened for output.
- x ILLEGAL ARG TO LINELENGTH
- The argument "x" to LINELENGTH wasn't NIL or a positive INUM.
- x ILLEGAL ARG TO PAGELENGTH
- The argument "x" to PAGELENGTH wasn't NIL or a non-negative
- INUM.
- x ILLEGAL DEVICE
- The device specified in the file name list "x" doesn't exist
- or it is of the wrong type. E.g. it is not possible to open
- the lineprinter for input.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 37
- x ILL MEM REF FROM y
- An illegal memory reference was made. "x" is the address (in
- octal) of the instruction where the error was made. "y" is
- the function containing that instruction. "y" is found in a
- similar way to the BACKTRACE, so that ? denotes an internal
- routine and NIL denotes a position outside normal code, e.g.
- in free storage.
- This error is usually caused by taking CAR or CDR of an atom.
- x ILL UUO FROM y
- An illegal instruction was executed at address "x" in the
- function "y". ? and NIL have the same meaning as in the
- previous error message.
- x IS NOT A CHANNEL NAME
- RDS, WRS or CLOSE was given "x" as argument. "x" was not NIL
- or an integer between 0 and 15.
- x IS NOT AN IDENTIFIER
- "x" should have been an identifier. The functions that
- checks for identifiers, are: PUTD, PUT, FLAG, REMFLAG, SET
- and SETQ. The elements of the parameter list in a PROG or a
- lambda expression must also be ids.
- x IS NOT A NUMBER
- An arithmetic routine was given an argument "x", that wasn't
- a number.
- x IS NOT A VECTOR
- The second argument to PUTV or GETV must be a vector. "x"
- wasn't.
- x MAY NOT BE CHANGED
- "x" is one of the ids NIL and T. SET and SETQ may not change
- the value of these ids.
- (x y) MISMATCHED - PAIR
- The two arguments "x" and "y" to PAIR were not lists of the
- same length.
- x MODULE NOT FOUND
- FLOAD or FISLM was given the name of a module that couldn't
- be found. Your definition of SYS: may be wrong.
- x NOT A KEYWORD FOR OPEN
- "x" was the second argument to OPEN, but it was not one of
- INPUT, OUTPUT, INBIN or OUTBIN.
- x NOT EXPR - APPLY
- "x" was the first argument to APPLY. It was a function but
- not an EXPR.
- x PUSHDOWN CAPACITY EXCEEDED
- The "x" pushdown stack has overflowed. "x" is either REG
- (regular) or SPEC (special). The overflow is usually caused
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 38
- by non-termination of recursion. If this is not the case but
- the recursion just is very deep, then you can enlarge the
- stacks by using CORE.
- x SUBSCRIPT OUT OF RANGE
- The first argument "x" to GETV or PUTV was out of range for
- the vector specified by the second argument.
- x TOO BIG VECTOR
- MKVECT was given "x" argument, but there is not space in the
- BPS for a vector of size "x"+1.
- x UNBOUND VARIABLE - EVAL
- EVAL tried to evaluate the id "x" and found that it had no
- value. You probably forgot to QUOTE "x".
- x UNDEFINED FUNCTION
- The function "x" is not defined.
- x UNDEFINED FUNCTION - APPLY
- The function "x" is not defined.
- x UNDEFINED PROG TAG - GO
- A GO in some interpreted function had an undefined label "x".
- x UNDEFINED UUO
- The compiled function "y" made a call to "x", but "x" was not
- a function. Note that a MACRO is not accepted as a function
- by calls from compiled functions.
- 4.3 Warnings And Diagnostic Messages
- These messages are preceded by a "***".
- CAN'T CUT CORE INTO ALLOCATED
- The argument to CORE was to small. See CORE.
- CAN'T EXCISE
- CORE or EXCISE couldn't reallocate or excise extra core as
- EXCORE had been executed earlier with an argument that was
- not NIL. If you want to excise or reallocate extra core,
- execute (EXCORE NIL), then try again.
- EXCORE x PERFORMED
- This message can only occur on a Tops-10 machine. The Fap
- loader needed more BPS than was available and used EXCORE to
- get more BPS. This message is not printed if *MSG is NIL.
- FREE STG EXHAUSTED
- The free storage (the Lisp cells) was exhausted and caused a
- garbage collection. This message is not printed when *GCGAG
- is NIL.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 39
- FULL WORD SPACE EXHAUSTED
- The full word space got exhausted and caused a garbage
- collection. This message is not printed when *GCGAG is NIL.
- WOULDN'T REDUCE CORE
- %SOSSWAP couldn't reduce the core to what it was. This
- message is only possible on a Tops-10 machine. %SOSSWAP is
- normally not implemented on Tops-10 machines.
- (F)SUBR CONVERTED TO (F)EXPR
- The function types FSUBR and/or SUBR have been replaced by
- FEXPR and/or EXPR by the Fap loader when loading a module.
- This message is not given more than once for each module
- loaded. The module was compiled before the function types
- FSUBR and SUBR where deleted from Standard Lisp. Recompile
- the module and the message will go away. This automatic
- conversion will removed sometime in the future, an undefined
- function error will then occur at run time instead.
- (F)SUBR CONVERTED TO (F)EXPR IN PUTD
- A call to PUTD used the old function type FSUBR or SUBR that
- are now replaced by FEXPR and EXPR. Use FEXPR or EXPR
- instead. Compiled functions are now distinguished by the
- predicate CODEP. Using (F)SUBR will cause an error sometime
- in the future when this conversion is removed.
- x FREE STORAGE, y FULL WORDS AVAILABLE
- There are "x" Lisp cells and "y" full words available after
- the garbage collection that just occurred. This message is
- not printed if *GCGAG is NIL.
- x REDEFINED
- This message is printed by PUTD or by the Fap loader when the
- function "x" has been redefined. The message from the Fap
- loader is not printed if *PREDEF is NIL. The message from
- PUTD is not printed if *MSG is NIL.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 40
- 5.0 DIFFERENCES BETWEEN LISP 1.6 AND STANDARD LISP
- The following is a list of the major differences between LISP 1.6 and
- Standard Lisp on the DECsystem 10 and 20:
- 1. There are no LSUBRs and consequently no ARG or SETARG.
- 2. An EXPR may have up to 13 arguments.
- 3. SUBR and FSUBR is replaced by EXPR and FEXPR. Compiled
- functions are distinguished from interpreted functions by
- the predicate CODEP.
- 4. There are no arrays, so ARRAY, EXARRAY and STORE are not
- defined. Use vectors instead.
- 5. Alvine (ED, GRINDEF) is normally not implemented.
- 6. The Lisp LOADer, *PUTSYM, PUTSYM, *GETSYM and GETSYM are
- normally not implemented.
- 7. The trace functions TRACE and TRACET are replaced by the
- somewhat different TR and TRST.
- 8. The I/O functions DSKIN and SYSIN are not defined.
- 9. The functions APPEND, NCONC, DIFFERENCE, QUOTIENT, GREATERP
- and LESSP are now EXPRs and take only two arguments. BOOLE
- takes 3 arguments.
- 10. ASSOC and SASSOC uses EQUAL instead of EQ. ATSOC is similar
- to ASSOC but uses EQ.
- 11. REMOB is a SUBR with one argument.
- 12. Computed GO labels are not allowed, i.e. the argument to GO
- must be an id.
- 13. GC, MAKNAM and PRINC are renamed to RECLAIM, COMPRESS and
- PRIN2.
- 14. OUTPUT, INPUT, OUTBIN, INBIN, OUTC and INC are replaced by
- OPEN, RDS, WRS and CLOSE.
- 15. The mapping functions (MAP, MAPC, MAPCAR, MAPLIST, MAPCAN
- and MAPCON), take their arguments in the opposite order.
- 16. The functions INITFN, BAKGAG, GCGAG, NOUUO, DDTIN, RAISE,
- FECHO and *RSET are replaced by variables.
- 17. ERRSET is replaced by the SUBR ERRORSET.
- 18. *EXPAND and *EXPAND1 are replaced by EXPAND.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 41
- 19. The characters "%", "[", "]", "<", ">", "@", "'", "/" and
- "!" have a different meaning. See RDSLSH.
- 20. The BIGNUM and SCAN packets are permanently resident.
- 21. The basic datatypes are differently implemented. The format
- for property lists is changed. Flags and properties can
- never clash.
- 22. A string is not the same as an uninterned id.
- 23. CHRCT is replaced by POSN.
- 24. *EVAL is renamed to EVAL. APPLY is an EXPR with 2 args.
- %APPLY and %EVAL support the FUNARG feature.
- 25. PROG2 is replaced by PROGN
- 26. The following functions are not defined: CSYM, LAST,
- DEFPROP, GETL, MAKNUM and UNTYI.
- 27. Several new functions are defined.
- 28. End of line is treated differently. See ^_ and $EOL$.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 42
- 6.0 REFERENCES
- [1] J. B. Marti, A. C. Hearn, M. L. Griss, C. Griss, Standard LISP
________ ____
- Report, Utah Computational Physics, UCP-60, January 1978.
______
- [2] Lynn H. Quam, Whitfield Diffie, Stanford LISP 1.6 Manual,
________ ____ ___ ______
- Stanford Artificial Intelligence Laboratory, Operating Note
- 28.7.
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 43
- Index
- $EOF$ . . . . . . . . . . . . . . 28
- $EOL$ . . . . . . . . . . . . . . 28
- %APPLY . . . . . . . . . . . . . . 17
- %EVAL . . . . . . . . . . . . . . 17
- *BAKGAG . . . . . . . . . . . . . 10, 28
- *BOX . . . . . . . . . . . . . . . 18
- *COMP . . . . . . . . . . . . . . 23, 28
- *DDTIN . . . . . . . . . . . . . . 28
- *ECHO . . . . . . . . . . . . . . 29
- *ERRMSG . . . . . . . . . . . . . 10, 29
- *FUNCTION . . . . . . . . . . . . 17
- *GCGAG . . . . . . . . . . . . . . 29
- *MSG . . . . . . . . . . . . . . . 29
- *NOPOINT . . . . . . . . . . . . . 29
- *NOUUO . . . . . . . . . . . . . . 30
- *PREDEF . . . . . . . . . . . . . 30
- *PURIFY . . . . . . . . . . . . . 30
- *RAISE . . . . . . . . . . . . . . 28
- *RSET . . . . . . . . . . . . . . 10, 30
- <del> . . . . . . . . . . . . . . 2
- ABS . . . . . . . . . . . . . . . 8
- AND . . . . . . . . . . . . . . . 8
- APPEND . . . . . . . . . . . . . . 8
- APPLY . . . . . . . . . . . . . . 16
- ASCII . . . . . . . . . . . . . . 23
- ASSOC . . . . . . . . . . . . . . 32
- ATOM . . . . . . . . . . . . . . . 8
- ATSOC . . . . . . . . . . . . . . 23
- BASE . . . . . . . . . . . . . . . 30
- BCP (binding context pointer) . . 17
- BIGNUM . . . . . . . . . . . . . . 2
- BIGP . . . . . . . . . . . . . . . 8, 22
- Binary program space (BPS) . . . . 24
- Binding context pointer (BCP) . . 17
- BOOLE . . . . . . . . . . . . . . 19
- BPEND . . . . . . . . . . . . . . 31
- BPORG . . . . . . . . . . . . . . 31
- BPS (binary program space) . . . . 24
- CAR . . . . . . . . . . . . . . . 32
- CDR . . . . . . . . . . . . . . . 32
- CLOSE . . . . . . . . . . . . . . 12
- Code-pointer . . . . . . . . . . . 4
- CODEP . . . . . . . . . . . . . . 8, 39-40
- COMPILE . . . . . . . . . . . . . 23
- COMPRESS . . . . . . . . . . . . . 22
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 44
- COND . . . . . . . . . . . . . . . 23
- Cond-form . . . . . . . . . . . . 23
- CONS . . . . . . . . . . . . . . . 8
- CONSTANTP . . . . . . . . . . . . 8
- CORE . . . . . . . . . . . . . . . 25
- DE . . . . . . . . . . . . . . . . 8
- DEFLIST . . . . . . . . . . . . . 8
- DELETE . . . . . . . . . . . . . . 8
- DELIMIT . . . . . . . . . . . . . 21
- DEPOSIT . . . . . . . . . . . . . 20
- DF . . . . . . . . . . . . . . . . 8
- DIFFERENCE . . . . . . . . . . . . 8
- DIGIT . . . . . . . . . . . . . . 8
- DIVIDE . . . . . . . . . . . . . . 8
- DM . . . . . . . . . . . . . . . . 8
- EJECT . . . . . . . . . . . . . . 8
- EMSG* . . . . . . . . . . . . . . 10, 28
- EQ . . . . . . . . . . . . . . . . 8
- EQN . . . . . . . . . . . . . . . 8
- EQUAL . . . . . . . . . . . . . . 8
- ERROR . . . . . . . . . . . . . . 9
- Error handling . . . . . . . . . . 8
- ERRORSET . . . . . . . . . . . . . 10
- EVAL . . . . . . . . . . . . . . . 15
- EXAMINE . . . . . . . . . . . . . 19
- EXCISE . . . . . . . . . . . . . . 26
- EXCORE . . . . . . . . . . . . . . 26
- EXPAND . . . . . . . . . . . . . . 8
- EXPLODE . . . . . . . . . . . . . 22
- EXPLODEC . . . . . . . . . . . . . 22
- EXPT . . . . . . . . . . . . . . . 8
- Fap loader . . . . . . . . . . . . 18
- File name list . . . . . . . . . . 11
- FILEP . . . . . . . . . . . . . . 8, 13
- FISLM . . . . . . . . . . . . . . 18
- FIX . . . . . . . . . . . . . . . 8
- FIXNUM . . . . . . . . . . . . . . 2
- FIXP . . . . . . . . . . . . . . . 8
- FLAG . . . . . . . . . . . . . . . 8
- FLAGP . . . . . . . . . . . . . . 8
- FLOAD . . . . . . . . . . . . . . 18
- FLOAT . . . . . . . . . . . . . . 8
- Floating . . . . . . . . . . . . . 4
- FLOATP . . . . . . . . . . . . . . 8
- FLUID . . . . . . . . . . . . . . 22
- FLUIDP . . . . . . . . . . . . . . 8
- FREEZE . . . . . . . . . . . . . . 23
- FSUBR . . . . . . . . . . . . . . 40
- Full word space . . . . . . . . . 24
- FUNARG . . . . . . . . . . . . . . 17
- FUNCELL . . . . . . . . . . . . . 6
- FUNCTION . . . . . . . . . . . . . 8
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 45
- Function cell . . . . . . . . . . 6
- GCD . . . . . . . . . . . . . . . 22
- GCTIME . . . . . . . . . . . . . . 27
- GENSYM . . . . . . . . . . . . . . 8
- GET . . . . . . . . . . . . . . . 8
- GETD . . . . . . . . . . . . . . . 8
- GETV . . . . . . . . . . . . . . . 8
- GLOBAL . . . . . . . . . . . . . . 22
- GLOBALP . . . . . . . . . . . . . 8
- GO . . . . . . . . . . . . . . . . 32
- GREATERP . . . . . . . . . . . . . 8
- IBASE . . . . . . . . . . . . . . 30
- Id . . . . . . . . . . . . . . . . 4
- Identifier . . . . . . . . . . . . 4
- IDP . . . . . . . . . . . . . . . 8
- IGNORE . . . . . . . . . . . . . . 21
- INC* . . . . . . . . . . . . . . . 12, 31
- INITFN* . . . . . . . . . . . . . 30
- Integer . . . . . . . . . . . . . 2
- INTERN . . . . . . . . . . . . . . 8
- INTERNP . . . . . . . . . . . . . 22
- Interpreter . . . . . . . . . . . 15
- INUM . . . . . . . . . . . . . . . 2
- INUMP . . . . . . . . . . . . . . 8, 22
- LABEL . . . . . . . . . . . . . . 17
- LENGTH . . . . . . . . . . . . . . 8
- LESSP . . . . . . . . . . . . . . 8
- LETTER . . . . . . . . . . . . . . 21
- LINELENGTH . . . . . . . . . . . . 14
- LIST . . . . . . . . . . . . . . . 8
- LITER . . . . . . . . . . . . . . 8
- LPOSN . . . . . . . . . . . . . . 8
- LSH . . . . . . . . . . . . . . . 19
- MAP . . . . . . . . . . . . . . . 8
- MAPC . . . . . . . . . . . . . . . 8
- MAPCAN . . . . . . . . . . . . . . 8
- MAPCAR . . . . . . . . . . . . . . 8
- MAPCON . . . . . . . . . . . . . . 8
- MAPLIST . . . . . . . . . . . . . 8
- MAX . . . . . . . . . . . . . . . 8
- MAX2 . . . . . . . . . . . . . . . 8
- MEMBER . . . . . . . . . . . . . . 8
- MEMQ . . . . . . . . . . . . . . . 8
- MIN . . . . . . . . . . . . . . . 8
- MIN2 . . . . . . . . . . . . . . . 8
- MINUS . . . . . . . . . . . . . . 8
- MKCODE . . . . . . . . . . . . . . 19
- MKVECT . . . . . . . . . . . . . . 8
- NCONC . . . . . . . . . . . . . . 32
- NIL . . . . . . . . . . . . . . . 28
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 46
- NOT . . . . . . . . . . . . . . . 8
- NULL . . . . . . . . . . . . . . . 8
- NUMBERP . . . . . . . . . . . . . 8
- NUMVAL . . . . . . . . . . . . . . 18
- OBLIST . . . . . . . . . . . . . . 31
- OPEN . . . . . . . . . . . . . . . 11
- OR . . . . . . . . . . . . . . . . 8
- OUTC* . . . . . . . . . . . . . . 12, 31
- PAGELENGTH . . . . . . . . . . . . 8, 14
- PAIR . . . . . . . . . . . . . . . 8
- PAIRP . . . . . . . . . . . . . . 8
- PGLINE . . . . . . . . . . . . . . 13
- PLUS . . . . . . . . . . . . . . . 8
- PLUS2 . . . . . . . . . . . . . . 8
- PNAME . . . . . . . . . . . . . . 5
- POSN . . . . . . . . . . . . . . . 8
- PRIN1 . . . . . . . . . . . . . . 8, 15
- PRIN2 . . . . . . . . . . . . . . 8, 15
- PRINT . . . . . . . . . . . . . . 8, 15
- PROG . . . . . . . . . . . . . . . 8
- PROGN . . . . . . . . . . . . . . 8
- Property list . . . . . . . . . . 5
- PUT . . . . . . . . . . . . . . . 8
- PUTD . . . . . . . . . . . . . . . 23
- PUTV . . . . . . . . . . . . . . . 8
- QUOTE . . . . . . . . . . . . . . 8
- QUOTIENT . . . . . . . . . . . . . 8
- RDS . . . . . . . . . . . . . . . 12
- RDSLSH . . . . . . . . . . . . . . 13
- READ . . . . . . . . . . . . . . . 14-15, 21
- READCH . . . . . . . . . . . . . . 15
- RECLAIM . . . . . . . . . . . . . 27
- REMAINDER . . . . . . . . . . . . 8
- REMD . . . . . . . . . . . . . . . 8
- REMFLAG . . . . . . . . . . . . . 8
- REMOB . . . . . . . . . . . . . . 8
- REMPROP . . . . . . . . . . . . . 8
- RETURN . . . . . . . . . . . . . . 32
- REVERSE . . . . . . . . . . . . . 8
- RPLACA . . . . . . . . . . . . . . 32
- RPLACD . . . . . . . . . . . . . . 32
- SASSOC . . . . . . . . . . . . . . 8
- SCAN . . . . . . . . . . . . . . . 21
- SCANINIT . . . . . . . . . . . . . 21
- SCANSET . . . . . . . . . . . . . 20
- SCNVAL . . . . . . . . . . . . . . 31
- SET . . . . . . . . . . . . . . . 22
- SETPCHAR . . . . . . . . . . . . . 13
- SETQ . . . . . . . . . . . . . . . 22
- SETSYS . . . . . . . . . . . . . . 13
- STANDARD LISP ON DECSYSTEM 10 AND 20 Page 47
- SKIPTO . . . . . . . . . . . . . . 14
- SPEAK . . . . . . . . . . . . . . 27
- String . . . . . . . . . . . . . . 4
- STRINGP . . . . . . . . . . . . . 8
- SUBLIS . . . . . . . . . . . . . . 8
- SUBR . . . . . . . . . . . . . . . 40
- SUBST . . . . . . . . . . . . . . 8
- SYS: . . . . . . . . . . . . . . . 13
- SYSTEM* . . . . . . . . . . . . . 31
- T . . . . . . . . . . . . . . . . 28
- TERPRI . . . . . . . . . . . . . . 8
- TIME . . . . . . . . . . . . . . . 11
- TIMES . . . . . . . . . . . . . . 8
- TIMES2 . . . . . . . . . . . . . . 8
- TYI . . . . . . . . . . . . . . . 14-15
- TYO . . . . . . . . . . . . . . . 14
- UNBOUND . . . . . . . . . . . . . 16
- UNFLUID . . . . . . . . . . . . . 22
- UNREADCH . . . . . . . . . . . . . 14
- UPBV . . . . . . . . . . . . . . . 8
- VALUE . . . . . . . . . . . . . . 6
- Value cell . . . . . . . . . . . . 6
- Vector . . . . . . . . . . . . . . 4
- VECTORP . . . . . . . . . . . . . 8
- WARNING . . . . . . . . . . . . . 10
- WRS . . . . . . . . . . . . . . . 12
- ^A . . . . . . . . . . . . . . . . 2
- ^C . . . . . . . . . . . . . . . . 2
- ^G . . . . . . . . . . . . . . . . 2, 10
- ^O . . . . . . . . . . . . . . . . 2
- ^R . . . . . . . . . . . . . . . . 2
- ^U . . . . . . . . . . . . . . . . 2
- ^X . . . . . . . . . . . . . . . . 2
- ^Z . . . . . . . . . . . . . . . . 15
- ^_ . . . . . . . . . . . . . . . . 15, 28
|