perm filename C[LSP,BGB]1 blob
sn#001389 filedate 1972-11-05 generic text, type T, neo UTF8
00100 TITLE LISP
00200
00300 ;storage allocation map.
00400
00500 orgLSP: . ;LISP interpreter.
00600 sizLSP: efolst-.-1
00700 endLSP: efolst-1
00800
00900 orgBPS: 0 ;Binary Program Space.
01000 sizBPS: 2000
01100 endBPS: 0
01200
01300 orgHWS: 0 ;Half Word Space.
01400 sizHWS: 0
01500 endHWS: 0
01600
01700 orgFWS: 0 ;Full Word Space.
01800 sizFWS: 1000
01900 endFWS: 0
02000
02100 orgHBT: 0 ;Halfwords Bit Tables.
02200 sizHBT: 0
02300 endHBT: 0
02400
02500 orgFBT: 0 ;Fullwords Bit Table
02600 sizFBT: 0
02700 endFBT: 0
02800
02900 orgPDL: 0 ;regular PDL.
03000 sizPDL: 1000
03100 endPDL: 0
03200
03300 orgSPD: 0 ;special PDL.
03400 sizSPD: 1000
03500 endSPD: 0
00100 ;SAIL JOBDAT ADDRESSES.
00200 SAI41: 0
00300 SAIAPR: 0
00400 ;SAIL ACCUMULATORS.
00500 AC0: 0
00600 AC1: 0
00700 AC2: 0
00800 AC3: 0
00900 AC4: 0
01000 AC5: 0
01100 AC6: 0
01200 AC7: 0
01300 AC10: 0
01400 AC11: 0
01500 AC12: 0
01600 AC13: 0
01700 AC14: 0
01800 AC15: 0
01900 AC16: 0
02000 AC17: 0
02100 ;LISP ACCUMULATORS.
02200 LISPAC: BLOCK 20
02300
02400 ;Olde switch and pointers.
02500 EFWSO: 0
02600 RETFLG: 0
02700 BSFLG: 0 ;Boot Strape initialization done.
00100 SUBTTL AC DEFINITIONS AND EXTERNALS --- PAGE 1
00400 INUMIN←377777
00500 INUM0←<INUMIN+777777>/2
00600 BCKETS←←177
00700
00800 ;accumulator definitions
00900 ;`sacred' means sacred to the interpreter
01000 ;`marked' means marked from by the garbage collector
01100 ;`protected' means protected during garbage collection
01200
01300 NIL←0 ;sacred, marked, protected ;atom head of NIL
01400 A←1 ;marked, protected ;results of functions and first arg of subrs
01500 B←A+1 ;marked, protected ;second arg of subrs
01600 C←B+1 ;marked, protected ;third arg of subrs
01700 AR1←4 ;marked, protected ;fourth arg of subrs
01800 AR2A←5 ;marked, protected ;fifth arg of subrs
01900 T←6 ;marked, protected ;minus number of args in LSUBR call
02000 TT←7 ;marked, protected
02100 REL←10 ;marked, protected ;rarely used
02200 S←11 ;rarely used
02300 D←12
02400 R←13 ;protected
02500 P←14 ;sacred, protected ;regular push down stack pointer
02600 F←15 ;sacred ;free storage list pointer
02700 FF←16 ;sacred ;full word list pointer
02800 SP←17 ;sacred, protected ;special pushdown stack pointer
02900
03000 NACS←←5 ;number of argument acs
03100
03200 X←←0 ;X indicates impure (modified) code locations
03300 TEN←←=10
00100 ;ALTERNATE PDP-10 MNEMONICS.
00200
00300 OPDEF LIP[HLR]
00400 OPDEF LAP[HRR]
00500 OPDEF DIP[HRLM]
00600 OPDEF DAP[HRRM]
00700
00800 OPDEF LIPZ[HLRZ]
00900 OPDEF LAPZ[HRRZ]
01000 OPDEF DIPZ[HRLZM]
01100 OPDEF DAPZ[HRRZM]
01200
01300 OPDEF LAC[MOVE]
01400 OPDEF DAC[MOVEM]
01500 OPDEF LACN[MOVN]
01600 OPDEF DACN[MOVNM]
00100 ;UUO definitions
00200 ;UUOs used to call functions from compiled code
00300 ;the number of arguments is given by the ac field
00400 ;the address is a pointer either to the function
00500 ;name or the code of the function
00600 OPDEF FCALL [34B8] ;ordinary function call-may be changed to PUSHJ
00700 OPDEF JCALL [35B8] ;terminal function call-may be changed to JRST
00800 OPDEF CALLF [36B8] ;like call but may not be changed to PUSHJ
00900 OPDEF JCALLF [37B8] ;like jcall but may not be changed to JRST
01000 ;error UUOs
01100
01200 OPDEF ERR1 [1B8] ;ordinary lisp error ;gives backtrace
01300 OPDEF ERR2 [2B8] ;space overflow error ;no backtrace
01400 OPDEF ERR3 [3B8] ;ill. mem. ref.
01500 OPDEF STRTIP [4B8] ;print error message and continue
00100 ;system UUOs
00200
00300 OPDEF TTYUUO [51B8]
00400 OPDEF INCHRW [TTYUUO 0,]
00500 OPDEF OUTCHR [TTYUUO 1,]
00600 OPDEF OUTSTR [TTYUUO 3,]
00700 OPDEF INCHWL [TTYUUO 4,]
00800 OPDEF INCHSL [TTYUUO 5,]
00900 OPDEF CLRBFI [TTYUUO 11,]
01000 DEFINE TALK{PUSHJ P,TTYCLR}
01100
01200 ;I/O bits and constants
01300 TTYLL←←105 ;teletype linelength
01400 LPTLL←←160 ;line printer linelength
01500 MLIOB←←203 ;max length of I/O buffer
01600 NIOB←←2 ;no of I/O buffers per device
01700 NIOCH←←7 ;number of I/O channels
01800 FSTCH←←11 ;first I/O channel
01900 TTCH←←10 ;teletype I/O channel
01950 COUNT←←10
02000 BLKSIZE←←NIOB*MLIOB+COUNT+1
02100 INB←←2
02200 OUTB←←1
02300 AVLB←←40
02400 DIRB←←4
02500
02600 ;special ASCII characters
02700 ALTMOD←←175
02800 SPACE←←40 ;space
02900 IGCRLF←←32 ;ignored cr-lf
03000 RUBOUT←←177
03100 LF←←12
03200 CR←←15
03300 TAB←←11
03400 BELL←←7
03500 DBLQT←←42 ;double quote "
03600
03700 ;byte pointer field definitions
03800 ACFLD←←14 ;ac field
03900 XFLD←←21 ;index field
04000 OPFLD←←10 ;opcode field
04100 ADRFLD←←43 ;adress field
04200
04300 ;external and internal symbols
04400
04500 EXTERNAL JOB41 ;instruction to be executed on UUO
04600 EXTERNAL JOBAPR ;address of APR interupt routines
04700 EXTERNAL JOBCNI ;interupt condition flags
04800 EXTERNAL JOBFF ;first location beyond program
04900 EXTERNAL JOBREL ;address of last legal instruction in core image
05000 EXTERNAL JOBREN ;reentry address
05100 EXTERNAL JOBSA ;starting address
05200 EXTERNAL JOBSYM ;address of symbol table
05300 EXTERNAL JOBTPC ;program counter at time of interupt
05400 EXTERNAL JOBUUO ;uuo is put here with effective address computed
05500
05600 ;apr flags
05700 PDOV←←200000 ;push down list overflow
05800 MPV←←20000 ;memory protection violation
05900 NXM←←10000 ;non-existant memory referenced
06000 APRFLG←←PDOV+MPV+NXM ;any of the above
06100
06200 ;system uuos
06300 APRINI←←16
06400 RESET←←0
06500 STIME←←27
06600 DEVCHR←←4
06700 EXIT←←12
06800 CORE←←11
00100 ;foolst macros
00200 DEFINE FOO <
00300 XLIST
00400 BAZ(→FOOCNT)
00500 LIST
00600 >
00700
00800 DEFINE BAZ '(X)
00900 <FOOCNT←FOOCNT+1
01000 FOO'X:
01100 >
01200
01300 FOOCNT←0
01400