20-syslisp.lpt 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607
  1. PSL Manual 7 February 1983 SYSLISP
  2. section 20.0 page 20.1
  3. CHAPTER 20 CHAPTER 20 CHAPTER 20
  4. SYSLISP SYSLISP SYSLISP
  5. 20.1. Introduction to the SYSLISP level of PSL. . . . . . 20.1
  6. 20.2. The Relationship of SYSLISP to RLISP . . . . . . . 20.2
  7. 20.2.1. SYSLISP Declarations . . . . . . . . . . 20.2
  8. 20.2.2. SYSLISP Mode Analysis. . . . . . . . . . 20.3
  9. 20.2.3. Defining Special Functions for Mode Analysis . . 20.4
  10. 20.2.4. Modified FOR Loop . . . . . . . . . . . 20.4
  11. 20.2.5. Char and IDLOC Macros. . . . . . . . . . 20.5
  12. 20.2.6. The Case Statement. . . . . . . . . . . 20.6
  13. 20.2.7. Memory Access and Address Operations. . . . . 20.7
  14. 20.2.8. Bit-Field Operation . . . . . . . . . . 20.8
  15. 20.3. Using SYSLISP. . . . . . . . . . . . . . . 20.9
  16. 20.3.1. To Compile SYSLISP Code . . . . . . . . . 20.9
  17. 20.4. SYSLISP Functions . . . . . . . . . . . . . 20.10
  18. 20.4.1. W-Arrays . . . . . . . . . . . . . . 20.11
  19. 20.5. Remaining SYSLISP Issues . . . . . . . . . . . 20.12
  20. 20.5.1. Stand Alone SYSLISP Programs . . . . . . . 20.12
  21. 20.5.2. Need for Two Stacks . . . . . . . . . . 20.12
  22. 20.5.3. New Mode System. . . . . . . . . . . . 20.13
  23. 20.5.4. Extend CREF for SYSLISP . . . . . . . . . 20.13
  24. This chapter is very out of date and will be replaced as soon as
  25. possible.
  26. 20.1. Introduction to the SYSLISP level of PSL 20.1. Introduction to the SYSLISP level of PSL 20.1. Introduction to the SYSLISP level of PSL
  27. SYSLISP [Benson 81] is a BCPL-like language, couched in LISP form,
  28. providing operations on machine words, machine bytes and LISP ITEMs (tagged
  29. objects, packed into one or more words). We actually think of SYSLISP as a
  30. lower level of PSL, dealing with words, bytes, bit-fields, machine
  31. operations, and compile-time storage allocation, enabling us to write
  32. essentially all of the kernel in PSL.
  33. The control structures and definition language are those of LISP, but the
  34. Plus2 Times2 WPlus2 WTimes2 Plus2 Times2 WPlus2 WTimes2 familiar Plus2, Times2, etc. are mapped to word operations WPlus2, WTimes2,
  35. etc. SYSLISP handles static allocation of SYSLISP variables and arrays and
  36. initial LISP symbols, permitting the easy definition of higher level
  37. Standard LISP functions and storage areas. SYSLISP provides convenient
  38. ______ compile-time constants for handling strings, LISP symbols, etc. The
  39. SYSLISP compiler is based on the PORTABLE STANDARD LISP Compiler, with
  40. extensions to handle word level objects and efficient, open-coded,
  41. word-level operations. The SYSLISP mode of the compiler does efficient
  42. compile-time folding of constants and more comprehensive register
  43. allocation than in the distributed version of the PLC. Currently, SYSLISP
  44. handles bytes through the explicit packing and unpacking operations SYSLISP 7 February 1983 PSL Manual
  45. page 20.2 section 20.1
  46. GetByte GetByte GetByte(word-address,byte-number) /
  47. PutByte PutByte PutByte(word-address,byte-number,byte-value) without the notion of byte-
  48. pointer; it is planned to extend SYSLISP to a C-like language by adding the
  49. appropriate declarations and analysis of word/byte/structure operations.
  50. SYSLISP is a collection of functions and their corresponding data types
  51. which are used to implement low level primitives in PSL, such as storage
  52. allocation, garbage collection and input and output. The basic data object
  53. ____ in SYSLISP is the "word", a unit of storage large enough to contain a LISP
  54. ____ ____ ____ item. On the PDP-10, a SYSLISP word is just a 36-bit PDP-10 word. On the
  55. ____ VAX and most other byte addressed machines, a word is 4 bytes, or 32 bits.
  56. Conceptually, SYSLISP functions manipulate the actual bit patterns found in
  57. words, unlike normal LISP functions which manipulate higher-level objects,
  58. ____ ______ _____ ______ such as pairs, vectors, and floats or arbitrary-precision numbers.
  59. Arithmetic in SYSLISP is comparable to the corresponding operations in
  60. FORTRAN or PASCAL. In fact, SYSLISP is most closely modeled after BCPL, in
  61. that operations are essentially "typeless".
  62. 20.2. The Relationship of SYSLISP to RLISP 20.2. The Relationship of SYSLISP to RLISP 20.2. The Relationship of SYSLISP to RLISP
  63. ______ ______ ______ smacro smacro RLISP was extended with a CASE statement, SYSLISP declarations, smacros
  64. _____ _____ _____ macro macro and macros to provide convenient infix syntax (+, *, / etc.) for calling
  65. the SYSLISP primitives. Even though SYSLISP is semantically somewhat
  66. different from LISP (RLISP), we have tried to keep the syntax as similar as
  67. possible so that SYSLISP code is "familiar" to RLISP users, and easy to
  68. use. RLISP functions can be easily converted and interfaced to functions
  69. at the SYSLISP level, gaining considerable efficiency by declaring and
  70. directly using words and bytes instead of tagged LISP objects.
  71. 20.2.1. SYSLISP Declarations 20.2.1. SYSLISP Declarations 20.2.1. SYSLISP Declarations
  72. SYSLISP variables are either GLOBAL, memory locations (allocated by the
  73. compiler), or local stack locations. Locals are declared by SCALAR, as
  74. usual. Globals come in the following flavors:
  75. WCONST id = wconstexp {,id = wconstexp} ;
  76. Wconstexp is an expression involving constants and wconsts.
  77. WVAR wvardecl {, wvardecl} ;
  78. wvardecl ::= id | id = wconstexp
  79. WARRAY warraydecl {, warraydecl} ;
  80. warraydecl ::= id[wconstexp] | id[] = [ wconstexp {,wconstexp} ]
  81. | id[] = string PSL Manual 7 February 1983 SYSLISP
  82. section 20.2 page 20.3
  83. WSTRING warraydecl {, warraydecl} ;
  84. Each of these declarations can also be prefixed with the keywords:
  85. INTERNAL or EXTERNAL.
  86. If nothing appears, then a DEFAULT is used.
  87. (Notice there are no metasyntactic square brackets here,
  88. only curly brackets.)
  89. For example, the following GLOBAL-DATA is used in PSL:
  90. on SysLisp;
  91. exported WConst MaxSymbols = 8000,
  92. MaxConstants = 500,
  93. HeapSize = 100000;
  94. external WArray SymNam, SymVal, SymFnc, SymPrp, ConstantVector;
  95. external WVar NextSymbol, NextConstant;
  96. exported WConst MaxRealRegs = 5,
  97. MaxArgs = 15;
  98. external WArray ArgumentBlock;
  99. off SysLisp;
  100. END;
  101. 20.2.2. SYSLISP Mode Analysis 20.2.2. SYSLISP Mode Analysis 20.2.2. SYSLISP Mode Analysis
  102. ____ In SYSLISP mode, the basic operators +, *, -, /, etc., are bound to word
  103. WPlus2 WTimes2 WMinus WPlus2 WTimes2 WMinus operators (WPlus2, WTimes2, WMinus, etc.), which compile OPEN as
  104. ____ conventional machine operations on machine words. Thus most SYSLISP
  105. expressions, loops, etc. look exactly like their RLISP equivalents.
  106. 20.2.3. Defining Special Functions for Mode Analysis 20.2.3. Defining Special Functions for Mode Analysis 20.2.3. Defining Special Functions for Mode Analysis
  107. To have the Mode analyzer (currently a REFORM function) replace LISP
  108. function names by SYSLISP ones, do:
  109. PUT('LispName,'SYSNAME,'SysLispName); SYSLISP 7 February 1983 PSL Manual
  110. page 20.4 section 20.2
  111. The Following have been done:
  112. DefList('((Plus WPlus2)
  113. (Plus2 WPlus2)
  114. (Minus WMinus)
  115. (Difference WDifference)
  116. (Times WTimes2)
  117. (Times2 WTimes2)
  118. (Quotient WQuotient)
  119. (Remainder WRemainder)
  120. (Mod WRemainder)
  121. (Land WAnd)
  122. (Lor WOr)
  123. (Lxor WXor)
  124. (Lnot WNot)
  125. (LShift WShift)
  126. (LSH WShift)), 'SysName);
  127. DefList('((Neq WNeq)
  128. (Equal WEq)
  129. (Eqn WEq)
  130. (Eq WEq)
  131. (Greaterp WGreaterp)
  132. (Lessp WLessp)
  133. (Geq WGeq)
  134. (Leq WLeq)
  135. (Getv WGetv)
  136. (Indx WGetv)
  137. (Putv WPutv)
  138. (SetIndx WPutv)), 'SysName);
  139. 20.2.4. Modified FOR Loop 20.2.4. Modified FOR Loop 20.2.4. Modified FOR Loop
  140. Wxxxx Wxxxx The FOR loop is modified in SYSLISP mode to use the Wxxxx functions to do
  141. loop incrementation and testing.
  142. [??? Should pick up via SysReform ???] [??? Should pick up via SysReform ???] [??? Should pick up via SysReform ???]
  143. 20.2.5. Char and IDLOC Macros 20.2.5. Char and IDLOC Macros 20.2.5. Char and IDLOC Macros
  144. ____ In SYSLISP mode, '<id> refers to the tagged item, just as in LISP mode,
  145. IdLoc LispVar IdLoc __ LispVar IdLoc <id> refers to the id space offset of the <id>, and LispVar <id>
  146. ____ refers to the GLOBAL value cell of a GLOBAL or FLUID variable. Note:
  147. LispVar LispVar LispVar can be used on the left hand side of an argument sentence. For
  148. __ example, to store a NIL in the value cell of id FOO, we do any one of the
  149. following. PSL Manual 7 February 1983 SYSLISP
  150. section 20.2 page 20.5
  151. SYMVAL IDLOC FOO := 'NIL;
  152. LISPVAR FOO := MKITEM(ID,IDLOC NIL);
  153. Char Char _ __ _______ _____ (Char U:id): integer macro
  154. Char Char The Char macro returns the ASCII code corresponding to its single
  155. character-id argument. CHAR also can handle alias's for certain special
  156. characters, remove QUOTE marks that may be needed to pass special
  157. characters through the parser, and can accept a prefixes to compute LOWER
  158. case, <Ctrl> characters, and <Meta> characters. For example:
  159. Little_a:= Char LOWER A; % In case we think RAISE will occur
  160. Little_a:= Char '!a; % !a should not be raised
  161. Meta_X := Char META X;
  162. Weird := Char META Lower X;
  163. Dinger := Char <Ctrl-G>;
  164. Dinger := Char BELL;
  165. PUT PUT The following Aliases are defined by PUTing the association under the
  166. indicator 'CharConst:
  167. DefList('((NULL 8#0)
  168. (BELL 8#7)
  169. (BACKSPACE 8#10)
  170. (TAB 8#11)
  171. (LF 8#12)
  172. (EOL 8#12)
  173. (FF 8#14)
  174. (CR 8#15)
  175. (EOF 26)
  176. (ESC 27)
  177. (ESCAPE 27)
  178. (BLANK 32)
  179. (RUB 8#177)
  180. (RUBOUT 8#177)
  181. (DEL 8#177)
  182. (DELETE 8#177)), 'CharConst);
  183. 20.2.6. The Case Statement 20.2.6. The Case Statement 20.2.6. The Case Statement
  184. RLISP in SYSLISP mode provides a Numeric case statement, that is
  185. implemented quite efficiently; some effort is made to examine special cases
  186. (compact vs. non compact sets of cases, short vs. long sets of cases,
  187. etc.).
  188. [??? Note, CASE can also be used from LISP mode, provided tags are [??? Note, CASE can also be used from LISP mode, provided tags are [??? Note, CASE can also be used from LISP mode, provided tags are
  189. numeric. There is also an FEXPR, CASE ???] numeric. There is also an FEXPR, CASE ???] numeric. There is also an FEXPR, CASE ???]
  190. The syntax is: SYSLISP 7 February 1983 PSL Manual
  191. page 20.6 section 20.2
  192. Case-Statement ::= CASE expr OF case-list END
  193. Case-list ::= Case-expr [; Case-list ]
  194. Case-expr ::= Tag-expr : expr
  195. tag-expr ::= DEFAULT | OTHERWISE |
  196. tag | tag, tag ... tag |
  197. tag TO tag
  198. Tag ::= Integer | Wconst-Integer
  199. % This is a piece of code from the Token Scanner,
  200. % in file "PI:token-Scanner.red"
  201. .....
  202. case ChTokenType of
  203. 0 to 9: % digit
  204. << TokSign := 1;
  205. goto InsideNumber >>;
  206. 10: % Start of ID
  207. << if null LispVar !*Raise then
  208. goto InsideID
  209. else
  210. << RaiseLastChar();
  211. goto InsideRaisedID >> >>;
  212. 11: % Delimiter, but not beginning of diphthong
  213. << LispVar TokType!* := '3;
  214. return MkID TokCh >>;
  215. 12: % Start of comment
  216. goto InsideComment;
  217. 13: % Diphthong start-Lisp function uses P-list of starting char
  218. return ScanPossibleDipthong(TokChannel, MkID TokCh);
  219. 14: % ID escape character
  220. << if null LispVar !*Raise then
  221. goto GotEscape
  222. else goto GotEscapeInRaisedID >>;
  223. 15: % string quote
  224. << BackupBuf();
  225. goto InsideString >>;
  226. 16: % Package indicator -
  227. % at start of token means use global package
  228. << ResetBuf();
  229. ChangedPackages := 1;
  230. Package 'Global;
  231. if null LispVar !*Raise then
  232. goto GotPackageMustGetID
  233. else goto GotPackageMustGetIDRaised >>;
  234. 17: % Ignore - can't ever happen
  235. ScannerError("Internal error - consult a wizard");
  236. 18: % Minus sign
  237. << TokSign := -1; PSL Manual 7 February 1983 SYSLISP
  238. section 20.2 page 20.7
  239. goto GotSign >>;
  240. 19: % Plus sign
  241. << TokSign := 1;
  242. goto GotSign >>;
  243. 20: % decimal point
  244. << ResetBuf();
  245. ReadInBuf();
  246. if ChTokenType >= 10 then
  247. << UnReadLastChar();
  248. return ScanPossibleDipthong(TokChannel, '!.) >>
  249. else
  250. << TokSign := 1;
  251. TokFloatFractionLength := 1;
  252. goto InsideFloatFraction >> >>;
  253. default:
  254. return ScannerError("Unknown token type")
  255. end;
  256. .....
  257. 20.2.7. Memory Access and Address Operations 20.2.7. Memory Access and Address Operations 20.2.7. Memory Access and Address Operations
  258. The operators @ and & (corresponding to GetMem and Loc) may be used to do
  259. direct memory operations, similar to * and & in C.
  260. @ may also be used on the LHS of an assignment. Example:
  261. WARRAY FOO[10];
  262. WVAR FEE=&FOO[0];
  263. ...
  264. @(fee+2) := @(fee+4) + & foo(5);
  265. ...
  266. 20.2.8. Bit-Field Operation 20.2.8. Bit-Field Operation 20.2.8. Bit-Field Operation
  267. The Field and PutField operations are used for accessing fields smaller
  268. than whole words:
  269. PUTFIELD(LOC, BITOFFSET, BITLENGTH, VALUE);
  270. and
  271. GETFIELD(LOC,BITOFFSET, BITLENGTH);
  272. Special cases such as bytes, halfwords, single bits are optimized if
  273. possible.
  274. For example, the following definitions on the DEC-20 are used to define SYSLISP 7 February 1983 PSL Manual
  275. page 20.8 section 20.2
  276. the fields of an item (in file p20c:data-machine.red):
  277. % Divide up the 36 bit DEC-20 word:
  278. WConst TagStartingBit = 0,
  279. TagBitLength = 18,
  280. StrictTagStartingBit = 9,
  281. StrictTagBitLength = 9,
  282. InfStartingBit = 18,
  283. InfBitLength = 18,
  284. GCStartingBit = 0,
  285. GCBitLength = 9;
  286. % Access to tag (type indicator) of Lisp item in ordinary code
  287. syslsp macro procedure Tag U;
  288. list('Field, cadr U, '(wconst TagStartingBit), '(wconst TagBitLe
  289. syslsp macro procedure PutTag U;
  290. list('PutField, cadr U, '(wconst TagStartingBit),
  291. '(wconst TagBitLength), caddr U);
  292. % Access to tag of Lisp item in garbage collector,
  293. % if GC bits may be in use
  294. syslsp macro procedure StrictTag U;
  295. list('Field, cadr U, '(wconst StrictTagStartingBit),
  296. '(wconst StrictTagBitLength));
  297. syslsp macro procedure PutStrictTag U;
  298. list('PutField,
  299. cadr U, '(wconst StrictTagStartingBit),
  300. '(wconst StrictTagBitLength), caddr U);
  301. % Access to info field of item (pointer or immediate operand)
  302. syslsp macro procedure Inf U;
  303. list('Field, cadr U, '(wconst InfStartingBit), '(wconst InfBitLe
  304. syslsp macro procedure PutInf U;
  305. list('PutField, cadr U, '(wconst InfStartingBit),
  306. '(wconst InfBitLength), caddr U); PSL Manual 7 February 1983 SYSLISP
  307. section 20.3 page 20.9
  308. 20.3. Using SYSLISP 20.3. Using SYSLISP 20.3. Using SYSLISP
  309. ___________ Restriction: SYSLISP code is currently ONLY compiled, since it is
  310. converted into machine level operations, most of which are dangerous or
  311. tricky to use in an interpreted environment.
  312. Note: In SYSLISP mode, we currently execute some commands in the above
  313. PARSE/EVAL/PRINT mode, either to load files or select options, but most
  314. SYSLISP code is compiled to a file, rather than being immediately
  315. interpreted or compiled in-core.
  316. 20.3.1. To Compile SYSLISP Code 20.3.1. To Compile SYSLISP Code 20.3.1. To Compile SYSLISP Code
  317. Use PSL:RLISP, which usually has the Compiler, with SYSLISP extensions,
  318. loaded. Alternatively, one may use <psl>syscmp.exe. This is a version of
  319. RLISP built upon <PSL>psl.exe with the SYSLISP compiler and data-machine
  320. macros loaded.
  321. % Turn on SYSLISP mode:
  322. ON SYSLISP; % This is causes the "mode-analysis" to be done
  323. % Converting some LISP names to SYSLISP names.
  324. % Use SYSLSP as the procedure type.
  325. Example:
  326. % Small file to access BPS origin and end.
  327. % Starts in LISP mode
  328. Fluid '(NextBP0 LastBP0);
  329. NextBP0:=NIL;
  330. LastBP0:=NIL;
  331. On SYSLISP,COMP; % Switch to SYSLISP mode
  332. syslsp procedure BPSize();
  333. Begin scalar N1,L1;
  334. If Null LispVar NextBP0 then LispVar NextBP0:=GtBPS 0;
  335. If Null LispVar LastBP0 then LispVar LastBP0:=GtWarray 0;
  336. N1 :=GtBPS(0);
  337. L1:= GtWarray(0);
  338. PrintF('" NextBPS=8#%o, used %d, LastBPS=8#%o, used %d%n",
  339. N1, N1-LispVar(NextBP0), L1,LispVar(LastBP0)-L1)
  340. LispVar NextBP0:=N1;
  341. LispVar LastBP0:=L1;
  342. End;
  343. BPSize(); % Call the function SYSLISP 7 February 1983 PSL Manual
  344. page 20.10 section 20.4
  345. 20.4. SYSLISP Functions 20.4. SYSLISP Functions 20.4. SYSLISP Functions
  346. [??? What about overflow in Syslisp arithmetic? ???] [??? What about overflow in Syslisp arithmetic? ???] [??? What about overflow in Syslisp arithmetic? ???]
  347. WPlus2 WPlus2 _ ____ _ ____ ____ ____ ________ ____ (WPlus2 U:word, V:word): word open-compiled, expr
  348. WDifference WDifference _ ____ _ ____ ____ ____ ________ ____ (WDifference U:word, V:word): word open-compiled, expr
  349. WTimes2 WTimes2 _ ____ _ ____ ____ ____ ________ ____ (WTimes2 U:word, V:word): word open-compiled, expr
  350. WQuotient WQuotient _ ____ _ ____ ____ ____ ________ ____ (WQuotient U:word, V:word): word open-compiled, expr
  351. WRemainder WRemainder _ ____ _ ____ ____ ____ ________ ____ (WRemainder U:word, V:word): word open-compiled, expr
  352. WShift WShift _ ____ _ ____ ____ ____ ________ ____ (WShift U:word, V:word): word open-compiled, expr
  353. WAnd WAnd _ ____ _ ____ ____ ____ ________ ____ (WAnd U:word, V:word): word open-compiled, expr
  354. WOr WOr _ ____ _ ____ ____ ____ ________ ____ (WOr U:word, V:word): word open-compiled, expr
  355. WXor WXor _ ____ _ ____ ____ ____ ________ ____ (WXor U:word, V:word): word open-compiled, expr
  356. WNot WNot _ ____ ____ ____ ________ ____ (WNot U:word): word open-compiled, expr
  357. WEQ WEQ _ ____ _ ____ _______ ____ ________ ____ (WEQ U:word, V:word): boolean open-compiled, expr
  358. WNEQ WNEQ _ ____ _ ____ _______ ____ ________ ____ (WNEQ U:word, V:word): boolean open-compiled, expr
  359. WGreaterP WGreaterP _ ____ _ ____ _______ ____ ________ ____ (WGreaterP U:word, V:word): boolean open-compiled, expr
  360. WLessP WLessP _ ____ _ ____ _______ ____ ________ ____ (WLessP U:word, V:word): boolean open-compiled, expr
  361. WGEQ WGEQ _ ____ _ ____ _______ ____ ________ ____ (WGEQ U:word, V:word): boolean open-compiled, expr PSL Manual 7 February 1983 SYSLISP
  362. section 20.4 page 20.11
  363. WLEQ WLEQ _ ____ _ ____ _______ ____ ________ ____ (WLEQ U:word, V:word): boolean open-compiled, expr
  364. WGetV WGetV _ ____ _ ____ ____ ____ ________ _____ (WGetV U:word, V:word): word open-compiled, macro
  365. WPutV WPutV _ ____ _ ____ _ ____ ____ ____ ________ _____ (WPutV U:word, V:word, W:word): word open-compiled, macro
  366. Byte Byte _ ____ _ ____ ____ ____ ________ ____ (Byte U:word, V:word): word open-compiled, expr
  367. PutByte PutByte _ ____ _ ____ _ ____ ____ ____ ________ ____ (PutByte U:word, V:word, W:word): word open-compiled, expr
  368. 20.4.1. W-Arrays 20.4.1. W-Arrays 20.4.1. W-Arrays
  369. CopyWArray CopyWArray ___ _ ______ ___ _ ______ _____ ___ ___ _ ______ ____ (CopyWArray NEW:w-vector, OLD:w-vector, UPLIM:any): NEW:w-vector expr
  370. _____ Copy UPLIM + 1 words.
  371. CopyWRDSToFrom CopyWRDSToFrom ___ _ ______ ___ ___ ___ ____ (CopyWRDSToFrom NEW:w-vector, OLD:any): any expr
  372. CopyWArray CopyWArray Like CopyWArray in heap.
  373. CopyWRDS CopyWRDS _ ___ ___ ____ (CopyWRDS S:any): any expr
  374. Allocate new WRDS array in heap.
  375. 20.5. Remaining SYSLISP Issues 20.5. Remaining SYSLISP Issues 20.5. Remaining SYSLISP Issues
  376. The system should be made less dependent on the assemblers, compilers and
  377. loaders of the particular machine it is implemented on. One way to do this
  378. is to bring up a very small kernel including a fast loader to load in the
  379. rest.
  380. 20.5.1. Stand Alone SYSLISP Programs 20.5.1. Stand Alone SYSLISP Programs 20.5.1. Stand Alone SYSLISP Programs
  381. In principle it works, but we need to clearly define a small set of
  382. support functions. Also, need to implement EXTERNAL properly, so that a
  383. normal LINKING loader can be used. In PSL, we currently produce a single
  384. kernel module, with resident LAP (or later FAP), and it serves as dynamic
  385. linking loader for SYSLISP (ala MAIN SAIL). SYSLISP 7 February 1983 PSL Manual
  386. page 20.12 section 20.5
  387. 20.5.2. Need for Two Stacks 20.5.2. Need for Two Stacks 20.5.2. Need for Two Stacks
  388. We must distinguish between true LISP items and untagged SYSLISP items on
  389. the stack for the garbage collector to work properly. Two of the options
  390. for this are
  391. 1. Put a mark on the stack indicating a region containing untagged items.
  392. 2. Use a separate stack for untagged items.
  393. Either of these involves a change in the compiler, since it currently
  394. only allocates one frame for temporaries on the stack and does not
  395. distinguish where they get put.
  396. The garbage collector should probably be recoded more modularly and at a
  397. higher level, short of redesigning the entire storage management scheme.
  398. This in itself would probably require the existence of a separate stack
  399. which is not traced through for return addresses and SYSLISP temporaries.
  400. 20.5.3. New Mode System 20.5.3. New Mode System 20.5.3. New Mode System
  401. A better scheme for intermixing SYSLISP and LISP within a package is
  402. needed. Mode Reduce will probably take care of this.
  403. 20.5.4. Extend CREF for SYSLISP 20.5.4. Extend CREF for SYSLISP 20.5.4. Extend CREF for SYSLISP
  404. The usual range of LISP tools should be available, such as profiling, a
  405. break package, tracing, etc.