User Tools

Site Tools


plato:source:plaopl:covlay2

COVLAY2

Table Of Contents

  • [00007] ASSORTED OVERLAYS FOR CONDENSOR
  • [00052] LIBCALL AND CALL COMMANDS
  • [00144] EXACTC
  • [00326] INITIALIZATIONS
  • [00855] -FCOMPAR- COMPARE FILE NAMES
  • [00931] -LESLIST- ORIENTED COMMANDS
  • [01006] CHANGE
  • [01131] CHANGE SYMBOL X TO Y
  • [01384] CHANGE COMMANDS TO LANGUAGEX
  • [01452] CHANGE COMMANDS TO LANGUAGEX
  • [01497] CONDENSE DRAW COMMANDS
  • [01770] PUT AND PUTD COMMANDS
  • [01927] COMMON, STORAGE, ROUTVAR
  • [01943] COMMON
  • [02169] -SYSCOMX- COMMAND
  • [02205] -COMMONX- CONDENSE ROUTINE
  • [02409] -SORT- / -SORTA- COMMAND READ-INS
  • [02621] -TALKREQ- READIN
  • [02747] FONT COMMAND

Source Code

COVLAY2.txt
  1. COVLAY2
  2. * /--- FILE TYPE = E
  3. * /--- BLOCK COVLAY2 00 000 81/07/28 02.24
  4. IDENT COVLAY2
  5. LCC OVERLAY(1,1)
  6. *
  7. TITLE ASSORTED OVERLAYS FOR CONDENSOR
  8. *
  9. *
  10. CST
  11. *
  12. *
  13. COVLY2$ OVFILE
  14. *
  15. *
  16. * ERROR EXITS
  17. EXT ERRTAGS,ERRNAME,ERRSTOR
  18. EXT ERRXYTG,ERR2MNY,ERR2FEW
  19. EXT ERRTERM,ERRUARG,ERRVTYP
  20. EXT ERROUTR,ERRCNTD,ERRXORQ
  21. EXT ERRBAL
  22. * FOLLOWING EXTERNALS ARE FOR COMMON,COMMONX,STORAGE
  23. EXT COMPILE,COMPNAM,LNGUNIT
  24. EXT ERRORC,NXTNAM,NXTLINE
  25. EXT SYSTEST,SYSONE
  26. EXT VARFIN,PAUSE2,TWOBITS,TAGXACT
  27. *
  28. * FOLLOWING EXTERNALS FOR PUT, PUTD
  29. EXT PUTCODE,PUT=
  30. *
  31. * FOLLOWING EXTERNALS FOR DRAW
  32. EXT GETLINE,KEYTYPE,QUIKCMP,COMPSYM
  33. EXT VARFINS,COMCONT
  34. *
  35. * FOLLOWING EXTERNALS FOR CHANGE COMMAND
  36. EXT COMNAMS
  37. EXT CONTEST,CONTAB IN FILE CONTENT
  38. *
  39. * FOLLOWING EXTERNALS FOR INITIALIZATIONS
  40. EXT COMNAMS
  41. EXT CSYMADD
  42. EXT UERRSET
  43. *
  44. * FOLLOWING EXTERNALS FOR -WRITEC-
  45. EXT BRVAR,CONV2,CONV3,CONUL4
  46. *
  47. * FOR INITIALIZATION
  48. EXT CONTAB IN FILE CONTEN
  49. *
  50. *
  51. * /--- BLOCK LIB(CALL) 00 000 79/02/07 16.14
  52. TITLE LIBCALL AND CALL COMMANDS
  53. *
  54. LIBCOV OVRLAY
  55. *
  56. SA1 OVARG1
  57. SB3 X1
  58. JP B3+*+1
  59. *
  60. + EQ LIBIN LIBCALL
  61. + EQ CALLIN CALL
  62. *
  63. * -LIBCALL- AND -CALL- COMMAND READIN
  64. * FIRST ARGUMENT IS -SYSLIB- UNIT NAME
  65. * MAY HAVE 3 MORE OPTIONAL ARGUMENTS
  66. *
  67. * -CALL- RESTRICTS COMMAND TO THE FOLLOWING
  68. * -SYSLIB- UNITS';
  69. * ASK, CALC, KERMIT, TALK, TIME
  70. *
  71. LIBIN RJ SYSTEST THIS IS THE ONLY CHECK
  72. CALLIN MX6 0 PRE-CLEAR
  73. SA6 VARBUF
  74. SA6 VARBUF+2
  75. SA6 VARBUF+3
  76. SA6 VARBUF+4
  77. CALL NXTNAM GET UNIT NAME
  78. ZR X6,ERRNAME
  79. MX0 8*6 UNIT NAME CANNOT EXCEED 8 CHARS
  80. BX0 -X0*X6
  81. NZ X0,ERRNAME
  82. SA6 VARBUF+1 SAVE UNIT NAME
  83. SA3 OVARG1 GET ARG FROM -COMNDS-
  84. ZR X3,LIBCHK IF -LIBCALL-, SKIP
  85. SA2 CASK FIRST TERM TO CHECK
  86. SB3 5 NUMBER OF TERMS TO CHECK
  87. LIBTERM BX2 X2-X6
  88. ZR X2,LIBCHK IF EQUAL TO TERM NAME, OK
  89. SB3 B3-1 DECREMENT CHECK
  90. ZR B3,ERRNAME IF NOT VALID NAME, ERROR OUT
  91. SA2 A2+1 GET NEXT TERM
  92. EQ LIBTERM GO CHECK AGAIN
  93.  
  94. LIBCHK ZR X1,LIBCIN1 JUMP IF END-OF-LINE
  95. ZR X3,LIBINLP IF -LIBCALL-, SKIP
  96. SA2 CTALK GET *TALK* UNIT NAME
  97. BX2 X2-X6 SEE IF *TALK* UNIT
  98. ZR X2,LIBINLP IF *TALK*, SKIP
  99. SA2 CKERMIT GET *KERMIT* UNIT NAME
  100. BX2 X2-X6 SEE IF *KERMIT* UNIT
  101. ZR X2,LIBINLP IF *KERMIT*, SKIP
  102. EQ ERR2MNY TO MANY PARAMS PASSED
  103. *
  104. * /--- BLOCK LIB(CALL) 00 000 79/02/07 16.11
  105. LIBINLP CALL COMPILE GET NEXT ARGUMENT
  106. BX6 X1
  107. SA2 VARBUF
  108. SA6 X2+VARBUF+2
  109. SA1 LASTKEY SEE IF END-OF-LINE
  110. ZR X1,LIBCIN1
  111. SX6 X2+1 INCREMENT NUMBER OF CODES
  112. SA6 A2
  113. SX6 X6-3 ALLOW THREE ARGUMENTS
  114. NG X6,LIBINLP
  115. EQ ERRTAGS
  116. *
  117. LIBCIN1 SA1 INX INDEX IN EXTRA STORAGE
  118. SX6 X1+2
  119. SA6 A1
  120. SA2 VARBUF+1 MOVE UNIT NAME TO EXTRA STORAGE
  121. BX6 X2
  122. SA6 X1+INFO
  123. SA2 VARBUF+2 -GETVAR- CODE FOR 1ST ARGUMENT
  124. LX2 60-XCODEL
  125. SA3 VARBUF+3 -GETVAR- CODE FOR 2ND ARGUMENT
  126. LX3 60-XCODEL-XCODEL
  127. BX6 X2+X3
  128. SA2 VARBUF+4 -GETVAR- CODE FOR 3RD ARGUMENT
  129. LX2 60-XCODEL-XCODEL-XCODEL
  130. BX6 X2+X6
  131. SA6 X1+INFO+1 MOVE TO EXTRA STORAGE
  132. BX6 X1
  133. LX6 XCMNDL POSITION INDEX IN XSTOR
  134. EQ PUTCODE
  135. *
  136. CASK DATA 0LASK
  137. CCALC DATA 0LCALC
  138. CKERMIT DATA 0LKERMIT
  139. CTALK DATA 0LTALK
  140. CTIME DATA 0LTIME
  141. *
  142. ENDOV
  143. * /--- BLOCK EXACTC 00 000 76/01/26 14.44
  144. TITLE EXACTC
  145. * -EXACTC-
  146. * THIS READ-IN ROUTINE IS ESSENTIALLY THE ANCIENT
  147. * READ-IN FOR THE ORIGINAL -WRITEC- COMMAND BEFORE
  148. * EMBEDDING, ETC.
  149. *
  150. *
  151. * FORMAT OF COMMAND WORD --
  152. *
  153. * TOP *XCODEL* BITS = -GETVAR- CODE FOR VARIABLE
  154. * NEXT XX BITS = UNUSED
  155. * NEXT 12 BITS = NUMBER OF ENTRIES IN TABLE
  156. * NEXT 12 BITS = RELATIVE ADDRESS OF LAST WORD OF TABLE
  157. * LAST *XCMNDL* BITS = COMMAND CODE NUMBER
  158. *
  159. *
  160. * THE TABLE ENTRIES ARE IN BACK-TO-FRONT ORDER--I.E., THE LAST
  161. * WORD OF THE TABLE CONTAINS THE INFO FOR THE FIRST ENTRIES.
  162. * THERE ARE TWO ENTRIES PER WORD, EACH HOLDING THE FOLLOWING --
  163. *
  164. * TOP 12 BITS = RELATIVE ADDRESS OF FIRST WORD OF TEXT INFO
  165. * NEXT 6 BITS = SHIFT COUNT TO POSITION 1ST CHAR AT LEFT
  166. * NEXT 4 BITS = NUMBER OF CHARACTERS IN 1ST TEXT WORD
  167. * NEXT 8 BITS = NUMBER OF CHARACTERS IN FOLLOWING WORDS
  168. * /--- BLOCK EXACTC 00 000 76/07/24 21.29
  169. *
  170. *
  171. WRITCOV OVRLAY
  172. RJ COMPILE DECODE ONE VARIABLE
  173. BX7 X1
  174. LX7 60-XCODEL LEFT-ADJUST GETVAR CODE
  175. SA7 BRVAR SAVE
  176. * /--- BLOCK EXACTC 00 000 76/07/25 07.57
  177. SA1 INX
  178. BX6 X1
  179. MX7 0
  180. SA6 CONV2 RELATIVE STARTING ADDRESS OF TEXT
  181. SA2 ICX
  182. SX6 X2-1
  183. SA6 WCTADR INITIALIZE TABLE ADDRESS POINTER
  184. SA7 CONV3 NUMBER OF TABLE ENTRIES = 0
  185. SA7 INFO+X1 CLEAR 1ST TEXT WORD
  186. SA7 INFO+X6 CLEAR 1ST TABLE WORD
  187. SX7 54
  188. SA7 WCSHFT INITIALIZE SHIFT COUNT MARKER
  189. SA2 LASTKEY
  190. NZ X2,WRTCIN3 JUMP IF LINE NOT EXHAUSTED
  191. *
  192. WRTCIN1 SA3 NEXTCOM CHECK IF CONTINUATION
  193. SA4 COMCONT
  194. BX3 X3-X4
  195. ZR X3,WRTCIN2 JUMP TO GET NEXT LINE IF CONTINUED
  196. *
  197. SA1 CONV3 X1 = NUMBER OF TABLE ENTRIES
  198. ZR X1,ERR2FEW
  199. SA2 WCTADR X2 = CURRENT RELATIVE TABLE ADDRESS
  200. SA3 ICX X3 = NEXT RELATIVE ADDRESS FOLLOWING TABLE
  201. SA4 CONV2 X4 = RELATIVE ADDRESS OF LAST WORD OF TEXT
  202. SA1 INFO-1+X2 A1 = ADDRESS PRECEDING TABLE
  203. SB2 INFO+X4 B2 = ADDRESS OF LAST WORD OF TEXT
  204. IX3 X3-X2 X3 = LENGTH OF TABLE
  205. SB3 B2+X3 B3 = END TEST FOR TRANSFER
  206. WCTRANS SA1 A1+B1 MOVE TABLE AFTER TEXT
  207. BX6 X1
  208. SB2 B2+B1
  209. SA6 B2
  210. LT B2,B3,WCTRANS
  211. SB2 INFO
  212. SX7 B3-B2 X7 = RELATIVE ADDRESS OF LAST WORD OF TABLE
  213. SA7 CONV2 STORE IN CONVENTIONAL LOCATION
  214. SX6 X7 UPDATE EXTRA STORAGE POINTER
  215. SA6 INX +++ NOTE +++ STANDARD EXIT INCREMENTS IT
  216. SA4 COMNUM
  217. BX6 X4 SET UP TO USE THIS COMMAND NUMBER
  218. EQ CONUL4 --- EXIT VIA CONDITIONAL BRANCH PACK-UP
  219. *
  220. *
  221. WRTCIN2 RJ GETLINE READ IN NEXT LINE
  222. * /--- BLOCK EXACTC 00 000 76/01/26 14.44
  223. WRTCIN3 SA2 WORDPT X2 = STARTING ADDRESS FOR TAG SEARCH
  224. SA1 X2 X1 = 1ST CHARACTER OF TAG
  225. ZR X1,WRTCIN1 JUMP TO LOOK FOR CONTINUATION IF BLANK LINE
  226. *
  227. WTCLOOP SB1 1 B1 = CONSTANT 1
  228. SB3 6 B3 = SHIFT COUNT DECREMENT
  229. SA3 LASTKEY GET EXPRESSION TERMINATOR
  230. SB4 X3
  231. * /--- BLOCK EXACTC 00 000 76/07/24 21.31
  232. SB4 -B4 COMPLEMENT OF TERMINATOR
  233. SA3 CONV2 X3 = RELATIVE ADDRESS OF CURRENT TEXT WORD
  234. SA4 INFO+X3 X4 = CURRENT TEXT INFO WORD
  235. SA5 WCSHFT
  236. SB2 X5 B2 = SHIFT COUNT FOR NEXT CHARACTER
  237. * /--- BLOCK EXACTC 00 000 76/07/24 21.02
  238. WTC200 SA1 A1-B1 RESET FOR LOOP
  239. WTCPACK SA1 A1+B1 X1 = NEXT CHARACTER
  240. LX2 X1,B2
  241. ZR X1,WTCFIN TEXT COMPLETE IF END-OF-LINE
  242. SX6 X1+B4 COMPARE TERMINATOR
  243. ZR X6,WTCFIN TEXT COMPLETE IF COMMA OR SEMICOLON
  244. BX4 X4+X2 ADD CHARACTER TO CURRENT TEXT WORD
  245. SB2 B2-B3
  246. PL B2,WTCPACK JUMP TO CONTINUE IF NOT YET A FULL WORD
  247. BX7 X4
  248. SA7 A4 STORE COMPLETED WORD OF TEXT INFO
  249. SX3 X3+1 INCREMENT TEXT STORAGE POINTER
  250. SA4 A4+B1 INCREMENT TEXT WORD ADDRESS
  251. MX4 0 CLEAR NEXT TEXT STORAGE WORD
  252. SB2 54 RESET SHIFT COUNT
  253. EQ WTCPACK
  254. *
  255. * /--- BLOCK EXACTC 00 000 76/01/26 14.44
  256. WTCFIN BX7 X4
  257. SA7 A4 STORE CURRENT TEXT INFO WORD
  258. BX4 X3 X4 = CURRENT TEXT WORD ADDRESS
  259. SA3 A3 X3 = ORIGINAL TEXT WORD ADDRESS
  260. BX6 X4
  261. SA6 A3 UPDATE ADDRESS OF CURRENT TEXT WORD
  262. SX6 B2 X6 = CURRENT SHIFT COUNT (ORIGINAL IN X5)
  263. SA6 A5 UPDATE SHIFT COUNT
  264. BX7 X3 BEGIN BUILDING INFO PACKAGE IN X7
  265. SX2 54
  266. IX2 X2-X5 COMPUTE SHIFT COUNT NEEDED FOR EXECUTION
  267. LX7 6
  268. BX7 X7+X2 ADD SHIFT COUNT TO INFO PACKAGE
  269. BX2 X5 BEGIN TRICKY EQUIVALENT OF DIVIDE BY 6
  270. LX2 1 *2
  271. IX5 X5+X2 *3
  272. LX2 2 *8
  273. IX5 X5+X2 *11
  274. AX5 6 /64 X5 = ORIGINAL SHIFT COUNT / 6
  275. BX2 X6 DO ANOTHER TRICKY DIVIDE
  276. LX2 1
  277. IX6 X6+X2
  278. LX2 2
  279. IX6 X6+X2
  280. AX6 6 X6 = FINAL SHIFT COUNT / 6
  281. IX4 X4-X3 X4 = FINAL STORAGE WORD POINTER - ORIGINAL
  282. IX3 X5-X6 X3 = 1ST WORD CHAR COUNT IF ALL IN ONE WORD
  283. ZR X4,WCSTOR JUMP IF ALL TEXT IN ONE WORD
  284. BX2 X4
  285. LX4 3 *8
  286. LX2 1 *2
  287. IX4 X4+X2 X4 = DIFFERENCE IN TEXT POINTERS * 10
  288. * /--- BLOCK EXACTC 00 000 76/07/24 20.52
  289. SX4 X4-1
  290. IX4 X4-X6 X4 = COUNT OF CHARACTERS IN FOLLOWING WORDS
  291. SX3 X5+B1 X3 = COUNT OF CHARACTERS IN 1ST WORD
  292. WCSTOR LX7 4
  293. BX7 X7+X3 ADD CHARACTER COUNT FOR 1ST WORD
  294. LX7 8
  295. BX7 X7+X4 ADD CHARACTER COUNT FOR FOLLOWING WORDS
  296. SA2 WCTADR X2 = CURRENT TABLE ADDRESS
  297. SA3 INFO+X2 X3 = CURRENT TABLE WORD
  298. SA4 CONV3 X4 = CURRENT NUMBER OF TABLE ENTRIES
  299. BX6 X3+X7 ADD NEW ENTRY
  300. LX4 59
  301. NG X4,WCODD JUMP OF ODD NUMBERED TABLE ENTRY
  302. LX6 30 POSITION AT TOP
  303. SA6 A3 STORE UPPER (EVEN) ENTRY
  304. WCNEXT LX4 1
  305. SX7 X4+B1 INCREMENT NUMBER OF TABLE ENTRIES
  306. SA7 A4
  307. ZR X1,WRTCIN1 JUMP IF AT END-OF-LINE
  308. SA1 A1+B1
  309. NZ X1,WTCLOOP JUMP TO MAIN LOOP IF NEXT CHAR NOT E-O-L
  310. EQ WRTCIN1 OTHERWISE, CHECK FOR CONTINUATION
  311. *
  312. WCODD SA6 A3 STORE COMPLETED TABLE WORD (ODD ENTRY)
  313. SX7 X2-1 DECREMENT TABLE ADDRESS
  314. SA7 A2
  315. MX6 0
  316. SA6 A3-B1 CLEAR NEXT TABLE WORD
  317. EQ WCNEXT
  318. *
  319. *
  320. WCTADR BSS 1 CURRENT TABLE ADDRESS (RELATIVE)
  321. WCSHFT BSS 1 SHIFT COUNT FOR NEXT CHARACTER
  322. LFTFLG DATA 0 LEFT WRITING FLAG
  323. *
  324. ENDOV
  325. * /--- BLOCK INITIAL-1 00 000 81/06/07 02.16
  326. TITLE INITIALIZATIONS
  327. *
  328. EXT MESSBUF DAYFILE MESSAGE BUFFER
  329. *
  330. INITOV OVRLAY
  331. SA5 APLACOM (X5) = COMMUNICATION AREA
  332. SX0 PC.ACC
  333. IX0 X0+X5
  334. SA0 ACCOUNT
  335. RE 2 READ ACCOUNT AND LESSON NAME
  336. RJ ECSPRTY
  337. MX0 6
  338. SA1 LESSON CHECK FOR VALID LESSON NAME
  339. BX1 X0*X1
  340. ZR X1,CABORT2
  341. SX0 PC.SYS
  342. IX0 X0+X5
  343. SA0 SYSFLG SYSTEM/NON-SYSTEM FLAG
  344. + RE 1
  345. RJ ECSPRTY
  346. SX0 PC.STOR PACKED DESCRIPTORS OF CONDEN
  347. IX0 X0+X5 RETURN INFO
  348. SA0 COPTION CONDENSOR OPTIONS
  349. RE 1
  350. RJ ECSPRTY
  351. SX0 PC.SRCA
  352. IX0 X0+X5
  353. SA0 WORK
  354. RE 2 READ SOURCE FILE NAME
  355. RJ ECSPRTY
  356. SX0 PC.BADR
  357. IX0 X0+X5
  358. SA0 CONBUFF ADDRESS OF BUFFER FOR BINARY
  359. + RE 1
  360. RJ ECSPRTY
  361. SX0 PC.BLTH
  362. IX0 X0+X5
  363. SA0 CBLTH LENGTH OF BINARY BUFFER
  364. + RE 1
  365. RJ ECSPRTY
  366. *
  367. SA1 LESSON SET UP B-DISPLAY MESSAGE
  368. BX7 X1
  369. SA7 MESSBUF
  370. CALL S=BMSG,MESSBUF
  371. *
  372. *
  373. SA1 SYSCLOK STORE TIME AT START OF CONDENS
  374. BX6 X1
  375. SA6 RTBEG STORE REAL TIME CLOCK
  376. CALL S=CTIME,CTBEG STORE CPU CLOCK
  377. *
  378. * SET UP FILE POINTERS / OPEN FILE
  379. *
  380. SB2 FREQ OPEN THE FILE
  381. SA0 CBUF
  382. SA1 AFILEBF
  383. SA2 WORK RETRIEVE SOURCE FILE NAME
  384. SA3 WORK+1 (TWO WORDS)
  385. RJ =XOPEN
  386. NZ X6,CABORT2 IF CANNOT OPEN FILE
  387. SA1 COPTION SET CSTOADR = ECS ADDR OF USERS
  388. * STORAGE FOR RETURN INFORMATION FROM CONDENSOR
  389. BX2 X1
  390. AX2 XCODEAL
  391. MX3 -24
  392. BX6 -X3*X2
  393. SA6 CSTOADR
  394. BX0 X6 ZERO OUT S1 (WHICH CONTAINS
  395. * BUFFER LENGTH POINTERS)
  396. ZR X6,NOCSTO UNLESS NO -STORAGE-
  397. *
  398. MX6 0
  399. WX6 X0
  400. NOCSTO BSS 0
  401. BX6 X2 CSTOLEN = LENGTH OF STORAGE
  402. AX6 24
  403. SA6 CSTOLEN
  404. * /--- BLOCK INITIAL-1 00 000 81/07/28 01.50
  405. IX6 X6+X0 CSTOLWA = LWA OF STORAGE
  406. SA6 CSTOLWA
  407. *
  408. * OPEN OPTION BITS INTO FULL WORDS FOR FAST
  409. * CHECKS DURING CONDENSE
  410. *
  411. SB3 COPTNUM B3 = NUMBER OF OPTIONS
  412. SB2 B0 B2 = OPTION POINTER
  413. SB1 1 B1 = 1
  414. MX2 -1
  415. COPTLP BX6 -X2*X1 ISOLATE NEXT OPTION BIT
  416. SA6 COPTS+B2 STORE IN NEXT OPTION ELEMENT
  417. SB2 B2+B1
  418. AX1 B1 POSTION NEXT OPTION BIT
  419. NE B2,B3,COPTLP IF MORE OPTIONS BITS TO OPEN
  420. *
  421. *
  422. *
  423. * GET TRUE COPY OF COMMANDS AND HASH INFO INTO CM
  424. *
  425. SA1 CMNDTBL
  426. BX0 X1
  427. SA0 COMNAMS
  428. SA1 CMNDINF
  429. + RE =XCOMNAML READ COMMAND NAME TABLE
  430. RJ ECSPRTY
  431. BX0 X1
  432. SA0 =XCOMINFO
  433. + RE =XCOMINFL READ HASHED INFO TABLE
  434. RJ ECSPRTY
  435. *
  436. *
  437. * -ERRINIT- (INITIALIZE BUFFER POINTERS)
  438. *
  439. *
  440. SA1 ACEBUF ABSOLUTE ADDRESS OF CEBUF
  441. SX6 MAINHDL LENGTH OF MAIN HEADER
  442. IX6 X1+X6
  443. SA6 PCEBUF NEXT AVAILABLE LOC IN CEBUF
  444. SX6 B0
  445. SA6 ERRCNT
  446. SA6 ERRTOT
  447. SA6 ZCONDOK =0 NOTSET ZCONDOK,=1 SET IT
  448. SX6 1
  449. SA6 UBLKNM
  450. SA6 ULINENM
  451. RJ UERRSET INTIALIZE *HEAD* WORD
  452. SX6 VARLIM-MAINHDL
  453. SA6 LCEBUF SPACE LEFT FOR SUBROUTINES
  454. *
  455. SX7 0
  456. SA7 TSPECS CLEAR SPECS FLAG
  457. SA7 SAYFLAG CLEAR SAY FLAG
  458. SA3 ACLSTAT
  459. SX1 SCLESNS
  460. IX0 X3+X1
  461. SA0 SCONTMP READ FROM ECS,TOTAL NUMBER OF LESSON CONDEN
  462. + RE 1
  463. RJ =XECSPRTY
  464. SA1 SCONTMP
  465. SX3 1
  466. IX6 X1+X3 INCREMENT TOTAL COUNT
  467. SA6 A1
  468. + WE 1 WRITE BACK IN ECS
  469. RJ =XECSPRTY
  470. * /--- BLOCK INITIAL-2 00 000 81/06/07 02.18
  471. *
  472. SA1 CONBUFF ADDRESS OF BINARY BUFFER
  473. SX6 LESHEAD
  474. IX0 X1+X6
  475. SA0 ACCOUNT
  476. WE 2 WRITE OUT LESSON/ACCOUNT NAMES
  477. RJ ECSPRTY
  478. SX7 2
  479. IX6 X0+X7 POINT TO NEXT WORD IN ECS
  480. SA6 CONDPNT INIT NEXT AVAIL WORD IN FORMING BINARY
  481. *
  482. SA1 AZERBUF ZEROED ECS BUFFER
  483. BX0 X1
  484. SA0 WORK
  485. + RE 1000
  486. RJ ECSPRTY
  487. SA1 AGROUP INITIALIZE -GROUP- TABLES
  488. BX0 X1
  489. + WE 4*NKGROUP
  490. RJ ECSPRTY
  491. SX7 0 X7 = 0
  492. SA7 ECSARGS NO ECS ARGS YET
  493. SA7 UEFLAG CLEAR TO CURRENTLY DOING UNIT (NOT ENTRY)
  494. SA7 CUNITS ZERO UNIT SO FAR
  495. SA7 COMPNAM
  496. SA7 CSYMADD
  497. SA7 JJVOCU SET TO NO VOCABULARY YET
  498. SA7 TERMS NUMBER OF TERMS IN LESSON RESET
  499. SA7 NDEFN NUMBER OF DEFNS
  500. SA7 NOUNIT NO UNIT COMMANDS YET
  501. SA7 COMREFF
  502. SA7 CCDFLG
  503. SA7 CCOMX CLEAR -COMMONX- WORD
  504. SA7 XSTORL CLEAR XSTOR LENGTH
  505. SA7 RVARL CLEAR ROUTER VARIABLE LENGHT
  506. SA7 LVARL CLEAR LOCALS STACK SIZE
  507. SA7 LVARN CLEAR NUMBER OF LOCALS
  508. SA7 LOCAL CLEAR LOCALS FLAG
  509. SA7 CCOMLES SET TO NO COMMON
  510. SA7 CCOMACT
  511. SA7 CCOMNAM
  512. SA7 CCOMLTH
  513. SA7 CCOMBIT
  514. SA7 USEBCNT NUMBER OF BLOCKS USED
  515. SA7 =XPPTMF PPT COMMAND MESSAGE FLAG
  516. *
  517. SX6 VARS
  518. SA6 PVARS BASE LOCATION FOR DEFINED NAMES
  519. SX6 -1
  520. SA6 SSSTOP SET START/STOP SWITCH
  521. SA6 DSET INITIALIZE DEFINE SET NUMBER
  522. SB1 1
  523. SB2 TOKADDS DEFINE DIRECTORY INITIALIATIONS
  524. SB3 NAMADDS
  525. SB4 TOKLENS
  526. SB5 NAMLENS
  527. SB6 SETNAMS
  528. SB7 -1 INITIALIZE NULL SET ALSO
  529. SA1 ADEFNEC ADDR OF ECS DEFINE BUFFER
  530. BX6 X1
  531. SX1 DECSLTH LENGTH OF DEFINED BUFFER
  532. IX6 X6+X1 (X6) = END OF ECS DEF BUFF + 1
  533. MX7 0
  534. *
  535. * /--- BLOCK INITIAL-3 00 000 81/06/07 02.18
  536. DFADLP BSS 0
  537. SA6 B2+B7 TOKADDS
  538. SA6 B3+B7 NAMADDS
  539. SA7 B4+B7 TOKLENS
  540. SA7 B5+B7 NAMLENS
  541. SA7 B6+B7 SETNAMS
  542. SA7 UNTLENS+B7 NUMBER OF DEFINED UNITS
  543. SB7 B7+B1
  544. SX5 B7-MAXSET
  545. NZ X5,DFADLP
  546. *
  547. SA1 ADEFNEC ADDR OF ECS DEFINE BUFFER
  548. BX6 X1
  549. SA6 TOKADDS-1 NULL SET OPEN
  550. *
  551. * FAKE UNIT 0 = TERMS
  552. * FAKE UNIT 1 = DEFNS
  553. * FAKE UNIT 2 = JUDGING SYMBOLS
  554. * UNIT 3 = INITIAL ENTRY UNIT
  555. *
  556. SA1 KOIEU GET PROPER NAME FOR INITIAL ENTRY UNIT
  557. BX7 X1
  558. SA7 UNAME+IEUNUM STORE AWAY IN UNIT-NAME-TABLE
  559. SX6 IEUNUM X6 = UNIT NUMBER
  560. SA0 A7
  561. SA1 AUNAME AND WRITE OUT TO ECS-UNIT-NAME-TABLE
  562. IX0 X1+X6
  563. + WE 1
  564. RJ ECSPRTY
  565. *
  566. *
  567. SA6 UNUMON SET UNIT WORKING ON POINTER
  568. SA6 UNIT LAST UNIT OR ENTRY CONDENSED
  569. MX7 1 SET TOP BIT TO MARK NOT IN
  570. SA7 ULOC+X6
  571. SX6 X6+1
  572. SA6 UNUMIN COUNT OF UNITS PROCESSED
  573. *
  574. SA1 BLANK8
  575. BX6 X1
  576. SA6 =XOLDCMND INITIALIZE OLDCMND TO 8 BLANKS
  577. *
  578. * INITIALIZE FOR ENTRY UNIT
  579. *
  580. SX6 INFOLTH
  581. SA6 ICX INITIALIZE COMMAND POINTER
  582. SX7 0
  583. SA7 INX EXTRA STORAGE POINTER
  584. SA7 LOCARO ARROW LOCATION (*INFO* OFFSET)
  585. SA7 =XCALCACT SET TO NO -CALC- ACTIVE
  586. SA7 NGLOBAL NUMBER OF GLOBAL SYMBOLS
  587. SA7 MAKESYM FOR FAKE STATEMENT LABELS
  588. SA7 NDOOFF NUMBER OF DEFERRED -DOTO-
  589. SA7 DOBFPNT -DOTO- ECS POINTER
  590. SA7 NDEFERR NUMBER OF DEFERRED REFERENCES
  591. SA7 =XNLABELS NUMBER OF LABELS
  592. SA7 GSYMERR1 GLOBAL SYMBOL ERROR FLAGS
  593. SA7 GSYMERR2
  594. * /--- BLOCK INITIAL-4 00 000 76/11/11 01.38
  595. *
  596. * ZERO OUT ECS ENDINGS BUFFERS
  597. *
  598. SA1 AZERBUF GET ADDRESS OF ZERO BUFFER
  599. BX0 X1
  600. SA0 WORK
  601. + RE 80 ZERO OUT THE ENDINGS BUFFER
  602. RJ ECSPRTY
  603. SA1 XBEND ADDRESS OF ENDINGS BUFFER
  604. BX0 X1
  605. + WE 80
  606. RJ ECSPRTY
  607. *
  608. * GET TRUE COPY OF CHARACTER SYMBOL TABLE FOR CONTENT
  609. *
  610. SA0 CONTAB READ CONTENT SYMBOL TABLE TO CM BUFFER
  611. SA1 ACONTAB GET ADDRESS OF ECS BUFFER
  612. BX0 X1
  613. + RE 129 TWO 64-WORD TABLES + 1 INFO WORD
  614. RJ ECSPRTY
  615. *
  616. MX6 0 CLEAR DUMMY UNIT FOR JUDGING SYMBOLS
  617. SX2 JSYMNUM
  618. SA6 UNAME+X2 HENCE USE SYSTEM SYMBOLS
  619. SA6 ULOC+X2
  620. *
  621. *
  622. * CHECK ECS COMMAND CONDEN STATISTICS INFO BANK AND
  623. * SET ITS CM FLAG (TSCOMFG) ACCORDINGLY. SINCE TURN
  624. * ON/OFF OF COMMAND CONDEN STATISTICS IS CHECKED HERE ONLY AT
  625. * ENTRY (TO MINIMIZE OVERHEAD) IT DOES NOT TAKE EFFECT UNTIL
  626. * NEXT START OF LESSON CONDENSING (OR FINISHING OF
  627. * CONDENSING IN CASE OF TURNING OFF).
  628. *
  629. CSIST SA3 ACDSTAT (X3) = ECS ADDR OF STATS BUFFER
  630. ZR X3,SETCFG1 EXIT IF NO STATS BUFFER
  631. BX0 X3 (X0) = ECS ADDR OF STATS BUFFER
  632. SA0 SCONTMP (A0) = ADDR OF CM COPY
  633. RE SCOMNDH READ PARAMETERS FROM PLATO
  634. RJ =XECSPRTY
  635. SA1 SCONTMP+SCOMFG1 SEE IF STATS DESIRED
  636. ZR X1,SETCFG1 IF NOT REQUESTED
  637. SA1 SCONTMP+SCOMLES SEE IF FOR SPECIFIC LESSON
  638. SX7 1
  639. ZR X1,SETCFG2 IF 0, GET STATS FOR ALL LESSONS
  640. CALL FCOMPAR,(SCONTMP+SCOMACT),ACCOUNT
  641. ZR X6,SETCFG2 IF YES
  642. SETCFG1 MX7 0 NO STATISTICS
  643. SETCFG2 SA7 TSCOMFG SET CM FLAG ACCORDINGLY
  644. ZR X7,INI300 IF NOT TAKING STATISTICS
  645.  
  646. SA1 SCONTMP+SCOMZER SEE IF SHOULD ZERO BUFFER
  647. ZR X1,INI300 IF BUFFER NOT TO BE ZEROED
  648.  
  649. SA1 AZERBUF (X1) = ADDR OF ZERO ECS BUFFER
  650. BX0 X1
  651. SA0 ZBUFFER (A0) = ADDR OF CM SCRATCH SPACE
  652. RE CMNDMAX ZERO CM BUFFER
  653. RJ ECSPRTY
  654. SX1 SCOMNDS (X1) = OFFSET TO STATS
  655. IX0 X1+X3 (X0) = WHERE TO START ZEROING
  656. WE CMNDMAX ZERO THE BUFFER
  657. RJ ECSPRTY
  658.  
  659. * /--- BLOCK INITIAL-4 00 000 76/11/11 01.38
  660. MX6 0
  661. SX1 SCOMZER
  662. IX1 X1+X3
  663. WX6 X1 ZERO REQUEST TO ZERO BUFFER
  664. SX1 SCOMNDN
  665. IX1 X1+X3
  666. WX6 X1 ZERO TOTAL COMMANDS
  667. SX1 SCOMNDT
  668. IX1 X1+X3
  669. WX6 X1 ZERO TOTAL TIME
  670.  
  671. * GO THROUGH THE PRELIMINARY CHECKS AGAIN IN CASE
  672. * PLATO CHANGED THE PARAMETERS WHILE THESE CHECKS
  673. * WERE IN PROGRESS. OTHERWISE WE COULD TAKE STATS
  674. * ON THE WRONG LESSON, AND THE BUFFER WOULD NOT BE
  675. * CLEARED AGAIN.
  676.  
  677. EQ CSIST
  678. * /--- BLOCK INITIAL 00 000 81/05/08 04.28
  679. *
  680. * INITIALIZE PPT-TUTOR BUFFERS/VARIABLES
  681. *
  682. INI300 MX6 0
  683. SA6 PPTF MARK NOT CONDENSING PPT-TUTOR
  684. SA6 CVUF MARK CALC OVERLAYS NOT ASSIGNED
  685. SA6 PPTVERS INITIALIZE VERSION
  686. SA6 PUNITN UNIT COUNTER
  687. SA6 PISTU 1ST PHYSICAL UNIT NUMBER
  688. SA6 IUNUM CURRENT UNIT NUMBER
  689. SA6 PDEFNS NUMBER OF DEFINED NAMES
  690. SA6 PSETNAM CURRENT DEFINE SET NAME
  691. SA6 PVARSIZ CURRENT VARIABLE SIZE
  692. SA6 NVBYTES NUMBER VARIABLE BYTES ALLOCATED
  693. SA6 DEFP DEFINE BYTE/SHIFT/ADDR WORD
  694. SX6 777B
  695. SA6 PCHRLIM MARK CHARSET LIMIT NOT SET YET
  696. SA1 AZERBUF X1 = ADDRESS OF ZEROED ECS BUFF
  697. BX0 X1
  698. SA0 UNITTAB+2
  699. + RE PUNITL PRE-ZERO UNIT NAME TABLE
  700. RJ ECSPRTY
  701. *
  702. * /--- BLOCK INITIAL-5 00 000 81/06/29 12.33
  703. *
  704. * THE FOLLOWING CODE HANDLES THE SPECIAL
  705. * PROCESSING REQUIRED ON FIRST READ OF A LESSON.
  706. *
  707. SX7 0
  708. SA7 USEINFO CLEAR USE FILE COUNT
  709. SA7 USEFLAG NOT PROCESSING -USE-D CODE
  710. SA7 BLKCNT INITIALIZE BLKCNT AND LINECNT
  711. SA7 LINECNT
  712. SA7 STOPFLG ZERO MEANS *CSTART*
  713. SA7 INDENT LAST LINE HAD NO INDENTING
  714. SA7 PISTACK INITIALIZE STACK POINTER
  715. SA7 ISTACK CLEAR FIRST ELEMENT OF STACK
  716. SX6 -1
  717. SA6 NEWBLK FIRST LINE MAY NOT BE INDENTED
  718. SA0 CBUF BUFFER
  719. SA1 AFILEBF
  720. BX0 X1
  721. RE BLKLTH DIRECTORY FOR CURRENT LESSON
  722. RJ =XECSPRTY
  723. *
  724. * INITIALIZE MICRO-TUTOR RELEASE LEVEL FROM LESSON
  725. * DIRECTORY
  726. *
  727. SX2 4 X2 = BIAS TO BASE OF INFO
  728. SB2 X2+O.APRIV BIAS TO ACCESS PRIVILEGE WORD
  729. SA1 A0+B2
  730. LX1 60-OPV.MR+OPV.MRN-1
  731. MX6 -6 FORM MASK FOR M-TUTOR RELEASE
  732. BX6 -X6*X1 MASK OFF M-TUTOR RELEASE LEVEL
  733. + NZ X6,*+1
  734. SX6 1 SET RELEASE 0 = RELEASE 1
  735. + SA6 MTREL INITIALZE RELEASE LEVEL
  736. SX6 400B
  737. BX6 X6*X1 SET M-TUTOR CENTRAL SYSTEM
  738. SA6 MTCENF EXECUTION FLAG
  739. SX6 200B SET THE CENTRAL MICRO PLATO FLAG
  740. BX6 X1*X6
  741. SA6 CMPF
  742. *
  743. *
  744. * INITIALIZE FILE UPDATE LEVEL
  745. *
  746. SB2 X2+O.UPD8 OFFSET TO UPDATE LEVEL
  747. SA1 A0+B2
  748. SX6 X1-MINUPD8 CHECK FOR OBSOLESCENCE
  749. NG X6,=XOBSFILE
  750. BX6 X1
  751. SA6 FLEVEL STORE FILE UPDATE LEVEL
  752. *
  753. * /--- BLOCK INITIAL-5 00 000 80/08/19 04.17
  754. *
  755. ****** HOPEFULLY TEMPORARY CODE FOR PPT-COMMANDS
  756.  
  757. MX6 -1 MARK PPT-COMMANDS LEGAL
  758. SA6 =XPPTACC
  759.  
  760. * GET ACCOUNT NAME OF FILE
  761.  
  762. SB2 X2+O.ACNAM OFFSET TO ACCOUNT NAME
  763. SA1 A0+B2
  764. MX7 42
  765. BX7 X7*X1
  766.  
  767. * NON-SERVICE SYSTEMS
  768.  
  769. SA1 CSYSNAM
  770. BX6 X1
  771. SA1 PPTNAMS+0
  772. BX1 X6-X1
  773. NZ X1,PPTM2 IF NOT FSU SYSTEM
  774.  
  775. SA1 ACCNAMS+0 CHECK GOOD ACCOUNTS
  776. BX1 X7-X1
  777. ZR X1,PPTM1
  778. SA1 ACCNAMS+1
  779. BX1 X7-X1
  780. ZR X1,PPTM1
  781. SA1 ACCNAMS+2
  782. BX1 X7-X1
  783. ZR X1,PPTM1
  784. EQ PPTM3
  785.  
  786. PPTM2 SA1 PPTNAMS+1
  787. BX1 X6-X1
  788. NZ X1,PPTM3 IF NOT UOFDEL SYSTEM
  789. SA1 ACCNAMS+3
  790. BX1 X7-X1
  791. ZR X1,PPTM1
  792.  
  793. * ALLOW IN SYSTEM LESSONS AND SPECIAL LESSONS
  794.  
  795. PPTM3 SA1 SYSFLG
  796. LX1 ZPPTSHF
  797. NG X1,PPTM1
  798.  
  799. * MARK ILLEGAL ELSEWHERE
  800.  
  801. MX6 0
  802. SA6 =XPPTACC
  803. EQ PPTM1
  804. * /--- BLOCK INITIAL-5 00 000 81/07/29 02.50
  805.  
  806. PPTNAMS DATA 3LFSU
  807. DATA 3LDL1
  808.  
  809. ACCNAMS DATA 7LARAMEAU
  810. DATA 6LAMUSIC
  811. DATA 6LAUIMUS
  812. DATA 6LUOFDEL
  813.  
  814. PPTM1 BSS 0
  815. ****** HOPEFULLY TEMPORARY CODE FOR PPT-COMMANDS
  816. SA1 A0+1 GET TYPE WORD
  817. SA2 ROUTYPE
  818. BX2 X1-X2
  819. MX6 0 PRESET NOT A ROUTER
  820. NZ X2,SETROUT
  821. SX6 1
  822. *
  823. SETROUT SA6 ROUTER SET ROUTER LESSON FLAG
  824. SA1 A0+EXTRAI+51 GET SPECIAL TYPE WORD
  825. SX2 APPTYPE
  826. MX6 0 PRESET NOT AN APPLIC LESSON
  827. MX0 -6 TYPE IN BOTTOM 6 BITS
  828. BX1 -X0*X1 ISOLATE SPECIAL TYPE
  829. IX1 X1-X2 TEST TYPE
  830. NZ X1,SETAPPL
  831. SX6 1
  832. SETAPPL SA6 APPLESS SET APPLIC. LESSON FLAG
  833. *
  834. * SEE FILE GETLIN FOR MORE COMPLETE COMMENTS
  835. * A5 = POINTS TO SOURCE WORD BEING PROCESSED
  836. * B5 = BLOCK END TEST MARKER (ONE PAST LAST WORD)
  837. *
  838. SB1 1 -GETCMD- ASSUMES B1 SET
  839. SB5 CBUF+1 B5 = END TEST MARKER
  840. SA5 B5-1 SET TO FORCE READ OF NEXT BLOCK
  841. CALL GETCMD GET 1ST COMMAND (SETS *IEND*)
  842. SX6 A5
  843. SA6 IST SAVE POINTER TO NEXT COMMAND
  844. EQ NXTLINE
  845. * /--- BLOCK -ABORTC- 00 000 81/06/07 03.07
  846. CABORT2 SX6 1 1 = BAD LESSON NAME
  847. SA6 IOBUFF
  848. SA1 LESSON
  849. BX6 X1
  850. SA6 A6+1
  851. RJ =XABORTC
  852. EQ =XCONDENS
  853. *
  854. * /--- BLOCK FCOMPAR 00 000 80/07/14 15.01
  855. TITLE -FCOMPAR- COMPARE FILE NAMES
  856. *
  857. * -FCOMPAR-
  858. *
  859. * COMPARES TWO 2-WORD FILE NAMES.
  860. *
  861. * THE ACCOUNT PORTION OF A FILE NAME STORED WITHIN
  862. * PLATO HAS THE FOLLOWING FORMAT';
  863. *
  864. * 42/ACCOUNT NAME, 6/ATTRIBUTE FLAGS, 12/UNDEFINED
  865. *
  866. * THE TOP ATTRIBUTE FLAG INDICATES AN ORIGINAL (OLD-STYLE)
  867. * FILE. THE OTHER ATTRIBUTES ARE NOT YET USED.
  868. *
  869. * THE SECOND NAME PASSED TO -FCOMPAR- MUST BE COMPLETE.
  870. * I.E., FILE NAME, ACCOUNT NAME, AND ALL ATTRIBUTES
  871. * MUST BE KNOWN. THE FIRST NAME MAY BE INCOMPLETE, BUT
  872. * THE FILE NAME MUST BE SPECIFIED. IN ORDER FOR A
  873. * MATCH TO BE INDICATED, ALL KNOWN PROPERTIES OF THE
  874. * SECOND NAME MUST MATCH THOSE OF THE FIRST NAME.
  875. * I.E., THE FILE NAMES MUST MATCH, THE ACCOUNT NAME OF
  876. * THE SECOND FILE (IF NON-ZERO) MUST MATCH THE FIRST
  877. * ACCOUNT NAME, AND ALL ATTRIBUTE FLAGS SET FOR THE
  878. * SECOND NAME MUST ALSO BE SET FOR THE FIRST NAME.
  879. *
  880. * ENTRY - B1 = ADDRESS OF FIRST FILE NAME
  881. * B2 = ADDRESS OF SECOND FILE NAME
  882. *
  883. * EXIT - X6 = 0 IF MATCH, NON-ZERO IF NOT
  884. *
  885. * USES - A1, A2
  886. * X0, X1, X2, X6
  887. *
  888. * /--- BLOCK FCOMPAR 00 000 80/07/14 15.01
  889. *
  890. *
  891. FCOMPAR EQ *
  892. SA1 B1+1 LOAD FIRST FILE NAME
  893. SA2 B2+1 LOAD SECOND FILE NAME
  894. IX6 X1-X2 COMPARE
  895. NZ X6,FCOMPAR --- EXIT IF NO MATCH
  896. *
  897. SA1 B1 X1 = FIRST ACCOUNT WORD
  898. SA2 B2 X2 = SECOND ACCOUNT WORD
  899. MX0 48 MASK FOR NAME + ATTRIBUTES
  900. BX1 X0*X1 ELIMINATE JUNK IN LOW 12 BITS
  901. BX2 X0*X2
  902. BX6 X1-X2 COMPARE ACCOUNT WORDS
  903. ZR X6,FCOMPAR --- EXACT MATCH
  904. *
  905. BX6 X1*X2 MASK ACCOUNT WORDS TOGETHER
  906. BX6 X6-X1 COMPARE RESULT WITH 1ST WORD
  907. NZ X6,FCOMPAR --- NO MATCH
  908. *
  909. MX0 42 MASK FOR ACCOUNT NAMES ONLY
  910. BX6 X0*X1 1ST ACCOUNT NAME
  911. ZR X6,FCOMPAR --- MATCH IF 1ST NAME IS ZERO
  912. *
  913. BX2 X0*X2 2ND ACCOUNT NAME
  914. BX6 X6-X2 COMPARE NAMES
  915. EQ FCOMPAR
  916. *
  917. *
  918. *
  919. BLANK8 VFD 60/55555555555555550000B TO INITIALIZE OLDCMND
  920. ROUTYPE VFD 60/10LROUTER A
  921. APPTYPE EQU 2 APPLICATION LESSON TYPE
  922. EXTRAI EQU 4 OFFSET INTO DIRECTORY EXTRA INFO
  923. KOIEU VFD 12/0,48/3RIEU
  924. *
  925. ZBUFFER OVDATA CMNDMAX
  926. *
  927. ENDOV
  928. * /--- BLOCK LESLIST 00 000 77/03/19 17.00
  929. *
  930. *
  931. TITLE -LESLIST- ORIENTED COMMANDS
  932. *
  933. *
  934. LISTOV OVRLAY
  935. SA1 OVARG1
  936. SB3 X1
  937. JP B3+*
  938. *
  939. + EQ * UNUSED AS OF 3/14/77 --M4
  940. + EQ ADDLC
  941. + EQ LNAMEC
  942. + EQ FINDLC
  943. *
  944. *
  945. *
  946. * -ADDLST- COMMAND
  947. * ADDS A LESSON NAME TO *LESLIST*
  948. *
  949. *
  950. ADDLC SB1 FSADDLS -ADDLST- IS PUBLISH ERROR
  951. RJ =XPUBERRS
  952. RJ COMPILE EVALUATE NAME VARIABLE
  953. NZ B1,ERRSTOR ERROR IF NOT STOREABLE
  954. BX6 X1
  955. LX6 60-XCODEL POSITION -GETVAR- CODE
  956. SA2 LASTKEY
  957. ZR X2,PUTCODE EXIT IF ONLY ONE ARGUMENT
  958. MX2 1
  959. BX6 X2+X6 SET BIT FOR TWO ARGUMENT
  960. SA6 VARBUF
  961. CALL COMPILE EVALUATE INDEX
  962. LX1 60-XCODEL-XCODEL
  963. SA2 VARBUF
  964. BX6 X1+X2 MERGE -GETVAR- CODES
  965. EQ PUTCODE
  966. *
  967. * /--- BLOCK LESLIST 00 000 76/07/25 07.58
  968. *
  969. *
  970. * -LNAME- COMMAND
  971. * RETURNS DISPLAY FORMATTED NAME FROM *LESLIST*
  972. *
  973. *
  974. LNAMEC CALL COMPILE EVALUATE NAME VARIABLE
  975. NZ B1,ERRSTOR MUST BE STOREABLE
  976. LX1 60-XCODEL POSITION -GETVAR- CODE
  977. BX6 X1
  978. SA6 VARBUF
  979. CALL COMPILE EVALUATE INDEX VARIABLE
  980. LX1 60-XCODEL-XCODEL
  981. SA2 VARBUF
  982. BX6 X1+X2 COMBINE -GETVAR- CODES
  983. EQ PUTCODE
  984. *
  985. *
  986. *
  987. * -FINDL- COMMAND
  988. * CHECKS TO SEE IF LESSON IS ENTERED IN LESLIST
  989. *
  990. *
  991. FINDLC CALL COMPILE GET FIRST ARGUMENT
  992. NZ B1,ERRSTOR
  993. BX6 X1 SAVE -GETVAR- CODE
  994. SA6 VARBUF
  995. CALL PUTCOMP COMPILE CODE TO STORE 2ND ARG
  996. LX1 60-XCODEL-XCODEL
  997. SA2 VARBUF LOAD FIRST -GETVAR- CODE
  998. LX2 60-XCODEL
  999. BX6 X1+X2 COMBINE -GETVAR-/-PUTVAR- CODES
  1000. EQ PUTCODE
  1001. *
  1002. *
  1003. *
  1004. ENDOV
  1005. * /--- BLOCK CHANGE 00 000 76/10/06 03.01
  1006. TITLE CHANGE
  1007. *
  1008. * CHANGE COMMAND---ONLY IN CONDENSOR
  1009. *
  1010. *
  1011. CHGOV OVRLAY
  1012. *
  1013. RJ NXTCH GET FIRST ENTITY
  1014. CHG1 ZR X6,ERRNAME
  1015. *
  1016. SA6 CHTABX STORE THIS WORD AT END OF SEARCH
  1017. SB1 1
  1018. SA4 CHTAB-1
  1019. *
  1020. CHLP SA4 A4+B1 FIND WHAT TYPE OF CHANGE COMMAND
  1021. BX2 X4-X6
  1022. NZ X2,CHLP LOOP THRU ALL POSSIBLILIES
  1023. SB1 A4-CHTAB GET INDEX
  1024. JP CHJP+B1 JUMP TO PROPER ROUTINE
  1025. *
  1026. CHJP EQ CHCMD COMMAND
  1027. EQ CHSYM SYMBOL
  1028. .CLANG IFGT CLANGS,1
  1029. EQ CHLANG LANGUAGE
  1030. EQ CHENDL PUT IN SET OF NEW LANGUAGE COMMANDS
  1031. .CLANG ENDIF
  1032. EQ ERRNAME NO FIND
  1033. *
  1034. CHTAB DATA 8LCOMMAND TUTOR COMMANDS
  1035. CHTABSL DATA 8LSYMBOL CHARACTER SYMBOLS IN JUDGING
  1036. .CLANG IFGT CLANGS,1
  1037. DATA 8LCOMMANDS CHANGE COMMANDS TO DIFFERENT LANGUAGE
  1038. DATA 8LENDCMNDS PUT IN NEW SET OF COMMAND FOR DIFF LANGUAGE
  1039. .CLANG ENDIF
  1040. CHTABX DATA 0
  1041. *
  1042. SPACE 6
  1043. * CHANGE COMMAND X TO Y
  1044. * CHANGE THE NORMAL NAME OF A TUTOR COMMAND
  1045. * TO SOMETHING ELSE FOR THIS CONDENSE
  1046. * WHERE X IS NORMAL TUTOR COMMAND AND Y IS NEW NAME
  1047. * (THE WORD -TO- IS OPTIONAL)
  1048. *
  1049. * /--- BLOCK CH-COMMAND 00 000 81/07/17 15.09
  1050. *
  1051. CHCMD RJ NXTCH GET NEXT WORD
  1052. ZR X6,ERRNAME
  1053. *
  1054. * CHCMD1 SA6 CHGTEMP
  1055. SA6 CHGTEMP NO DEFAULT CASE NOW.LAW7/18/76
  1056. RJ NXTCH GET NEXT ENTITY
  1057. ZR X6,ERRNAME
  1058. SA1 LTO =8LTO
  1059. BX2 X1-X6 FORMAT IS -CHANGE X TO Y
  1060. NZ X2,CHGIT BUT -CHANGE X Y - IS ALSO OK
  1061. RJ NXTCH GET NEXT ENTITY
  1062. ZR X6,ERRNAME
  1063. CHGIT SA2 CHGTEMP
  1064. * COME HERE WITH X2 AND X6 SET (I.E. CHANGE X2 TO X6).
  1065. *CALL MACROS
  1066. ADR MICRO 1,,/A0/ A0 = START OF HASH TABLE
  1067. COM MICRO 1,,/COMNAMS/
  1068. SA0 =XCOMINFO COMINFO IS HASH TABLE
  1069. LIST G
  1070. * LOCATE OLD NAME IN TABLE
  1071. HASH X2,X1,A3 X1 = HASH CODE FOR *FROM* NAME
  1072. FIND X2,X1,CHGITA,B2,X0,B1,B3,B4,A3
  1073. EQ ERRNAME ERROR IF NAME NOT FOUND
  1074. * MAKE SURE NEW NAME IS NOT IN TABLE
  1075. CHGITA HASH X6,X5,A3 X5 = HASH CODE FOR *TO* NAME
  1076. FIND X6,X5,ERRORC,B6,X4,B5,B3,B4,A3
  1077. * STORE NEW NAME IN NAME TABLE
  1078. SA6 =XCOMNAMS+B1
  1079. * REMOVE LINKS TO OLD HASH INFO
  1080. DELLINK B2,B3,X3,B4,B5,A4,A7
  1081. * ADD LINKS TO NEW HASH INFO
  1082. SB5 X5 HASH CODE FOR NEW NAME
  1083. ADDLINK B5,B3,X3,B7,A4,A7
  1084. *
  1085. SA2 UNUMON WARN THAT ALL CHANGE COMMANDS
  1086. SX3 IEUNUM MUST BE IN IEU
  1087. BX3 X2-X3
  1088. ZR X3,NXTLINE
  1089. SB1 69 ERROR NUMBER FOR -CONDERR-
  1090. RJ =XRJERR
  1091. EQ NXTLINE
  1092. *
  1093. NXTCH EQ * FIND THE NEXT ENTITY
  1094. SA1 WORDPT
  1095. SB1 X1
  1096. SB2 60
  1097. SB3 6
  1098. MX6 0
  1099. *
  1100. NXSK SA1 B1 SKIP LEADING SPACES
  1101. SX2 X1-1R SPACE
  1102. NZ X2,CNLL
  1103. SB1 B1+1
  1104. EQ NXSK
  1105. *
  1106. CNLL SA1 B1 LOAD NEXT CHAR
  1107. ZR X1,CNLL5
  1108. SB1 B1+1
  1109. SX2 X1-1R TEST FOR SPACE
  1110. ZR X2,CNLL5
  1111. SB2 B2-B3
  1112. GE B3,B2,ERRNAME BAD IF OVER 8 CHARS
  1113. LX1 X1,B2
  1114. BX6 X6+X1 ADD TO WORD-A-BUILDING
  1115. EQ CNLL
  1116. CNLL5 ZR X6,CNLL8
  1117. CNLL6 SB2 B2-B3 NOW FILL REST WITH SPACES TO 8 CHARS
  1118. GE B3,B2,CNLL8
  1119. SX1 1R SPACE
  1120. LX1 X1,B2
  1121. BX6 X6+X1
  1122. EQ CNLL6
  1123. CNLL8 SX7 B1
  1124. SA7 WORDPT
  1125. EQ NXTCH
  1126. *
  1127. LTO DATA 8LTO
  1128. LFTO VFD 60/75241755555555550000B (FONT)TO
  1129. CHGTEMP BSS 1 TEMP STORAGE
  1130. * /--- BLOCK CH-SYMBOL 00 000 78/02/13 22.38
  1131. TITLE CHANGE SYMBOL X TO Y
  1132. *
  1133. *
  1134. * CHANGE SYMBOL X TO Y
  1135. *
  1136. * ALTERS THE STANDARD JUDGING VALUES OF CHARACTERS
  1137. *
  1138. CHSYM SA2 UNUMON CHANGE SYMBOLS ONLY IN IEU
  1139. SX3 IEUNUM
  1140. BX3 X2-X3
  1141. NZ X3,CHSERR1
  1142. SA2 CONTEST THIS MUST BE FIRST SYMBOL CHANGE
  1143. SA3 CONTAB
  1144. BX3 X2-X3
  1145. NZ X3,CHSERR2
  1146. SA2 LESSON SET JUDGING SYMBOL FLAG TO THIS LESSON
  1147. BX6 X2
  1148. SA6 A3
  1149. SA2 COMMAND SAVE NAME OF THIS COMMAND FOR
  1150. BX6 X2 LATER TESTING OF CONTINUED ADDITIONAL
  1151. SA6 CHGNAME CHANGE COMMANDS ... THIS METHOD
  1152. * ALLOWS FOR -CHANGE CHANGE TO WOW-
  1153. CHSYM1 RJ NXTCH GET NEXT ENTITY
  1154. MX5 0 INITIALIZE FONT FLAG
  1155. RJ SYMBL GET FIRXT SYMBOL
  1156. BX4 X1 SAVE CHARACTER TO CHANGE
  1157. SB4 B2 AND SAVE SHIFT
  1158. *
  1159. RJ NXTCH GET NEXT ENTITY
  1160. SA1 LTO SEE IF -TO-
  1161. BX2 X1-X6
  1162. ZR X2,CHSYM3
  1163. SA1 LFTO SEE IF -(FONT)TO-
  1164. BX2 X1-X6
  1165. NZ X2,CHSYM4 IF NOT, TRY FOR SECOND SYMBOL
  1166. SX2 100B
  1167. BX5 X2-X5 TOGGLE FONT
  1168. *
  1169. CHSYM3 RJ NXTCH GET NEXT ENTITY
  1170. *
  1171. * /--- BLOCK CH-SYMBOL 00 000 77/12/07 12.19
  1172. CHSYM4 ZR X6,ERRNAME THERE MUST BE SOMETHING THERE
  1173. SA6 SYMTABX STORE INTO END OF SEARCH LIST
  1174. SA1 SYMTAB-1 INITIALIZE START
  1175. SB1 1
  1176. SYMLP SA1 A1+B1 LOAD SEARCH WORDS
  1177. BX2 X1-X6
  1178. NZ X2,SYMLP CONTINUE UNTIL FIND MATCH
  1179. SB1 A1-SYMTAB CALCULATE NUMBER MATCH
  1180. JP SYMJP+B1
  1181. SYMJP SX1 COPLET SET TO LETTER (CONSONANT)
  1182. EQ SYMDO
  1183. + SX1 COPVOWL SET TO LETTER (VOWEL)
  1184. EQ SYMDO
  1185. + SX1 COPPUNC SET TO MISC. PUNCTUATION
  1186. EQ SYMDO
  1187. + SX1 COPPUWD SET TO PUNCTUATION AND WORD
  1188. EQ SYMDO
  1189. + SX1 COPNULL SET TO NULL CODE
  1190. EQ SYMDO
  1191. + SX1 COPDIAC SET TO DIACRITIC
  1192. EQ SYMDO
  1193. + EQ CHSYM5 NO FIND...TRY DIRECT CHANGE
  1194. *
  1195. SYMTAB DATA 8LLETTER CHANGE TO LETTER (CONSONANT)
  1196. DATA 8LVOWEL CHANGE TO LETTER (VOWEL)
  1197. DATA 8LPUNC CHANGE TO PUNCTUATION
  1198. DATA 8LPUNCWORD CHANGE TO PUNC AND WORD
  1199. DATA 8LNULL CHANGE TO NULL CODE
  1200. DATA 8LDIACRIT CHANGE TO DIACRITIC CODE
  1201. SYMTABX DATA 0
  1202. *
  1203. SYMDO SA2 CONTAB+1+X4 GET OLD 15-BIT ENTRY
  1204. LX2 X2,B4 GET 15-BITS TO TOP
  1205. MX3 6
  1206. BX3 -X3*X2 BLANK OUT OPERATION CODE
  1207. LX1 54 GET NEW OP CODE
  1208. BX6 X1+X3 PUT NEW OP CODE WITH OLD INFO BITS
  1209. EQ CHSUB NOW FINISH SUBSTITUTION
  1210. *
  1211. *
  1212. CHSYM5 RJ SYMBL GET SECOND SYMBOL
  1213. *
  1214. SA2 CONTAB+1+X1 GET SUBSTITUTE WORD
  1215. LX6 X2,B2 SHIFT TO GET 15-BITS TO TOP
  1216. CHSUB MX7 15 NOW SUBSTITUTE NEW ENTITY FOR OLD
  1217. BX6 X6*X7 GET 15-BITS
  1218. SA4 X4+CONTAB+1 GET WORD TO CHANGE IN USER TABLE
  1219. SB3 60
  1220. SB4 B3-B4
  1221. LX7 X7,B4
  1222. LX6 X6,B4
  1223. BX4 -X7*X4 ZERO OUT CODE TO CHANGE
  1224. BX6 X4+X6 ADD NEW SYMBOL
  1225. SA6 A4 AND RESTORE IN CURRENT USER TABLE
  1226. * /--- BLOCK CH-SYMBOL 00 000 77/03/31 21.43
  1227. *
  1228. SA2 WORDPT MAKE SURE THAT THE LINE IS EXHAUSTED
  1229. SA2 X2
  1230. NZ X2,ERRTERM
  1231. *
  1232. CKSYMON SA1 NEXTCOM SEE IF NEXT COMMAND ANOTHER SYMBOL CHANGE
  1233. SA2 COMCONT TEST AGAIN A BLANK COMMAND
  1234. BX2 X1-X2
  1235. ZR X2,CHGOON
  1236. SA2 CHGNAME GET NAME OF CHANGE COMMAND
  1237. BX2 X1-X2
  1238. ZR X2,CHGOON
  1239. *
  1240. SA1 CONDPNT GET CURRENT READ-IN ECS POINTER
  1241. BX0 X1
  1242. SA0 CONTAB GET ADDRESS OF CHANGED JUDGING SYMBOLS
  1243. + WE 129 PUT SYMBOLS OUT AS DUMMY UNIT
  1244. RJ ECSPRTY
  1245. SX2 129 LENGTH = 1 LABEL + 2-64 WORD TABLES
  1246. IX6 X1+X2 INCREMENT TO GET NEW LENGTH
  1247. SA6 A1 AND STORE NEW LENGTH
  1248. SA3 CONBUFF GET START OF CONDENSE BUFFER
  1249. IX6 X1-X3 GET RELATIVE START OF TABLE
  1250. LX6 ULOC2
  1251. BX6 X6+X2 PUT BIAS AND LENGTH TOGETHER
  1252. LX6 ULOC3+ULOC4
  1253. BX6 X6+X2 AND AGAIN FOR TOTAL LENGTH
  1254. LX6 60-ULOC1-ULOC2-ULOC3-ULOC4
  1255. SX3 JSYMNUM GET DUMMY UNIT NUMBER
  1256. SA6 ULOC+X3 STORE RELATIVE ADDRESS AS UNIT NAME
  1257. SA4 KJUDSYM SET UNIT NAME TO -JUDGESYM-
  1258. BX6 X4
  1259. SA6 UNAME+X3
  1260. EQ NXTLINE ONTO NEXT COMMAND
  1261. *
  1262. KJUDSYM VFD 12/0,48/8LJUDGESYM
  1263. *
  1264. CHGOON RJ GETLINE GET NEXT LINE
  1265. RJ NXTCH GET NEXT ENTITY
  1266. ZR X6,ERRNAME
  1267. SA2 CHTABSL SEE IF SYMBOL
  1268. BX2 X2-X6
  1269. ZR X2,CHSYM1 GO ONTO NEXT SYMBOL CHANGE
  1270. EQ CHG1 SEE IF ANOTHER TYPE OF CHANGE COMMAND
  1271. *
  1272. *
  1273. CHSERR1 SB1 67 ONLY IN IEU
  1274. EQ =XERR NO RETURN
  1275. *
  1276. CHSERR2 SB1 68 ALL SYMBOL CHANGES TOGETHER
  1277. EQ =XERR NO RETURN
  1278. * /--- BLOCK CH-SYMBOL 00 000 76/05/14 01.30
  1279. *
  1280. SPACE 6
  1281. * SYMBL...RETURNS X1 WITH CHARACTER FROM 0-127
  1282. * AND B2 WITH SHIFT TO 15-BIT PACKAGE
  1283. * SYMBOLS ARE CHECKED FOR LEGALITY
  1284. SYMBL EQ * GET NEXT SYMBOL
  1285. *
  1286. SA6 SYMBLD SEE IF SPECIAL WORD CASE
  1287. SA1 SYMBLT-1 PRE-SET FOR FIRST WORD TO SEARCH
  1288. SB1 1
  1289. *
  1290. SYMBLP SA1 A1+B1 GET NEXT WORD
  1291. BX2 X1-X6
  1292. NZ X2,SYMBLP LOOP UNTIL MATCH
  1293. SB1 A1-SYMBLT GET INDEX OF FOUND WORD
  1294. SA1 SYMBLTD+B1 GET INFO WORD
  1295. ZR X1,SYM0 ZERO MEANS TRY EXPLICIT CHARACTER OPTION
  1296. SB2 X1 SET SHIFT COUNT
  1297. AX1 30 AND SET CHARACTER
  1298. EQ SYMBL
  1299. *
  1300. SYMBLT DATA 8LSPACE TABLE OF SPECIAL WORDS OF INVISIBLE CHARS
  1301. DATA 8LSUP
  1302. DATA 8LSUB
  1303. DATA 8LSUPLOCK
  1304. DATA 8LSUBLOCK
  1305. DATA 8LBKSP
  1306. DATA 8LCR
  1307. *
  1308. DATA 8LFSPACE F=ALTERNATE FONT CASE
  1309. DATA 8LFSUP
  1310. DATA 8LFSUB
  1311. DATA 8LFSUPLOCK
  1312. DATA 8LFSUBLOCK
  1313. DATA 8LFBKSP
  1314. DATA 8LFCR
  1315. SYMBLD DATA 0 HOLDS PLANTED END TEST WORD
  1316. *
  1317. SYMBLTD VFD 30/55B,30/0 TABLE OF CHARACTER CODE AND SHIFT
  1318. VFD 30/67B,30/0 THAT IS IN ONE-ONE CORRESPONDENCE
  1319. VFD 30/66B,30/0 TO THE PREVIOUS TABLE
  1320. VFD 30/67B,30/15
  1321. VFD 30/66B,30/15
  1322. VFD 30/74B,30/0
  1323. VFD 30/71B,30/0
  1324. *
  1325. VFD 30/155B,30/0
  1326. VFD 30/167B,30/0
  1327. VFD 30/166B,30/0
  1328. VFD 30/167B,30/15
  1329. VFD 30/166B,30/15
  1330. VFD 30/174B,30/0
  1331. VFD 30/171B,30/0
  1332. DATA 0
  1333. * /--- BLOCK CH-SYMBOL 00 000 76/10/06 04.08
  1334. *
  1335. SYM0 SB2 B0 NO SHIFT OR ACCESS YET
  1336. MX0 54
  1337. *
  1338. SYM1 LX6 6 GET NEXT CHARACTER
  1339. BX1 -X0*X6
  1340. BX6 X0*X6 CLEAR OUT OF X6
  1341. ZR X1,SYMBLRR THERE MUST BE SOMETHING THERE
  1342. SX2 X1-FONT SEE IF FONT
  1343. NZ X2,SYM2
  1344. SX2 100B TOGGLE FONT
  1345. BX5 X5-X2
  1346. EQ SYM1
  1347. *
  1348. SYM2 SX2 X1-KUP SEE IF SHIFT CODE
  1349. NZ X2,SYM3
  1350. NZ B2,SYM2A SEE IF ACCESS-SHIFT
  1351. SB2 15 SET SHIFT SHIFT
  1352. EQ SYM1
  1353. SYM2A SX2 B2-30 MAKE SURE ONLY ACCESS BEFORE
  1354. NZ X2,SYMBLRR
  1355. SB2 45
  1356. EQ SYM1
  1357. *
  1358. SYM3 SX2 X1-ACCESS SEE IF ACCESS CODE
  1359. NZ X2,SYM4
  1360. SB2 30 SET FOR ACCESS SHIFT
  1361. EQ SYM1
  1362. *
  1363. SYM4 IX1 X1+X5 ADD IN FONT TOGGLE
  1364. *
  1365. SYM5 LX6 6 ONLY SPACES LEFT
  1366. BX2 -X0*X6
  1367. ZR X2,SYMBL
  1368. SX3 X2-1R
  1369. ZR X3,SYMBL
  1370. SX3 X2-FONT ALLOW FONT AND DO TOGGLE
  1371. NZ X3,SYMBLRR
  1372. SX2 100B
  1373. BX5 X5-X2
  1374. EQ SYM5
  1375. *
  1376. *
  1377. SYMBLRR SB1 66 SET TO SPECIAL MESSAGE
  1378. RJ =XRJERR
  1379. EQ CKSYMON AND CONTINUE TO NEXT LINE
  1380. *
  1381. CHGNAME BSS 1 THIS IS STORED INTO NEAR CHSYM
  1382. * /--- BLOCK CH-LANGS 00 000 76/10/07 00.57
  1383. .CLANG IFGT CLANGS,1
  1384. TITLE CHANGE COMMANDS TO LANGUAGEX
  1385. *
  1386. * CHANGE ENDCMNDS LANGUAGEX
  1387. *
  1388. CHENDL RJ NXTCH GET NAME OF LANGUAGE
  1389. ZR X6,ERRORC
  1390. *
  1391. SA3 LESSON
  1392. SA4 KS0LANG LEGAL ONLY IN LESSON S0LANG
  1393. BX4 X3-X4
  1394. NZ X4,ERRORC
  1395. SA4 ACCOUNT
  1396. LX4 42 SHIFT TO OLD-STYLE FLAG
  1397. PL X4,ERRORC MUST BE AN OLD-STYLE FILE
  1398. *
  1399. CHEND1 SA1 CMNDLGS GET ECS ADDRESS OF LANGUAGE NAMES
  1400. BX0 X1
  1401. SA0 CHWORK
  1402. SB1 1
  1403. SB2 CLANGS NUMBER OF POSSIBLE LANGUAGES
  1404. SX7 B1
  1405. MX2 0 BIAS TO THIS LANGUAGES TABLES
  1406. SX3 CMNDMAX
  1407. *
  1408. CHENDLP RE 1 GET LANGUAGE NAME
  1409. RJ ECSPRTY
  1410. SA4 A0
  1411. ZR X4,CHENDF SEE IF FIND EMPTY SPOT
  1412. BX4 X4-X6 SEE IF SHOULD CHANGE EXISTING TABLES
  1413. ZR X4,CHENDF
  1414. IX2 X2+X3 INCREMENT BIAS INTO TABLES
  1415. SB2 B2-B1
  1416. IX0 X0+X7 INCREMENT
  1417. NZ B2,CHENDLP
  1418. EQ ERRORC
  1419. *
  1420. CHENDF SA6 A0 NOW STORE AWAY NEW LANGUAGE NAME
  1421. + WE B1
  1422. RJ ECSPRTY
  1423. SA1 CMNDTBL AND STORE AWAY CURRENT TABLES
  1424. IX0 X1+X2 WITH PROPER BIAS
  1425. SA0 COMNAMS
  1426. + WE =XCOMNAML
  1427. RJ ECSPRTY
  1428. SA1 CMNDINF
  1429. IX0 X1+X2
  1430. SA0 =XCOMINFO
  1431. + WE =XCOMINFL
  1432. RJ ECSPRTY
  1433. *
  1434. * NOW GET TRUE COPY OF COMMANDS AND HASH INFO INTO CM
  1435. * SO WE GO ON WITH FRESH ENGLISH TABLES
  1436. *
  1437. SA1 CMNDTBL
  1438. BX0 X1
  1439. SA0 COMNAMS
  1440. + RE =XCOMNAML READ COMMAND NAME TABLE
  1441. RJ ECSPRTY
  1442. SA1 CMNDINF
  1443. BX0 X1
  1444. SA0 =XCOMINFO
  1445. + RE =XCOMINFL READ HASHED INFO TABLE
  1446. RJ ECSPRTY
  1447. EQ NXTLINE AND ONTO NEXT LINE
  1448. *
  1449. *
  1450. CHWORK BSS 1
  1451. * /--- BLOCK CH-LANGS 00 000 76/10/06 23.15
  1452. TITLE CHANGE COMMANDS TO LANGUAGEX
  1453. *
  1454. CHLANG RJ NXTCH GET NEXT ENTITY
  1455. ZR X6,ERRORC
  1456. SA1 LTO SEE IF -TO-
  1457. BX2 X1-X6
  1458. NZ X2,CHLANG1
  1459. RJ NXTCH
  1460. ZR X6,ERRORC
  1461. *
  1462. * NOW SEARCH FOR DESIRED LANGUAGE NAME
  1463. *
  1464. CHLANG1 SA1 CMNDLGS GET ECS ADDRESS OF LANGUAGE NAMES
  1465. BX0 X1
  1466. SA0 CHWORK
  1467. SX7 1
  1468. MX2 0 BIAS TO THIS LANGUAGES TABLES
  1469. SX3 CMNDMAX
  1470. *
  1471. CHLANGL RE 1 GET NEXT LANGUAGE NAME
  1472. RJ ECSPRTY
  1473. SA4 A0
  1474. ZR X4,ERRORC CANNOT FIND NAME...ZERO GUARANTEED END TEST
  1475. BX4 X4-X6 SEE IF NAME LOOKING FOR
  1476. ZR X4,CHLANG3
  1477. IX2 X2+X3 INCREMENT BIAS INTO TABLES
  1478. IX0 X0+X7 INCREMENT
  1479. EQ CHLANGL
  1480. *
  1481. CHLANG3 SA1 CMNDTBL NOW GET TABLES FOR THIS LANGUAGE
  1482. IX0 X1+X2 WITH PROPER BIAS
  1483. SA0 COMNAMS
  1484. + RE =XCOMNAML
  1485. RJ ECSPRTY
  1486. SA1 CMNDINF
  1487. IX0 X1+X2
  1488. SA0 =XCOMINFO
  1489. + RE =XCOMINFL
  1490. RJ ECSPRTY
  1491. *
  1492. EQ NXTLINE NOW ON WITH NEW COMMANDS
  1493. .CLANG ENDIF
  1494. *
  1495. ENDOV
  1496. * /--- BLOCK DRAW 00 000 79/12/15 22.06
  1497. TITLE CONDENSE DRAW COMMANDS
  1498. *
  1499. * DRAW P1;P2;P3;P4 -OR- DRAW ;P1;P2;P3 WHICH IS
  1500. * EQUIVALENT TO DRAW WHERE;P1;P2;P3 . THIS CONTINUED
  1501. * DRAW IS FLAGGED WITH SIGN BIT OF COMMAND WORD.
  1502. * ALSO USED FOR GDRAW -- FROM -ORIGIN- AND SCALED.
  1503. * ALSO USED FOR RDRAW -- RELATIVE, ROTATED, AND SIZED.
  1504. * OVARG1 = 0 FOR DRAW
  1505. * 1 FOR GDRAW
  1506. * 2 FOR RDRAW
  1507. *
  1508. * THE VERTICES ARE PACKED UP INTO ONE OR TWO 20 BIT
  1509. * PACKAGES. THE FIRST TWO PACKAGES ARE IN THE COMMAND
  1510. * WORD, THE REST ARE IN EXTRA STORAGE. THE FIRST PACKAGE
  1511. * CONTAINS THE NUMBER OF PACKAGES.
  1512. * THE FIRST PACKAGE HAS LEFT BIT SET IF CONTINUED
  1513. * COMMAND, NEXT BIT SET IF ALL VERTICES ARE PACKED 9BIT
  1514. * CODES. REST OF PACKAGES ARE 2 BITS OF TYPE, 18 BITS
  1515. * OF GETVAR CODE. 2BIT TYPE CODE AS FOLLOWS';
  1516. * 00=COARSE GRID -GETVAR- CODE
  1517. * 01=FINE GRID -GETVAR- CODE (ONLY X-COORD MARKED)
  1518. * 10=18 BIT CODE IS 9BIT-X,9BIT-Y
  1519. * 11=SKIP
  1520. *
  1521. EXT RCTOXY
  1522. *
  1523. DRAWOV OVRLAY
  1524. SA2 WORDPT SKIP OVER LEADING BLANKS
  1525. SA1 X2-1
  1526. SX2 1R
  1527. SB1 1
  1528. DRAWC1 SA1 A1+B1 LOOK AT NEXT CHARACTER
  1529. IX7 X1-X2
  1530. ZR X7,DRAWC1 LOOP TILL NON BLANK
  1531. *
  1532. ZR X1,ERR2FEW IF NO TAGS
  1533. SX7 A1 X7 = NEW VALUE FOR WORDPT
  1534. MX6 0 ASSUME NOT CONTINUED DRAW
  1535. SX2 X1-KSEMIC
  1536. NZ X2,DRAWC2 IF NOT CONTINUED
  1537. SX7 X7+B1 MOVE WORDPT PAST TERMINATOR
  1538. MX6 1 CONTINUED DRAW
  1539. LX6 XCODEL
  1540. DRAWC2 SA6 TDRAW TYPE OF DRAW COMMAND
  1541. SA7 A2 UPDATE WORDPT
  1542. *
  1543. RJ CONDRAW GETVAR CODES INTO VARBUF
  1544. *
  1545. SA1 LASTYPE
  1546. NG X1,ERRXYTG -- ERROR, FINE X WITHOUT Y
  1547. ZR X1,DRAWC3 -- OK, COARSE GRID
  1548. * -SKIP- IS LAST TAG, BACKUP COUNTERS TO IGNORE IT
  1549. SA1 VARBUF NUMBER OF GETVAR CODES
  1550. SA2 VERTEX NUMBER OF VERTICES
  1551. SX6 X1-1
  1552. SX7 X2-1
  1553. SA6 A1
  1554. SA7 A2
  1555. DRAWC3 BSS 0
  1556. *
  1557. SA1 VERTEX
  1558. LX1 1 TWICE THE VERTICES
  1559. SX2 X1-SHAREL BUFFER FOR (X,Y) VALUES
  1560. PL X2,ERR2MNY NOT ENOUGH EXECUTION ROOM
  1561. *
  1562. SA4 VARBUF A4 HOLDS ADR OF FIRST 20 BIT PACKAGE
  1563. SX2 X1-2
  1564. SA1 TDRAW FLAG FOR FIRST ARG BLANK
  1565. NZ X2,DRAWIN2 JUMP IF MORE THAN ONE VERTEX
  1566. NZ X1,DRAWIN2 JUMP IF FIRST ARG BLANK
  1567. *
  1568. * IF ONLY ONE VERTEX, NEED TO DRAW A LINE FROM STARTING
  1569. * POINT TO ENDING POINT (THAT IS, A DOT). FOLLOWING
  1570. * CODE CAUSES PROBLEMS IF THE ARGUMENTS SPECIFYING THE
  1571. * DOT CONTAIN ASSIGNMENTS, FOR THE ASSIGNMENTS WILL BE
  1572. * /--- BLOCK DRAW 00 000 79/12/15 22.06
  1573. * EXECUTED TWICE. PROCEDURE SHOULD BE CHANGED.
  1574. *
  1575. SX2 X4-1
  1576. * /--- BLOCK DRAW 00 000 76/08/21 17.05
  1577. ZR X2,DDOTC JUMP IF COARSE SINGLE VERTEX
  1578. SA2 A4+1 MOCKUP DRAW X1,Y1;X1,Y1
  1579. BX7 X2
  1580. SA7 A4+3
  1581. SA2 A4+2
  1582. BX7 X2
  1583. SA7 A4+4
  1584. SX4 4
  1585. EQ DRAWIN2
  1586. DDOTC SA2 A4+1 MOCKUP DRAW RC1;RC1
  1587. BX7 X2
  1588. SA7 A4+2
  1589. SX4 2
  1590. DRAWIN2 SX2 X4+1 X2 HOLDS COUNT OF 20 BIT PACKAGES
  1591. BX4 X1+X4
  1592. SA1 SFFLAG FLAG FOR ALL PACKED TAGS
  1593. BX4 X4+X1
  1594. BX1 X2 ALLOW ANY NUMBER OF VARIABLES
  1595. RJ VARFINS USE STANDARD VARFIN PROCESSOR
  1596. EQ NXTLINE
  1597. *
  1598. * - - - - SUBROUTINE TO HANDLE DRAW COMMAND - - - -
  1599. * USES SEMICOLON FOR ARG TERMINATOR
  1600. * FORMAT IS -- DRAW P1;P2;P3;P4
  1601. * WHERE P2 MAY BE COARSE (1512) OR FINE (100,200).
  1602. *
  1603. * VARBUF(0) RETURNED WITH NUMBER OF VARIABLES
  1604. * VARBUF(N) RETURNED WITH -GETVAR- CODE FOR NTH VARIABLE
  1605. *
  1606. * ****NOTE**** WORDPT IS ASSUMED TO POINT TO
  1607. * THE CHAR TO PROCESS FIRST.
  1608. *
  1609. * THE SUBROUTINE VARFIN WILL HANDLE THE PACKING UP OF THESE VARS
  1610. *
  1611. * 20-BIT CODE FOR EACH VAR IS AS FOLLOWS--
  1612. * TOP 2 BITS'; 0=COARSE,1=FINE,2=PACKED FINE,3=SKIP
  1613. * LOWER 18 BITS -- GETVAR CODE OR PACKED FINE GRID
  1614. *
  1615. *
  1616. CONDRAW EQ *
  1617. MX6 0
  1618. SA6 VARBUF ZERO VARBUF(0) - NO VARS YET
  1619. SA6 VERTEX COUNT NUMBER OF VERTICES
  1620. SA6 LASTYPE INDICATE DONE WITH LAST VERTEX
  1621. SA1 OVARG1 0 IF WANT TO PACK (-DRAW-)
  1622. NZ X1,NOPACK
  1623. SX6 1
  1624. LX6 XCODEL-2 NEXT TO TOP BIT IF ALL PACKED
  1625. NOPACK SA6 SFFLAG WILL BE MERGED INTO CMND WORD
  1626. CDRAW RJ CONDRAW2 GET CODE FOR NEXT VARIABLE
  1627. SA1 WORDPT CHECK FOR END-OF-LINE
  1628. SA1 X1
  1629. NZ X1,CDRAW JUMP IF NOT EOL
  1630. SA1 NEXTCOM CHECK FOR CONTINUATION
  1631. SA2 COMCONT
  1632. BX3 X1-X2
  1633. NZ X3,CONDRAW --- EXIT IF NOT CONTINUED
  1634. RJ GETLINE READ IN NEXT LINE
  1635. EQ CDRAW
  1636. *
  1637. *
  1638. * /--- BLOCK DRAW 00 000 76/08/21 17.12
  1639. *
  1640. * - - - - SUBROUTINE TO GET NEXT VARIABLE - - - -
  1641. * USES STANDARD LEXICAL SEPARATORS
  1642. *
  1643. CONDRAW2 EQ *
  1644. CODRW0 BSS 0
  1645. SA1 WORDPT POINTER TO FIRST CHARACTER
  1646. SA1 X1
  1647. ZR X1,CONDRAW2 IF END-OF-LINE
  1648. SX2 X1-1R
  1649. NZ X2,CODRW1 IF NOT BLANK
  1650. SA1 WORDPT ADVANCE CHARACTER POINTER
  1651. SX6 X1+1
  1652. SA6 A1
  1653. EQ CODRW0
  1654.  
  1655. CODRW1 BSS 0
  1656. SA1 X1+KEYTYPE GET TYPE OF FIRST CHARACTER
  1657. NZ X1,CODRW2 JUMP IF NOT NUMERIC
  1658. CALL QUIKCMP FOR QUICK COMPILE OF NUMBER
  1659. EQ CODRW3
  1660. *
  1661. CODRW2 CALL COMPSYM,SKIP,1 WILL CHANGE CODE LATER
  1662. CODRW3 SA2 VARBUF X2 HOLDS CURRENT NO. OF ARGS
  1663. SX7 X2+1 X7 HOLDS NEW NO. OF ARGUMENTS
  1664. SX2 X7-VARBUFL SUBTRACT OFF SIZE OF VARBUF
  1665. PL X2,ERR2MNY EXIT IF READINBF FULL
  1666. SA7 A2 NEW VARIABLE COUNT IN VARBUF(0)
  1667. * X1=GETVAR CODE, X7=OFFSET IN VARBUF TO PLACE CODE
  1668. SA3 VERTEX COUNT VERTICES
  1669. SX6 X3+1
  1670. SA6 A3
  1671. *
  1672. SA2 LASTKEY CHECK FOR TERMINATOR TYPE
  1673. SX2 X2-1R,
  1674. SA4 LASTYPE PICK UP PREVIOUS GETVAR TYPE
  1675. BX0 X1
  1676. AX0 XCODEAL CHECK FOR -SKIP- OPTION
  1677. SX6 X0-7
  1678. NZ X6,CODRW4 IF NOT -SKIP- OPTION
  1679. *
  1680. * -SKIP- OPTION ---
  1681. ZR X2,ERRTERM COMMA MUST NOT FOLLOW SKIP
  1682. NZ X4,ERRXYTG -,SKIP- AND -SKIP;SKIP- ILLEGAL
  1683. * (IF ONLY WANT -,SKIP- ILLEGAL, MAKE IT -NG X4,ERRXYTG-)
  1684. SX6 1 INDICATE SKIP
  1685. SA6 A4
  1686. MX1 2 SKIP HAS TOP TWO BITS SET
  1687. LX1 XCODEL
  1688. EQ CODRW9
  1689. *
  1690. CODRW4 NZ X2,CODRW5 IF DOESNT TERMINATE WITH -,-
  1691. *
  1692. * NOT -SKIP-, AND TERMINATES WITH -,-
  1693. NG X4,ERRXYTG IF LAST WAS ALSO -X- COORD
  1694. MX6 -1 INDICATE X OF FINE GRID
  1695. SA6 A4
  1696. MX6 1
  1697. LX6 XCODEL-1 NEXT TO TOP BIT FOR X-COORD
  1698. BX1 X1+X6
  1699. EQ CODRW9
  1700. *
  1701. * /--- BLOCK DRAW 00 000 76/08/21 21.46
  1702. CODRW5 MX6 0
  1703. SA6 A4 INDICATE DONE WITH VERTEX
  1704. NG X4,CODRW6 IF LAST WAS -X- COORD
  1705. *
  1706. * CURRENT ARG IS COARSE GRID ---
  1707. SA2 OVARG1 = 1 FOR GDRAW
  1708. SX6 X2-1
  1709. ZR X6,ERRXYTG GDRAW CANNOT HAVE COARSE GRID
  1710. NZ X0,CODRW8 ALL DONE IF NOT SHORT LITERAL
  1711. NZ X2,CODRW9 C/F CONVERSION ONLY FOR DRAW
  1712. BX0 X7 SAVE POINTER INTO VARBUF
  1713. RJ RCTOXY X6=X, X7=Y, X0-X1 UNCHANGED
  1714. BX3 X7 Y-COORDINATE
  1715. BX7 X0 RESTORE VARBUF OFFSET
  1716. MX4 -9
  1717. BX0 X4*X6
  1718. NZ X0,CODRW8 IF WONT FIT IN 9 BITS
  1719. BX0 X4*X3
  1720. NZ X0,CODRW8 IF WONT FIT IN 9 BITS
  1721. LX6 9 THEY FIT, PACK THEM UP
  1722. BX1 X6+X3
  1723. MX6 1 INDICATE X-Y PACKED FORMAT
  1724. LX6 XCODEL
  1725. BX1 X1+X6
  1726. EQ CODRW9
  1727. *
  1728. * -Y- COORDINATE. SEE IF CAN PACK WITH -X- COORDINATE
  1729. CODRW6 SA2 VERTEX
  1730. SX6 X2-1
  1731. SA6 A2
  1732. NZ X0,CODRW8 NOPE, -Y- IS NOT SHORT LITERAL
  1733. SA2 OVARG1 0 FOR DRAW
  1734. NZ X2,CODRW8
  1735. SA2 VARBUF+X7-1 GETVAR CODE FOR -X- COORD
  1736. MX0 -18 IGNORE BIT 'I PUT ON
  1737. BX2 -X0*X2
  1738. MX4 -9 ONLY USE 9 BITS NOW
  1739. BX0 X4*X1
  1740. NZ X0,CODRW8 IF WONT FIT IN 9 BITS
  1741. BX0 X4*X2
  1742. NZ X0,CODRW8 IF WONT FIT IN 9 BITS
  1743. LX2 9 THEY FIT, PACK THEM UP
  1744. BX1 X1+X2
  1745. MX6 1 INDICATE X-Y PACKED FORMAT
  1746. LX6 XCODEL
  1747. BX1 X1+X6
  1748. SA2 VARBUF DECREMENT VARBUF COUNT
  1749. SX7 X2-1
  1750. SA7 A2
  1751. EQ CODRW9 AND OUTPUT
  1752.  
  1753. *
  1754. CODRW8 SX6 0 INDICATE NOT ALL PACKED UP
  1755. SA6 SFFLAG
  1756. *
  1757. CODRW9 BX6 X1
  1758. SA6 X7+VARBUF STORE IN NEXT LOC OF VARBUF
  1759. EQ CONDRAW2
  1760. *
  1761. LASTYPE BSS 1 -1=X OF FINE, 0=OK, 1=SKIP
  1762. TDRAW BSS 1 TEMP FOR DRAW COMMAND
  1763. VERTEX BSS 1 COUNT NUMBER OF VERTICES
  1764. SFFLAG BSS 1 FLAG FOR ALL PACKED UP
  1765. SKIP VFD 42/4LSKIP,1/1,17/0 -JUMP-TYPE GETVAR CODE
  1766. *
  1767. *
  1768. ENDOV
  1769. * /--- BLOCK PUT 00 000 76/07/25 08.08
  1770. TITLE PUT AND PUTD COMMANDS
  1771. PUTOV OVRLAY
  1772. *
  1773. SA1 OVARG1
  1774. SB3 X1
  1775. *
  1776. JP *+B3
  1777. *
  1778. + EQ PUT
  1779. + EQ PUTD
  1780. *
  1781. *********
  1782. *
  1783. * -PUT- (CODE=26)
  1784. *
  1785. *
  1786. PUT SA1 TAGCNT
  1787. ZR X1,ERR2FEW ERROR IF BLANK TAG
  1788. *
  1789. SB1 1
  1790. SX2 1R=
  1791. * ENTRY FOR PUT WITH DELIMITERS
  1792. PUTDENT SB2 B0 START SEARCH AT 2ND CHAR
  1793. VORN SB2 B2+B1
  1794. SA1 B2+TAG
  1795. ZR X1,ERRPUT WILL BE PUTS ON VARIABLES JUMP
  1796. IX3 X2-X1
  1797. NZ X3,VORN GO SEE IF EQUALS IS LATER
  1798. *
  1799. *
  1800. *
  1801. * B2=CHAR COUNTER
  1802. * B3=CHAR PER WORD COUNTER
  1803. * B7=XTRA STORAGE WORD COUNTER
  1804. *
  1805. * CONSTRUCT IN STRING
  1806. *
  1807. SA3 INX X3=XTRA STORAGE POINTER
  1808. BX6 X3
  1809. LX6 12 START COMMAND WORD WITH XTRA POINTER--INADD
  1810. LX2 54 LEFT JUSTIFY *=*
  1811. MX0 6
  1812. SB3 10 CHAR/WORD PRESET
  1813. SB2 B0
  1814. SB7 X3+INFO GET ABSOLUTE START OF XTRA STORAGE
  1815. SX3 B7 AND PUT IN X3
  1816. SB7 B0 SET OFFSET FROM HERE TO ZERO
  1817. SX7 B0 CLEAR X7
  1818. *
  1819. *
  1820. PEQLP SA1 B2+TAG LOAD CHAR
  1821. SB2 B2+B1
  1822. LX1 54 LEFT JUSTIFY
  1823. BX1 X1*X0 MAKE SURE THAT IS ONLY BITS
  1824. BX7 X1+X7 AND ADD TO EXISTING WORD
  1825. LX7 6 PUT IN RIGHT OF EXISTING WORD
  1826. SB3 B3-B1 CHAR/WORD DECREMENT
  1827. IX4 X2-X1
  1828. ZR X4,PEQJUS DONE IF *=* FOUND
  1829. NZ B3,PEQLP GO TILL WORD FULL
  1830. SA7 X3+B7 STORE FULL WORD
  1831. SB7 B7+B1
  1832. SB3 10 RESET CHAR/WORD
  1833. SX7 B0
  1834. EQ PEQLP GO DO NEXT WORD
  1835. *
  1836. *
  1837. PEQJUS ZR B3,PINLTH
  1838. LX7 6 LEFT JUSTIFY LAST WORD
  1839. SB3 B3-B1
  1840. EQ PEQJUS
  1841. PINLTH SX1 B7+B1
  1842. SA5 INX
  1843. IX1 X1+X5 POINTER TO OUTSTR IN 2ND BYTE
  1844. BX6 X6+X1 OF COMMAND WORD
  1845. LX6 12
  1846. * /--- BLOCK PUTD 00 000 76/07/25 08.27
  1847. SX1 B2-B1 X1=CHAR CNT-1 FOR *=*
  1848. BX6 X6+X1 3RD BYTE OF COMMAND WORD = INLTH
  1849. LX6 12
  1850.  
  1851. SA7 X3+B7 STORE LAST IN WORD
  1852. SB7 B7+B1
  1853. SB4 B2 SAVE INLTH+1 TO CALCULATE OUTLTH
  1854. SB3 10
  1855. SX7 B0
  1856. *
  1857. *
  1858. * CONSTRUCT OUT STRING
  1859. *
  1860. PUTSLP SA1 TAG+B2 LOAD CHAR
  1861. SB2 B2+B1
  1862. LX1 54
  1863. BX1 X1*X0 CLEAN EXTRANEOUS BITS
  1864. BX7 X1+X7
  1865. LX7 6
  1866. SB3 B3-B1
  1867. ZR X1,POUTJUS CHECK FOR ZERO TERMINATOR
  1868. NZ B3,PUTSLP LOOP IF WORD NOT FULL
  1869. SA7 X3+B7 STORE WORD
  1870. SX7 B0 CLEAR X7
  1871. SB7 B7+B1
  1872. SB3 10
  1873. EQ PUTSLP
  1874. *
  1875. *
  1876. POUTJUS ZR B3,POUTLTH
  1877. LX7 6
  1878. SB3 B3-B1
  1879. EQ POUTJUS
  1880. *
  1881. POUTLTH SA7 X3+B7 STORE LAST OUT WORD
  1882. SB7 B7+B1 SET INX TO POINT AT NEXT WORD
  1883. SA1 INX
  1884. SX2 B7
  1885. IX7 X1+X2
  1886. SA7 INX UPDATED INX STORED
  1887. SB2 B2-B1 SUTRACT ONE FOR TERMINATOR
  1888. SX1 B2-B4 OUTLTH TO X1
  1889. BX6 X6+X1 PUT OUTLTH IN COMMAND WORD
  1890. LX6 12
  1891. EQ PUTCODE GO TACK ON COMMAND CODE AND STORE
  1892. *
  1893. *****************
  1894. * -PUTD- COMMAND
  1895. *
  1896. * *PUTD*
  1897. PUTD SA1 TAGCNT
  1898. SB3 X1-4
  1899. NG B3,ERRPUT ERROR IF LESS THAN 4 CHARS IN TAG
  1900. SB3 X1-1
  1901. SB1 1 UNIVERSAL INCREMENT CONSTANT TO B1
  1902. *
  1903. SX6 PUT= *** NUMBER OF *PUT* COMMAND ***
  1904. SA6 COMNUM FAKE OUT PUTCODE
  1905. *
  1906. SA2 TAG LOAD FIRST DELIMITER
  1907. SA3 B3+TAG LOAD LAST DELIMITER
  1908. IX3 X2-X3
  1909. NZ X3,ERRPUT DELIMITER DISAGREEMENT ERROR
  1910. SX6 B0
  1911. SA6 A3 STORE FINAL ZERO OVER LAST DELIMITER
  1912. SB2 B1
  1913. *
  1914. PUTDLP SA1 B2+TAG LOAD CHAR
  1915. BX6 X1
  1916. SA6 A1-B1 AND STORE IT ONE BACK
  1917. SB2 B2+B1
  1918. NZ X6,PUTDLP
  1919. EQ PUTDENT DONE--FINAL ZERO FOUND
  1920. *
  1921. ERRPUT SB1 87
  1922. EQ =XERR
  1923. *
  1924. ENDOV
  1925. *
  1926. * /--- BLOCK COMMON 00 000 80/08/07 01.50
  1927. TITLE COMMON, STORAGE, ROUTVAR
  1928. *
  1929. *
  1930. COMMOV OVRLAY
  1931. SA1 OVARG1
  1932. SB3 X1
  1933. JP *+B3
  1934. *
  1935. + EQ COMM -COMMON- (NON-EX)
  1936. + EQ NONSYS -COMMONX-
  1937. + EQ STOR -STORAGE-
  1938. + EQ RVAR -ROUTVAR-
  1939. + EQ SCOMX -SYSCOMX-
  1940. + EQ LVAR -LVARS-
  1941. *
  1942. * /--- BLOCK COMMON 00 000 80/10/16 21.34
  1943. TITLE COMMON
  1944. *
  1945. * -COMMON- (NOT EXECUTEABLE)
  1946. *
  1947. * MAY HAVE ONE TO FIVE ARGUMENTS
  1948. *
  1949. * IF ONE ARGUMENT -
  1950. * SPECIAL COMMON IS SET UP - ECS RESIDENT ONLY
  1951. * ARGUMENT IS THE LENGTH
  1952. *
  1953. * IF MULTIPLE ARGUMENTS -
  1954. * 1ST ARGUMENT = ACCOUNT NAME
  1955. * 2ND ARGUMENT = LESSON NAME
  1956. * 3RD ARGUMENT = COMMON BLOCK NAME
  1957. * 4TH ARGUMENT = LENGTH OF COMMON
  1958. *
  1959. * LAST ARGUMENT MAY INDICATE SPECIAL OPTIONS
  1960. *
  1961. * SETS *CCOMACT* = ACCOUNT NAME
  1962. * *CCOMLES* = LESSON NAME
  1963. * *CCOMNAM* = COMMON NAME
  1964. * *CCOMLTH* = LENGTH OF COMMON
  1965. * *CCOMBIT* = SPECIAL OPTION BITS
  1966. *
  1967. COMM BSS 0
  1968. SA1 CCOMLES SEE IF ALREADY A COMMON
  1969. NZ X1,ERRCOMM ERROR IF SO
  1970. SA1 TAGCNT
  1971. ZR X1,ERR2FEW ERROR IF NO TAG
  1972. SA1 COMACNT
  1973. SX1 X1-2
  1974. NG X1,TEMPCOM
  1975. CALL ACCFILE,COMACT,-1 GET ACCOUNT;FILE
  1976. NZ X1,COMHAV JUMP IF LESSON SPECIFIED
  1977. SA1 ACCOUNT ACCOUNT OF THIS LESSON
  1978. SA2 LESSON NAME OF THIS LESSON
  1979. MX6 1
  1980. LX6 18 SET ORIGINAL FILE FLAG
  1981. BX6 X1+X6
  1982. BX7 X2
  1983. SA6 COMACT
  1984. SA7 COMLES
  1985. *
  1986. COMHAV BSS 0
  1987. RJ BLKNAM GET SECOND ARGUMENT
  1988. ZR X6,ERRNAME
  1989. SA6 COMNAM
  1990. RJ GETCLTH GET COMMON LENGTH
  1991. NZ X6,ERRNAME
  1992. BX7 X1
  1993. SX1 MAXCOM+1
  1994. IX1 X7-X1
  1995. NG X7,ERRNAME
  1996. ZR X7,ERRNAME
  1997. PL X1,ERRNAME
  1998. SA7 COMLTH
  1999. SA1 COMACNT
  2000. SX1 X1-3
  2001. NG X1,COMM3
  2002. EQ COMLAST PROCESS LAST ARGUMENT
  2003. * /--- BLOCK COMMON 00 000 80/08/16 18.25
  2004. *
  2005. TEMPCOM MX6 0 CLEAR 2ND WORD OF NAME
  2006. SA6 COMNAM
  2007. RJ GETCLTH GET LENGTH OF COMMON
  2008. NZ X6,ERRNAME
  2009. BX7 X1
  2010. SX1 TCLTH+1
  2011. IX1 X7-X1
  2012. NG X7,ERRNAME
  2013. ZR X7,ERRNAME
  2014. PL X1,ERRNAME
  2015. SA7 COMLTH
  2016. SA1 TMPCMNM LESSON NAME FOR TEMP COMMON
  2017. BX6 X1
  2018. SA6 COMLES
  2019. SA1 COMACNT
  2020. ZR X1,COMM3
  2021. *
  2022. COMLAST CALL NXTNAME GET OPTION NAME(S) ****
  2023. ZR X6,ERRNAME
  2024. SB1 B0
  2025. *
  2026. COMM1 SA1 B1+COMOLST LOAD NEXT OPTION NAME
  2027. ZR X1,ERRNAME
  2028. BX2 X6-X1 SEE IF NAMES MATCH
  2029. ZR X2,COMM2
  2030. SB1 B1+1
  2031. EQ COMM1 KEEP SEARCHING
  2032. *
  2033. COMM2 SA1 B1+COMBLST LOAD BIT PATTERN
  2034. SA2 COMBIT
  2035. BX6 X1+X2 MERGE COMMON OPTION BITS
  2036. SA6 A2
  2037. SA1 WORDPT
  2038. SA1 X1 LOAD ENDING CHARACTER
  2039. NZ X1,COMLAST
  2040.  
  2041. * TRANSFER ARGUMENTS TO GLOBAL VARIABLES
  2042.  
  2043. COMM3 SB1 1
  2044. SA1 COMACT
  2045. SA2 A1+B1 *COMLES*
  2046. BX6 X1
  2047. SA1 A2+B1 *COMNAM*
  2048. BX7 X2
  2049. SA6 CCOMACT
  2050. SA7 CCOMLES
  2051. SA2 A1+B1 *COMLTH*
  2052. BX6 X1
  2053. BX7 X2
  2054. SA1 A2+B1 *COMBIT*
  2055. SA6 CCOMNAM
  2056. SA7 CCOMLTH
  2057. BX6 X1
  2058. SA6 CCOMBIT
  2059. EQ NXTLINE
  2060. SPACE 3
  2061. * BLKNAM - GET BLOCK NAME FOR -COMMON-
  2062.  
  2063. BLKNXIT SX7 A1 UPDATE WORDPT
  2064. SA7 WORDPT
  2065. *
  2066. BLKNAM EQ *
  2067. SA1 WORDPT GET POINTER TO FIRST CHARACTER
  2068. *
  2069. BLKN100 SA2 X1 LOAD NEXT CHARACTER
  2070. SX0 X2-1R STRIP OFF LEADING SPACES
  2071. NZ X0,BLKN110
  2072. SX1 X1+1 ADVANCE CHARACTER POINTER
  2073. EQ BLKN100
  2074. *
  2075. * COLLECT CHARACTERS OF ALPHA LITERAL
  2076. *
  2077. BLKN110 SB1 60 INITIALIZE SHIFT
  2078. MX6 0 INITIALIZE WORD BUILDING
  2079. SA1 X1-1 INITIALIZE READ REGISTER
  2080. *
  2081. BLKN120 SA1 A1+1 LOAD NEXT CHARACTER
  2082. ZR X1,BLKNXIT IF END-OF-LINE
  2083. SA2 X1+KEYTYPE
  2084. SX0 X2-OPCOMMA CHECK IF COMMA
  2085. ZR X0,BLKN140
  2086. SB1 B1-6 DECREMENT SHIFT COUNT
  2087. PL B1,BLKN130
  2088. MX6 0 RETURN ZERO NAME FOR ERROR
  2089. EQ BLKNXIT
  2090. *
  2091. BLKN130 LX1 X1,B1 POSITION NEXT CHARACTER
  2092. BX6 X1+X6 MERGE WITH WORD BUILDING
  2093. EQ BLKN120
  2094. *
  2095. * /--- BLOCK COMMON 00 000 80/08/16 18.25
  2096. BLKN140 SX7 A1+1 UPDATE *WORDPT* FOR COMMA
  2097. SA7 WORDPT
  2098. EQ BLKNAM
  2099. * /--- BLOCK COMMON 00 000 80/08/07 01.54
  2100. SPACE 3
  2101. * GETCLTH - GET LENGTH FOR -COMMON-
  2102. *
  2103. GETCLTH EQ *
  2104. CALL COMPILE
  2105. BX5 X1 SAVE -GETVAR- CODE
  2106. MX6 0 SET NO ERROR
  2107. AX1 XCODEAL
  2108. MX0 -XCODEAL
  2109. ZR X1,GETCL1 JUMP IF SHORT LITERAL
  2110. SX2 X1-1
  2111. ZR X2,GETCL2 JUMP IF LONG INTEGER LITERAL
  2112. SX2 X1-9
  2113. ZR X2,GETCL3 JUMP IF FLOATING LITERAL
  2114. MX6 -1 ERROR RETURN
  2115. EQ GETCLTH
  2116. *
  2117. GETCL1 BX1 -X0*X5 MASK OFF SHORT LITERAL
  2118. EQ GETCLTH
  2119. *
  2120. GETCL2 BX1 -X0*X5
  2121. SA1 X1+INFO LOAD LONG LITERAL
  2122. EQ GETCLTH
  2123. *
  2124. GETCL3 BX1 -X0*X5
  2125. SA1 X1+INFO LOAD LONG LITERAL
  2126. SA2 HALF
  2127. PL X1,GETCL3A
  2128. BX2 -X2 SUB .5 IF ARGUMENT NEGATIVE
  2129. GETCL3A RX3 X1+X2
  2130. UX3 X3,B1 FIX THE ARGUMENT
  2131. LX3 X3,B1
  2132. MX6 0 ZERO FOR NO ERROR
  2133. IX1 X3+X6 CHANGE -0 TO +0
  2134. EQ GETCLTH
  2135. *
  2136. *
  2137. * THE ORDER OF THE FOLLOWING CELLS IS IMPORTANT
  2138. *
  2139. COMACT BSSZ 1
  2140. COMLES BSSZ 1
  2141. COMNAM BSSZ 1
  2142. COMLTH BSSZ 1
  2143. COMBIT BSSZ 1
  2144. *
  2145. *
  2146. COMOLST DATA 2LNL
  2147. DATA 2LRO
  2148. DATA 4LRONL
  2149. DATA 7LNO LOAD
  2150. DATA 9LREAD ONLY
  2151. DATA 0LCHECKPT
  2152. DATA 0
  2153. *
  2154. COMBLST VFD 12/4000B,48/0
  2155. + VFD 12/2000B,48/0
  2156. + VFD 12/6000B,48/0
  2157. + VFD 12/4000B,48/0
  2158. + VFD 12/2000B,48/0
  2159. + VFD 12/1000B,48/0
  2160. *
  2161. *
  2162. HALF DATA .5
  2163. *
  2164. ERRCOMM SB1 86
  2165. EQ =XERR
  2166. *
  2167. * /--- BLOCK SYSCOMX 00 000 80/02/15 22.06
  2168. *
  2169. TITLE -SYSCOMX- COMMAND
  2170. * -SYSCOMX-
  2171. * EXECUTABLE -COMMON- COMMAND
  2172. *
  2173. SCOMX BSS 0
  2174. CALL SYSTEST SYSTEM LESSONS ONLY
  2175. SA1 TAGCNT
  2176. ZR X1,PAUSE2 SET SIGN BIT FOR BLANK TAG
  2177. SA1 CXDROP
  2178. CALL TAGXACT CHECK FOR ',DROP', TAG
  2179. NG X1,TWOBITS IF DROP, GO SET TOP 2 BITS
  2180. *
  2181. CALL FILEBLK GET ACCOUNT';FILE, BLOCK
  2182. *
  2183. SA1 LASTKEY CHECK FOR END-OF-LINE
  2184. ZR X1,COMX05
  2185. CALL COMPILE GET THIRD ARGUMENT (LENGTH)
  2186. *
  2187. COMX05 BX6 X1
  2188. SA6 VARBUF+4
  2189. SA1 LASTKEY CHECK FOR END-OF-LINE
  2190. ZR X1,COMX06
  2191. CALL COMPILE GET 4TH ARGUMENT (FILE TYPE)
  2192. COMX06 BX6 X1
  2193. SA6 VARBUF+5
  2194. SX6 5 5 ARGUMENTS IN BUFFER
  2195. SA6 VARBUF
  2196. SA1 LASTKEY MAKE SURE NO MORE ARGUMENTS
  2197. NZ X1,ERR2MNY
  2198. BX1 X6 5 ARGUMENTS LEGAL FOR VARFIN
  2199. EQ VARFIN -- EXIT TO PACK UP AND STORE
  2200. *
  2201. CXDROP DATA 4LDROP
  2202. *
  2203. * /--- BLOCK COMMONX 00 000 80/02/15 22.06
  2204. *
  2205. TITLE -COMMONX- CONDENSE ROUTINE
  2206. *
  2207. * ALLOWABLE FORMS ARE';
  2208. *
  2209. * COMMONX (BLANK TAG)
  2210. * COMMONX ACCOUNT';LESSON,BLOCK,LENGTH
  2211. * COMMONX ,BLOCK,LENGTH (THIS LESSON)
  2212. *
  2213. * NOTE--LENGTH ARGUMENT IS OPTIONAL.
  2214. *
  2215. NONSYS SX6 -1
  2216. SA6 CCOMX MARK COMMONX ENCOUNTERED
  2217. *
  2218. CALL FILEBLK GET ACCOUNT';FILE, BLOCK
  2219. ZR X1,PAUSE2 JUMP IF BLANK TAG
  2220. *
  2221. *
  2222. SA1 LASTKEY CHECK FOR END-OF-LINE
  2223. ZR X1,NS350 JUMP IF E-O-L
  2224. SA1 WORDPT X1 = POINTER TO NEXT CHARACTER
  2225. SA2 X1 GET NEXT CHARACTER
  2226. SX2 X2-1R, CHECK FOR COMMA
  2227. NZ X2,NS360 JUMP IF 3RD ARGUMENT NON-BLANK
  2228. SX6 X1+1 ADVANCE WORDPT
  2229. SA6 A1
  2230. *
  2231. NS350 MX6 0 SET LENGTH ARGUMENT 0
  2232. EQ NS400
  2233. *
  2234. NS360 CALL COMPILE GET THIRD ARGUMENT (LENGTH)
  2235. BX6 X1
  2236. * /--- BLOCK COMMONX 00 000 80/02/15 22.06
  2237. *
  2238. NS400 SA6 VARBUF+4
  2239. MX6 0 FAKE UP 5TH ARG (FILE TYPE)
  2240. SA6 VARBUF+5
  2241. SA1 LASTKEY SEE IF MORE ARGUMENTS
  2242. ZR X1,NS500 BLANK CODEWORD
  2243. *
  2244. SA1 WORDPT NEXT CHAR POINTER
  2245. SA2 X1 GET CHARACTER
  2246. SA2 X2+KEYTYPE CHECK FOR COMMA - NO CODE
  2247. SX0 X2-OPCOMMA
  2248. NZ X0,NS450 CODEWORD INCLUDED
  2249. SX6 X1+1 INCREMENT WORDPT
  2250. SA6 A1
  2251. MX1 0 PUT 0 FOR CODEWORD
  2252. EQ NS500
  2253. *
  2254. NS450 CALL COMPNAM GET CODEWORD
  2255. NS500 BX6 X1
  2256. SA6 VARBUF+6 STORE CODEWORD
  2257. *
  2258. *
  2259. * NOW SET OPTION BITS FOR READ ONLY, NO LOAD
  2260. *
  2261. MX7 0 CLEAR OPTION BITS
  2262. SA7 COMOPT
  2263. *
  2264. NS590 CALL NXTNAME GET OPTION NAME
  2265. ZR X6,NSFIN NO OPTIONS SPECIFIED
  2266. *
  2267. SB1 0
  2268. NS600 SA1 COMOLST+B1
  2269. ZR X1,ERRNAME NOT ON LIST
  2270. BX2 X6-X1 LOOK FOR MATCH
  2271. ZR X2,NS610 FOUND MATCH
  2272. SB1 B1+1
  2273. EQ NS600 KEEP LOOKING
  2274. *
  2275. NS610 SA1 COMOPT GET CURRENT OPTION BITS
  2276. SA2 B1+COMBLST GET NEW OPTION BITS
  2277. BX6 X2+X1 MERGE
  2278. SA6 A1 STORE
  2279. EQ NS590 SEE IF MORE OPTIONS
  2280. *
  2281. NSFIN SA1 COMOPT GET OPTION BITS
  2282. BX6 X1
  2283. LX6 12 SHIFT TO LOWER BITS
  2284. SA6 VARBUF+7 STORE BITS
  2285. SX6 7 SPECIFY 7 ARGUMENTS
  2286. SA6 VARBUF
  2287. BX1 X6 7 ARGUMENTS LEGAL FOR VARFIN
  2288. EQ VARFIN GO PACK UP AND STORE
  2289. *
  2290. COMOPT BSS 1 COMMON OPTION BITS
  2291. *
  2292. * /--- BLOCK LVARS 00 000 80/05/20 11.15
  2293. *
  2294. *
  2295. *
  2296. * -LVARS-
  2297. *
  2298. * SPECIFY NUMBER OF WORDS IN LOCAL VAR STACK
  2299. *
  2300. LVAR BSS 0
  2301. SA1 LVARL ONLY ONE -LVARS- COMMAND
  2302. NG X1,LVARERR -LVAR- ILLEGAL HERE
  2303. *
  2304. NZ X1,ERRCOMM
  2305. *
  2306. CALL GETCLTH
  2307. NG X6,ERRCOMM EXIT IF NOT LITERAL
  2308. *
  2309. NG X1,ERRCOMM OR 0 OR -
  2310. *
  2311. ZR X1,ERRCOMM
  2312.  
  2313. * GET MAXIMUM NUMBER OF LOCAL VARIABLES.
  2314.  
  2315. SX6 X1-LVMAX-1
  2316. PL X6,ERRCOMM
  2317. *
  2318. BX6 X1
  2319. SA6 LVARL SAVE SIZE OF LOCALS STACK
  2320. EQ NXTLINE
  2321. *
  2322. LVARERR SB1 774 ILLEGAL -LVAR-
  2323. EQ =XERR
  2324. * /--- BLOCK ++STORAGE 00 000 80/05/20 23.53
  2325. *
  2326. *
  2327. *
  2328. * -STORAGE- (CODE=128)
  2329. *
  2330. * SYSTEM LESSON EXECUTABLE COMMAND FORMAT --
  2331. *
  2332. * STORAGE (AMOUNT)
  2333. *
  2334. * USER LESSON COMMAND FORMAT, WHICH SETS INFO
  2335. * IN LESSON HEADER --
  2336. *
  2337. * STORAGE (AMOUNT)
  2338. * STORAGE (AMOUNT),EXACTLY
  2339. * STORAGE (AMOUNT),MINIMUM
  2340. *
  2341. *
  2342. STOR SA1 SYSFLG SEE IF SYSTEM LESSON
  2343. LX1 ZSLDSHF
  2344. NG X1,SYSONE IF YES
  2345. SA1 XSTORL
  2346. NZ X1,ERRCOMM ONE -STORAGE- PER LESSON
  2347. RJ GETCLTH GET LENGTH OF STORAGE
  2348. NZ X6,ERRCOMM IF NOT LITERAL
  2349. NG X1,ERRCOMM IF -
  2350. ZR X1,ERRCOMM IF 0
  2351. SX2 MAXSTO MAXIMUM STORAGE SIZE
  2352. IX2 X2-X1
  2353. NG X2,ERRCOMM IF TOO BIG
  2354. BX7 X1
  2355. SA7 XSTOTMP SAVE TEMPORARILY
  2356. SA1 LASTKEY SEE IF ADDITIONAL TAG
  2357. ZR X1,STOSET -- EXIT IF E-O-L (X7 = LENGTH)
  2358. SX1 X1-1R,
  2359. NZ X1,ERRCOMM -- ERROR IF NOT A COMMA
  2360. CALL NXTNAME GET TAG
  2361. ZR X6,ERRCOMM -- ERROR IF NOTHING THERE
  2362. SX7 4 ASSUME -EXACTLY- TAG
  2363. SA1 TCEXACT
  2364. BX1 X1-X6
  2365. ZR X1,STOGO
  2366. SA1 TCMIN OR MAYBE -MINIMUM-
  2367. BX1 X1-X6
  2368. NZ X1,ERRCOMM -- ERROR IF FUNNY TAG
  2369. SX7 2
  2370. STOGO LX7 SEXACTF-2 MOVE OPTION BITS TO LSTOUSE LOC
  2371. SA1 XSTOTMP
  2372. BX7 X1+X7 X7 = LENGTH PLUS OPTION BITS
  2373. *
  2374. * SAVE RESULTS -- X7 = LENGTH + OPTION BITS, AS
  2375. * WILL BE -OR-ED INTO *LSTOUSE*
  2376. *
  2377. STOSET SA7 XSTORL SAVE STORAGE LENGTH / FLAGS
  2378. EQ NXTLINE
  2379. *
  2380. TCEXACT DATA 7LEXACTLY
  2381. TCMIN DATA 7LMINIMUM
  2382. XSTOTMP BSS 1 SAVED STORAGE LENGTH
  2383. *
  2384. * /--- BLOCK ROUTVAR 00 000 76/07/25 08.34
  2385. *
  2386. *
  2387. *
  2388. * -ROUTVAR- COMMAND
  2389. * SPECIFIES NUMBER OF ROUTER VARIABLES (NR1-NR(N))
  2390. *
  2391. *
  2392. RVAR SA1 ROUTER SEE IF -ROUTER- LESSON
  2393. ZR X1,ERROUTR
  2394. SA1 RVARL ONLY ONE -ROUTVAR- COMMAND
  2395. NZ X1,ERRCOMM
  2396. CALL GETCLTH
  2397. NG X6,ERRCOMM EXIT IF NOT LITERAL
  2398. NG X1,ERRCOMM OR 0 OR -
  2399. ZR X1,ERRCOMM
  2400. SX6 RVARLIM+1
  2401. IX6 X1-X6 SEE IF TOO MANY VARIABLES
  2402. PL X6,ERRCOMM
  2403. BX6 X1
  2404. SA6 RVARL SAVE NUMBER OF ROUTER VARIABLES
  2405. EQ NXTLINE
  2406. *
  2407. ENDOV
  2408. * /--- BLOCK SORT 00 000 76/08/16 22.33
  2409. TITLE -SORT- / -SORTA- COMMAND READ-INS
  2410. *
  2411. *
  2412. *
  2413. * SORT LIST,LENGTH,INCREMENT,1ST BIT,NUM BITS,MASK
  2414. * LIST,INCREMENT
  2415. *
  2416. * SORTA LIST,LENGTH,INC,1ST CHAR,NUM CHARS,MASK
  2417. * LIST,INCREMENT
  2418. *
  2419. * MASK IS OPTIONAL. 'NOTE THAT MASK IS PUT IN THIRD WORD
  2420. * OF GVAR CODES, OUT OF ORDER.
  2421. *
  2422. *
  2423. SORTOV OVRLAY
  2424. SA1 WORDPT SAVE *WORDPT*
  2425. BX6 X1
  2426. SA6 OLDPT
  2427. MX6 0 PRE-SET ASSOCIATED LIST FLAG
  2428. SA6 SASSOC
  2429. SA6 SORTMSK SORT MASK
  2430. SA6 VARBUF+5
  2431. SA6 VARBUF+6
  2432. *
  2433. * EVALUATE LIST TYPE / LOCATION
  2434. *
  2435. CALL NXTNAM GET FIRST ENTRY
  2436. SX0 X1-1R,
  2437. NZ X0,SORT150 JUMP IF MAY BE CM BUFFER
  2438. MX0 42
  2439. SA1 SORTLST-1 SET UP FOR BUFFER TYPE SEARCH
  2440. *
  2441. SORT110 SA1 A1+1 LOAD NEXT LIST ENTRY
  2442. ZR X1,SORT150 CHECK IF CM BUFFER
  2443. BX2 X0*X1 MASK OFF BUFFER TYPE NAME
  2444. IX2 X2-X6
  2445. NZ X2,SORT110
  2446. SX6 X1 PICK UP BUFFER TYPE CODE
  2447. LX6 60-6
  2448. SA6 SORTWK
  2449. CALL COMPILE EVALUATE POSITION EXPRESSION
  2450. LX1 60-6-XCODEL POSITION -GETVAR- CODE
  2451. SA2 SORTWK
  2452. BX6 X1+X2 MERGE TYPE/POSITION
  2453. SA6 A2
  2454. SA1 LASTKEY MUST END WITH A SEMI-COLON
  2455. SX0 X1-KSEMIC
  2456. ZR X0,SORT200
  2457. EQ ERRORC
  2458. *
  2459. * /--- BLOCK SORT 00 000 76/08/16 22.56
  2460. *
  2461. SORT150 SA1 OLDPT RESTORE *WORDPT*
  2462. BX6 X1
  2463. SA6 WORDPT
  2464. CALL COMPILE EVALUATE BUFFER EXPRESSION
  2465. NZ B1,ERRSTOR ERROR IF NOT STOREABLE
  2466. BX6 X1
  2467. LX6 60-6-XCODEL POSITION -GETVAR- CODE
  2468. SA6 SORTWK
  2469. SA1 LASTKEY MUST END WITH A SEMI-COLON
  2470. SX0 X1-KSEMIC
  2471. NZ X0,ERRTERM
  2472. *
  2473. * PROCESS REMAINING ARGUMENTS
  2474. *
  2475. SORT200 CALL VARDO EVALUATE ARGUMENTS
  2476. SA1 VARBUF
  2477. SX1 X1-4 MUST BE 4 OR 5 TAGS
  2478. NG X1,ERR2FEW NOT ENOUGH TAGS
  2479. ZR X1,SORT210 EXACTLY 4 TAGS
  2480. *
  2481. SX1 X1-1
  2482. NZ X1,ERR2MNY TOO MANY TAGS
  2483. *
  2484. * PROCESS MASK GETVAR CODE
  2485. *
  2486. SA1 VARBUF+5
  2487. MX0 -XCODEL
  2488. BX6 -X0*X1 MASK OFF GETVAR CODE
  2489. ZR X6,ERRORC ERROR IF MASK IS ZERO ('.)
  2490. LX6 60-XCODEL LEFT JUST GVAR CODE
  2491. SA6 SORTMSK AND STORE IT
  2492. *
  2493. SX6 4
  2494. SA6 VARBUF THEN RESET VARBUF COUNTER
  2495. *
  2496. *
  2497. * CHECK IF COMMAND CONTINUED
  2498. *
  2499. SORT210 SA1 NEXTCOM
  2500. SA2 COMCONT SEE IF CONTINUED
  2501. BX2 X1-X2
  2502. NZ X2,SORT300
  2503. CALL GETLINE GET NEXT LINE OF TEXT
  2504. SA1 NEXTCOM
  2505. SA2 COMCONT SEE IF CONTINUED
  2506. BX2 X1-X2
  2507. ZR X2,ERRCNTD ERROR IF CONTINUED FURTHER
  2508. *
  2509. * PROCESS ASSOCIATED LIST TYPE / LOCATION
  2510. *
  2511. SA1 WORDPT SAVE *WORDPT*
  2512. BX6 X1
  2513. SA6 OLDPT
  2514. CALL NXTNAM GET FIRST ENTRY
  2515. SX0 X1-1R,
  2516. NZ X0,SORT250 JUMP IF MAY BE CM BUFFER
  2517. MX0 42
  2518. SA1 SORTLST-1 SET UP FOR BUFFER TYPE SEARCH
  2519. *
  2520. SORT220 SA1 A1+1 LOAD NEXT LIST ENTRY
  2521. ZR X1,SORT250 CHECK IF CM BUFFER
  2522. BX2 X0*X1 MASK OFF BUFFER TYPE NAME
  2523. IX2 X2-X6
  2524. NZ X2,SORT220
  2525. SX6 X1+40B PICK UP BUFFER TYPE CODE
  2526. SA6 SASSOC
  2527. CALL VARDO2 EVALUATE LOCATION ARGUMENT
  2528. EQ SORT260
  2529. *
  2530. * /--- BLOCK SORT 00 000 76/07/25 08.42
  2531. *
  2532. SORT250 SA1 OLDPT RESTORE *WORDPT*
  2533. BX6 X1
  2534. SA6 WORDPT
  2535. SX6 40B SET BUFFER TYPE CODE
  2536. SA6 SASSOC
  2537. CALL VARDO2 EVALUATE BUFFER EXPRESSION
  2538. SA1 VARBUF
  2539. SA1 X1+VARBUF LOAD BUFFER -GETVAR- CODE
  2540. NG X1,ERRSTOR MUST BE STORE-ABLE
  2541. *
  2542. SORT260 SA1 LASTKEY MUST END WITH A SEMI-COLON
  2543. SX0 X1-KSEMIC
  2544. NZ X0,ERRTERM
  2545. *
  2546. * EVALUATE ENTRY DIMENSION EXPRESSION
  2547. *
  2548. CALL VARDO2 EVALUATE DIMENSION EXPRESSION
  2549. SA1 LASTKEY
  2550. NZ X1,ERRTERM ERROR IF NOT END-OF-LINE
  2551. SA1 SORTWK
  2552. SA2 SASSOC ATTACH ASSOC BUFFER TYPE TO
  2553. LX2 XCMNDL COMMAND WORD
  2554. BX6 X1+X2
  2555. SA6 A1
  2556. *
  2557. * ATTACH INDEX IN XSTOR TO COMMAND WORD
  2558. *
  2559. SORT300 SA1 INX GET INDEX IN EXTRA STORAGE
  2560. BX6 X1
  2561. LX6 60-6-XCODEL-12 POSITION XSTOR INDEX
  2562. SA2 SORTWK
  2563. BX6 X2+X6 X6 = PARTIAL COMMAND WORD
  2564. *
  2565. * /--- BLOCK SORT 00 000 76/08/18 16.00
  2566. *
  2567. * PACK UP REMAINING -GETVAR- CODES
  2568. *
  2569. MX0 -XCODEL
  2570. SA2 VARBUF+1 LOAD LENGTH -GETVAR- CODE
  2571. SA3 VARBUF+2 LOAD INCREMENT -GETVAR- CODE
  2572. SA4 VARBUF+3 LOAD IST CHAR -GETVAR- CODE
  2573. BX2 -X0*X2
  2574. BX3 -X0*X3
  2575. BX4 -X0*X4
  2576. LX2 60-XCODEL POSITION -GETVAR- CODES
  2577. LX3 60-2*XCODEL
  2578. LX4 60-3*XCODEL
  2579. BX7 X2+X3 COMBINE -GETVAR- CODES
  2580. BX7 X4+X7
  2581. SA7 X1+INFO STORE 1ST XSTOR WORD
  2582. SA2 VARBUF+4 LOAD NUM CHARS -GETVAR- CODE
  2583. SA3 VARBUF+5 LOAD ASSOC BUFF -GETVAR- CODE
  2584. SA4 VARBUF+6 LOAD INCREMENT -GETVAR- CODE
  2585. BX2 -X0*X2
  2586. BX3 -X0*X3
  2587. BX4 -X0*X4
  2588. LX2 60-XCODEL POSITION -GETVAR- CODES
  2589. LX3 60-2*XCODEL
  2590. LX4 60-3*XCODEL
  2591. BX7 X2+X3 COMBINE -GETVAR- CODES
  2592. BX7 X4+X7
  2593. SA7 X1+INFO+1 STORE 2ND XSTOR WORD
  2594. *
  2595. SA2 SORTMSK GET MASK GETVAR CODE
  2596. BX7 X2
  2597. SA7 X1+INFO+2 AND STORE IT
  2598. *
  2599. SX7 X1+3
  2600. SA7 INX INCREMENT *INX*
  2601. SA1 ICX
  2602. IX1 X7-X1 CHECK FOR UNIT BUFFER OVERFLOW
  2603. PL X1,LNGUNIT
  2604. EQ PUTCODE EXIT
  2605. *
  2606. *
  2607. SORTLST VFD 42/0LSTORAGE,18/2
  2608. + VFD 42/0LS,18/2
  2609. + VFD 42/0LCOMMON,18/1
  2610. + VFD 42/0LC,18/1
  2611. DATA 0
  2612. *
  2613. SORTWK BSS 1
  2614. SORTMSK BSS 1
  2615. SASSOC BSS 1
  2616. *
  2617. ENDOV
  2618. *
  2619. *
  2620. * /--- BLOCK TALKREQ 00 000 81/03/23 00.29
  2621. TITLE -TALKREQ- READIN
  2622. *
  2623. ** -TALKREQ- (CODE=374)
  2624. *
  2625. * HANDLE TERM-TALK AND OTHER OUTPUT MASTER-SLAVE
  2626. * REQUESTS, USING PROCESS INTERLOCK *I.TALK* AND
  2627. * STATUS BUFFER *ATALK*
  2628. *
  2629. * TALKREQ [KEYWORD] $$ OWN STATN ACTION
  2630. * TALKREQ [KEYWORD],STATN $$ OTHER STATN ACTION
  2631. * TALKREQ STATUS,STATN,RETRN $$ OTHER STATN STATUS
  2632. *
  2633. * CERTAIN REQUESTS CAN ONLY BE PERFORMED ON YOUR
  2634. * OWN STATION; OTHERS CAN BE DONE TO ANY STATION;
  2635. * AND -STATUS- RETURNS THE STATUS TO A SPECIFIED
  2636. * VARIABLE.
  2637. *
  2638. * COMMAND WORD FORMAT --
  2639. * 20 / GETVAR CODE FOR STATN
  2640. * 20 / GETVAR CODE FOR BUFFER
  2641. * 11 / REQUEST TYPE
  2642. * 9 / -TALKREQ- COMMAND
  2643. *
  2644. *
  2645. TRQCOV OVRLAY
  2646. CALL SYSTEST SYSTEM LESSONS ONLY
  2647. *
  2648. * GET REQUEST TYPE KEYWORD
  2649. *
  2650. CALL NXTNAME
  2651. MX0 42 LIMIT TO 7 CHARACTERS
  2652. BX1 -X0*X6
  2653. NZ X1,ERRTAGS
  2654. *
  2655. * SEARCH FOR KEYWORD IN TABLE
  2656. *
  2657. SA1 TRQNAMS
  2658. TRQLP BX2 X0*X1 X2 = POSSIBLE KEYWORD
  2659. BX2 X2-X6 COMPARE
  2660. ZR X2,TRQFND -- FOUND IT
  2661. SA1 A1+1 GET NEXT KEYWORD
  2662. NZ X1,TRQLP AND LOOP UNTIL WE RUN OUT
  2663. EQ ERRTAGS -- ERROR EXIT IF NOT FOUND
  2664. *
  2665. * SAVE KEYWORD ORDINAL IN COMMAND WORD, AND
  2666. * CHECK FOR REQUIRED ARGUMENTS
  2667. *
  2668. TRQFND SX6 A1-TRQNAMS
  2669. LX6 XCMNDL PUT IN INFO POINTER FIELD
  2670. BX7 -X0*X1 ISOLATE KEYWORD TYPE (0,1,2)
  2671. ZR X7,TRQFIN TYPE 0 = KEYWORD ONLY
  2672. SA7 TRQATYP SAVE TYPE
  2673. SA6 TRQCMND SAVE BUILDING COMMAND
  2674. SA1 WORDPT CHECK FOR TAG PRESENT
  2675. SA1 X1
  2676. ZR X1,ERR2FEW -- IF NOT ENOUGH TAGS
  2677.  
  2678.  
  2679. * /--- BLOCK TALKREQ 00 000 81/04/19 16.56
  2680. *
  2681. * GET SECOND ARGUMENT (TARGET STATION)
  2682. *
  2683. CALL COMPILE
  2684. LX1 -XCODEL ALIGN AS TOP GETVAR CODE
  2685. SA2 TRQCMND
  2686. BX6 X1+X2 ADD IN TO COMMAND WORD
  2687. SA1 TRQATYP
  2688. SX1 X1-1 CHECK FOR TYPE 1 KEYWORD
  2689. ZR X1,TRQFIN -- DONE IF TYPE 1
  2690. SA6 TRQCMND SAVE BUILDING COMMAND
  2691. *
  2692. * GET THIRD ARGUMENT (WHERE APPLICABLE)
  2693. *
  2694. CALL COMPILE
  2695. NZ B1,ERRSTOR ARGUMENT MUST BE STOREABLE
  2696. LX1 60-XCODEL-XCODEL ALIGN AS 2ND GETVAR CODE
  2697. SA2 TRQCMND
  2698. BX6 X1+X2 ADD INTO COMMAND WORD
  2699. *
  2700. * COMPLETE -TALKREQ- READIN -- MAKE SURE NOTHING
  2701. * LEFT IN TAG. X6 = FINAL COMMAND WORD
  2702. *
  2703. TRQFIN SA1 WORDPT
  2704. SA1 X1 X1 = NEXT CHARACTER
  2705. NZ X1,ERR2MNY -- ERROR IF MORE IN TAG
  2706. EQ PUTCODE GO STORE COMMAND WORD
  2707.  
  2708.  
  2709. *
  2710. * KEYWORD TABLE
  2711. *
  2712. * EACH ENTRY IS OF THE FORM
  2713. *
  2714. * 42/KEYWORD
  2715. * 18/TYPE -- 0 = KEYWORD ONLY
  2716. * 1 = KEYWORD,STATN
  2717. * 2 = KEYWORD,STATN,BUFFER
  2718. *
  2719. * NOTE -- THIS TABLE MUST MATCH CORRESPONDING
  2720. * ==== EXECUTION-TIME TABLE IN -EXEC6-
  2721. *
  2722. TRQNAMS VFD 42/0LREQUEST,18/1 0
  2723. VFD 42/0LCANCEL,18/0 1
  2724. VFD 42/0LANSWER,18/0 2
  2725. VFD 42/0LSETSLIB,18/0 3
  2726. VFD 42/0LMONITOR,18/1 4
  2727. VFD 42/0LMASTER,18/1 5
  2728. VFD 42/0LTLK2MON,18/0 6
  2729. VFD 42/0LMON2TLK,18/0 7
  2730. VFD 42/0LSTATUS,18/1 8
  2731. VFD 42/0LJOIN,18/1 9
  2732. VFD 42/0LCONFER,18/1 10
  2733. VFD 42/0LPAGE,18/1 11
  2734. VFD 42/0LUNPAGE,18/1 12
  2735. VFD 42/0LPASS,18/1 13
  2736. DATA 0
  2737.  
  2738. *
  2739. * STORAGE
  2740. *
  2741. TRQCMND DATA 0 COMMAND WORD BEING BUILT
  2742. TRQATYP DATA 0 KEYWORD TYPE
  2743.  
  2744. ENDOV
  2745. * /--- BLOCK END 00 000 77/07/30 01.33
  2746. *
  2747. TITLE FONT COMMAND
  2748. *
  2749. FONTCOV OVRLAY
  2750. *
  2751. MX6 0 PRE-CLEAR
  2752. SA6 VARBUF+1
  2753. SA6 VARBUF+2
  2754. SA6 VARBUF+3
  2755. SX6 3 NUMBER OF ARGUMENTS FOR FONT
  2756. SA6 VARBUF
  2757. CALL NXTNAM GET FONT NAME
  2758. ZR X6,ERR2FEW IF NO TAGS, TOO FEW
  2759. MX0 8*6 FONT NAME CANNOT EXCEED 8 CHARS
  2760. BX0 -X0*X6
  2761. NZ X0,ERRNAME
  2762. SA2 FONTNAM FIRST TERM TO CHECK
  2763. SB3 NFONTS NUMBER OF FONTS TO CHECK
  2764. FONTLP1 BX2 X2-X6
  2765. ZR X2,FONTOK IF EQUAL TO FONT NAME, OK
  2766. SB3 B3-1 DECREMENT CHECK
  2767. ZR B3,ERRNAME IF NOT VALID NAME, ERROR OUT
  2768. SA2 A2+1 GET NEXT TERM
  2769. EQ FONTLP1 GO CHECK AGAIN
  2770.  
  2771. FONTOK SX6 B3 GET FONT SLOT NUMBER
  2772. SA6 VARBUF+1 SAVE FONT SLOT NUMBER
  2773. ZR X1,FONTDEF IF NO SEPARATOR, DEFAULT
  2774.  
  2775. CALL COMPILE GET NEXT ARGUMENT
  2776. BX6 X1 SAVE -GETVAR- CODE
  2777. SA6 VARBUF+2
  2778. SA2 LASTKEY SEE IF END-OF-LINE
  2779. ZR X2,FONTREG IF ONLY TWO PARAMS, DEFAULT
  2780.  
  2781. SX6 NMODES MAX EXTRA ARGS
  2782. SA6 FARGMAX SAVE MAX ARGS
  2783.  
  2784. FONTLP2 CALL NXTNAM GET LITERAL TAG IN X6
  2785. ZR X6,FONTGO IF END OF ARGS, GO STORE
  2786. BX0 X6 SAVE NAME IN *X0*
  2787. SA2 FARGMAX GET REMAINING ARG COUNT
  2788. SX6 X2-1 SUBTRACT ONE
  2789. SA6 A2 REPLACE IT
  2790. NG X6,ERR2MNY TOO MANY ARGUMENTS
  2791. SX1 1 SET BIT 0
  2792. SA2 FONTMOD FIRST MODE TO CHECK
  2793. SB3 NMODES NUMBER OF MODES TO CHECK
  2794. FONTLP3 BX2 X2-X0
  2795. ZR X2,FONTOK2 IF EQUAL TO FONT MODE, OK
  2796. SB3 B3-1 DECREMENT CHECK
  2797. ZR B3,ERRNAME IF NOT VALID NAME, ERROR OUT
  2798. SA2 A2+1 GET NEXT TERM
  2799. LX1 1 POSITION TO NEXT BIT
  2800. EQ FONTLP3 GO CHECK AGAIN
  2801.  
  2802. FONTOK2 SA2 VARBUF+3 GET CURRENT MODE WORD
  2803. BX0 X1*X2 SEE IF BIT ALREADY SET
  2804. NZ X0,ERR2MNY DUPLICATE TAG
  2805. BX6 X2+X1 SET BIT
  2806. SA6 A2 SAVE NEW SETTING
  2807. EQ FONTLP2
  2808.  
  2809. * /--- BLOCK FONT 00 000 79/07/19 23.36
  2810. FONTDEF SX6 0 DEFAULT FONT SIZE
  2811. SA6 VARBUF+2
  2812. FONTREG SX6 0 DEFAULT FONT MODE
  2813. SA6 VARBUF+3
  2814.  
  2815. FONTGO BSS 0
  2816. SA1 VARBUF GET NUMBER OF ARGS FOR -VARFIN-
  2817. EQ VARFIN GO PACK AND STORE ARGS
  2818.  
  2819. NFONTS EQU 19 NUMBER OF FONT SLOTS
  2820. FONTNAM BSS 0
  2821. DATA 0LMSSANS FONT 19
  2822. DATA 0LSCRIPT FONT 18
  2823. DATA 0LNTROMAN FONT 17
  2824. DATA 0LARIAL FONT 16
  2825. CON 0 FONT 15
  2826. CON 0 FONT 14
  2827. CON 0 FONT 13
  2828. CON 0 FONT 12
  2829. CON 0 FONT 11
  2830. CON 0 FONT 10
  2831. CON 0 FONT 9
  2832. CON 0 FONT 8
  2833. CON 0 FONT 7
  2834. DATA 0LCOURNEW FONT 6
  2835. DATA 0LCOURIER FONT 5
  2836. DATA 0LUOL816 FONT 4
  2837. DATA 0LUOL814 FONT 3
  2838. DATA 0LTERMINAL FONT 2
  2839. DATA 0LDEFAULT FONT 1
  2840. *
  2841. NMODES EQU 4
  2842. FONTMOD BSS 0
  2843. DATA 6LITALIC
  2844. DATA 4LBOLD
  2845. DATA 6LSTRIKE
  2846. DATA 7LUNDERLN
  2847. *
  2848. FARGMAX BSS 1 MAXIMUM ARGUMENT COUNT
  2849. *
  2850. ENDOV
  2851. * /--- BLOCK END 00 000 77/07/30 01.33
  2852. *
  2853. *
  2854. OVTABLE
  2855. *
  2856. *
  2857. END COVLY2$
plato/source/plaopl/covlay2.txt ยท Last modified: 2023/08/05 18:54 by Site Administrator