User Tools

Site Tools


plato:source:plaopl:ansin

Table of Contents

ANSIN

Table Of Contents

  • [00052] VOCABULARY READ-IN
  • [00806] SHOW VOCABULARY ERRORS
  • [00854] ENDINGS
  • [00997] ENDGSIN READIN FOR ENDINGS COMMAND
  • [01072] CONCEPT ANSWER READ-IN
  • [01646] -SPECS-

Source Code

ANSIN.txt
  1. ANSIN
  2. * /--- FILE TYPE = E
  3. * /--- BLOCK ANSIN 00 000 81/07/13 01.10
  4. IDENT ANSIN
  5. LCC OVERLAY(1,1)
  6. *
  7. *
  8. * 'N'O'T'E...
  9. * VOCABS ',UNITS', MAY BECOME VERY LONG.
  10. * FIELDS ULOC3 AND ULOC4 ARE USED TO HOLD THE
  11. * TOTAL LENGTH OF THESE UNITS. NOT GOOD BUT THAT'7S
  12. * THE FACTS.
  13. *
  14. CST
  15. *
  16. *
  17. ANSIN$ OVFILE
  18. *
  19. *
  20. EXT CONTENT
  21. EXT COMCONT CONTINUED COMMAND WORD
  22. EXT PUTCODE
  23. EXT ERRORC
  24. EXT GETLINE
  25. EXT NXTLINE
  26. EXT UNAMX
  27. EXT ECSPRTY
  28. EXT CFIRST,GETOP,GETOPN,FONTFLG,EFSTART IN -CONTEN-
  29. EXT MISCON= IN CONDENS
  30. EXT ERRTAGS,ERRNAME,ERRSTOR
  31. EXT ERRXYTG,ERR2FEW
  32. EXT ERRTERM,ERRUARG,ERRVTYP
  33. EXT ERROUTR,ERRCNTD,ERRXORQ
  34. EXT ERRBAL
  35. EXT LNGUNIT
  36. *
  37. *
  38. * /--- BLOCK IDENT 00 000 76/02/13 22.15
  39. *
  40. ANSOV OVRLAY
  41. SA1 OVARG1 DETERMINE WHICH ENTRY POINT
  42. SB3 X1
  43. JP B3+*+1
  44. *
  45. + EQ VOC01
  46. + EQ VOC02
  47. + EQ END02
  48. + EQ CON01
  49. + EQ SPE01
  50. *
  51. * /--- BLOCK VOCABULARY 00 000 78/03/02 16.42
  52. TITLE VOCABULARY READ-IN
  53. *
  54. * GENERAL STRUCTURE OF VOCABULARY BUFFER. IT EXISTS
  55. * AS A PHONEY UNIT PART OF A LESSON.
  56. *
  57. * THE FIRST WORD OF THIS UNIT...
  58. * TOP 30 BITS...0=VOCAB, 1=VOCABS
  59. * BOTTOM 30 BITS...COUNT OF VOCABULARY WORDS
  60. * (TIMES 2 FOR VOCABS CASE)
  61. *
  62. * THEN AN 8 WORD DIRECTORY HOLDING INFO ABOUT THE
  63. * LOCATION OF WORDS CONTAINING 0,1,...6,7 AND MORE
  64. * VOWELS.
  65. * IN THIS DIRECTORY...
  66. * TOP 30 BITS=NUMBER OF WORDS (TIMES 2 FOR VOCABS)
  67. * BOTTOM 30 BITS=BIAS TO START OF THESE WORDS
  68. *
  69. * THEN N WORDS OF VOCABULARY (TIMES 2 FOR VOCABS)
  70. *
  71. * THEN M WORDS OF PHRASES (THESE ARE RELATIVELY
  72. * POINTED TO BY A FIELD IN THE SECOND VOCABS
  73. * WORD. THUS, A PHRASE IS FOUND BY (2N+M(I)) FROM
  74. * THE FIRST WORD OF THE BUFFER
  75. *
  76. *
  77. * FORMAT OF THE 2 WORD VOCABS ENTRY
  78. * FIRST WORD...
  79. * 0...UNUSED (FOR HASH SEARCHES)
  80. * 1-3...NUMBER OF VOWELS
  81. * 4-7...NUMBER OF CONSONANTS
  82. * 8-59...CONTENT BITS
  83. * SECOND WORD...
  84. * 0...UNUSED (FOR HASH SEARCHES)
  85. * 1...0=WORD, 1=NUMBER
  86. * 2-16...WORD HASH, OR 2=SIGN BIT OF NUMBER
  87. * 17-22...FIRST LETTER
  88. * 23-25...NUMBER OF CONSONANT/VOWEL PAIRS
  89. * 26...CAPITALIZATION BIT
  90. * FOLLOWING ARE NOT SET BY CONTENT
  91. * 27...1=START OF A PHRASE
  92. * 28...1=MIDDLE OF A PHRASE
  93. * 29...1=END OF A PHRASE
  94. * 30-39...10-BIT PHRASE LIST-LINK
  95. * 40-48...9-BIT USER SUPPLIED INFO (WORD=N)
  96. * 49-59...11 BIT BASE SYNONYM NUMBER (0=EXTRA,1=ONLY IN
  97. * PHRASE, 2,3...N=BASE SYNONYM NUMBER)
  98. *
  99. * BASE SYNONYM ENTRIES ARE -- SINGLE KEYWORD
  100. * <EXTRA WORDS>
  101. * (SYNONYMOUS KEYWORDS)
  102. *
  103. *
  104. *
  105. * FORMAT OF PHRASE WORD...
  106. * 30 BITS = SUPER HASH OF ALL WORDS IN PHRASE
  107. * BUT NOT INCLUDING THE LAST WORD
  108. * 10 BITS = LINK TO NEXT PHRASE (0=END OF LINK-LIST)
  109. * 9 BITS = USER SUPPLIED INFO
  110. * 11 BITS = BASE SYNONYM NUMBER
  111. *
  112. *
  113. *
  114. * THE VOCABULARY READ-IN ROUTINE NEEDS NO SPECIAL
  115. * LONG CM BUFFER...CWKLTH SHOULD BE SEVERAL HUNDRED
  116. * WORDS LONG FOR EFFICIENCY SAKE IN THE MOVE DOWN
  117. * ROUTINES.
  118. *
  119. *
  120. * /--- BLOCK VOCABULARY 00 000 77/08/14 23.34
  121. *
  122. CWKLTH EQU WORKLTH TO HAVE LOCAL NAME FOR LENGTH OF
  123. * WORK BUFFER AVAILABLE
  124. CONCEPT BSS 1 KEYWORD COUNT NOW WORKING ON
  125. VOCTYPE BSS 1 VOCABULARY TYPE...
  126. * 0=NO-SPELL (1 WORD PER ENTRY)
  127. * 1=SPELL (2 WORDS PER ENTRY)
  128. WDTYPE BSS 1 WORD TYPE
  129. *
  130. VCTABLH BSS 1 VOCAB HEADER
  131. VCTABLE BSS 8 VOWEL VOCABULARY TABLE
  132. *///NOTE...VCTABLE MUST IMMEDIATELY FOLLOW VCTABLH///
  133. *
  134. VOCEC BSS 1 ECS LOCATION OF VOCABS BUFFER
  135. VOCLTH BSS 1 NUMBER OF VOCABULARY WORDS ("2 FOR VOCABS)
  136. VOCEND BSS 1 LAST WORD USED IN CONDENSE BUFFER
  137. CBUFEND BSS 1 END OF CONDENSE BUFFER PLUS ONE
  138. VOCCONT BSS 1 CONTENT BITS OF VOCABS FOR USE IN PHRASE
  139. SYNBITS EQU 11 NUMBER OF BITS USED FOR SYNONYM NUMBER
  140. PHBITS EQU 10 NUMBER OF BITS FOR PHRASE LINK
  141. HASHBTS EQU 27 TOP 27 BITS CAN BE CONSIDERED A HASH
  142. *
  143. PHRASE BSS 1 PHRASE WORKING ON (0 IF NONE)
  144. PSTART VFD 27/0,1/1,22/0 PHRASE START BIT
  145. PMIDDLE VFD 28/0,1/1,21/0 MIDDLE WORD IN PHRASE
  146. PEND VFD 29/0,1/1,20/0 LAST WORD IN PHRASE
  147. PHNUM BSS 1 NUMBER OF PHRASES
  148. URINFO BSS 1 HOLDS USER SUPPLIED INFORMATION (WORD=N)
  149. URIBITS EQU 9 FIELD FOR USER INFO
  150. *
  151. *
  152. SAVIT BSS 1 JUST A SAVE BUFFER
  153. SAVITAX BSS 1 SAVE A1 AND X1 OVER MOST OF VOCAB ROUTINE
  154. *
  155. *
  156. *
  157. VOC02 SX6 1 SET TO SPELL VOCAB (2 WORDS PER ENTRY)
  158. EQ VOCABIT
  159. VOC01 MX6 0 SET TO NO-SPELL VOCAB (1 WORD PER ENTRY)
  160. VOCABIT SA6 VOCTYPE SET TYPE OF VOCABULARY
  161. * /--- BLOCK VOCABULARY 00 000 78/02/28 22.43
  162. *
  163. * GET VOCABULARY NAME...ONLY NAME IN UNAM
  164. TABLE STARTING WITH A 6-BIT ZERO
  165. SA1 PRETAG SET UP CHARACTER ADDRESS (-1)
  166. SB1 42 ONLY ALLOW 7 CHARS, WILL PUT ZERO AS FIRST
  167. MX6 0
  168. *
  169. VUN SB3 A1 SAVE CURRENT CHARACTER ADDRESS
  170. RJ GETOP GET NEXT OPERATION CODE
  171. SX0 B2-COPSP SEE IF LEADING SPACE
  172. ZR X0,VUN LOOP TO CLEAN OFF LEADING SPACES
  173. *
  174. VULOOP ZR B2,VUMADE SEE IF END OF LINE
  175. SX0 B2-COPCOMA SEE IF COMMA
  176. ZR X0,VUMADE
  177. SX0 B2-COPSP SEE IF SPACE
  178. ZR X0,VUMADE
  179. *
  180. VUMAKE SB1 B1-6 DECREMENT SHIFT COUNT
  181. NG B1,ERRNAME SEE THAT NOT OVER 7 6-BIT CODES
  182. SB3 B3+1 NOW GET 6-BIT CHARACTERS NEEDED
  183. SA2 B3
  184. LX0 B1,X2 SHIFT TO CORRECT POSITION
  185. BX6 X6+X0 ADD TO NAME-A-BUILDING
  186. SX2 A1-B3
  187. NZ X2,VUMAKE LOOP FOR CHARACTERS OF MORE THAN 6-BITS
  188. *
  189. * B3 = A1 NOW BY NECESSITY
  190. RJ GETOP GET NEXT OP CODE FROM CONTENT
  191. EQ VULOOP
  192. *
  193. VUMADE ZR X6,ERRNAME SEE IF NOTHING THERE
  194. *
  195. *
  196. SX7 B2 SAVE LAST OPERATION CODE
  197. LX7 30
  198. SX2 A1 SAVE LAST CHARACTER ADDRESS
  199. BX7 X2+X7
  200. SA7 SAVIT
  201. *
  202. * VOCAB-NAME-PHONEY-UNIT STARTS WITH 6 BIT ZERO
  203. RJ UNAMX CALL WITH NAME IN X6
  204. * RETURN WITH UNIT NUMBER IN X6
  205. *
  206. SA2 SAVIT RESTORE CHAR ADDRESS AND LAST OP
  207. SA1 X2
  208. LX2 30
  209. SX1 X2 PUT LAST OP CODE INTO X1
  210. * /--- BLOCK VOCABULARY 00 000 76/01/20 04.17
  211. *
  212. SA2 X6+ULOC SEE IF THIS FIRST TIME OF VOCAB
  213. PL X2,VAGAIN IF NOT FIRST, THEN SEE IF READ-IN DIRECTIVE
  214. SA6 JJVOCU STORE FOR LATER
  215. MX7 0 CLEAR WORD COUNT TO ZERO
  216. SA7 VOCLTH INITIALIZE TO ZERO WORDS
  217. SA7 PHRASE NOT YET IN PHRASE
  218. SA7 PHNUM ZERO PHRASE COUNT
  219. SA7 ENDTYPE NO ENDINGS
  220. SA7 EFSTART CLEAR ENDING BASE FONT FLAG
  221. *
  222. SX6 2 LEAVE 1 FOR USE AS ONLY IN PHRASE FLAG
  223. SA6 CONCEPT SET TO FIRST BASE KEYWORD
  224. SA6 WDTYPE
  225. *
  226. SX6 8 LENGTH OF VOWEL TABLE
  227. SB2 7
  228. VINIT1 SA6 VCTABLE+B2 SET UP THE VOWEL TABLE
  229. SB2 B2-1
  230. PL B2,VINIT1
  231. *
  232. SA2 CONBUFF GET ADRESS OF CONDENSE BUFFER
  233. SA3 CBLTH AND LENGTH
  234. IX7 X2+X3
  235. SA7 CBUFEND END OF CONDENSE BUFFER PLUS ONE
  236. SA3 CONDPNT GET CURRENT LOCATION IN CONDENSE BUFFER
  237. BX7 X3
  238. SA7 VOCEC SO, THIS IS THE BUFFER
  239. *
  240. IX7 X6+X7 ADD IN LENGTH OF VOWEL TABLE
  241. * DO NOT NEED AN OVERFLOW TEST...FIRST THING ADDED WILL DO TEST
  242. SA7 VOCEND LAST WORD USED FOR VOCABS BUFFER
  243. *
  244. * /--- BLOCK VOCABULARY 00 000 77/01/24 01.09
  245.  
  246. * CHECK FOR LANGUAGE-SPECIFIC VOCABS TABLE
  247.  
  248. SA3 LESSON NAME OF LESSON BEING CONDENSED
  249. SA4 KS0LANG NAME OF COMMON VOCABS FILE
  250. BX4 X3-X4 COMPARE
  251. NZ X4,PVLOOP -- BRANCH IF NOT LANGUAGE FILE
  252. SA2 XSIMP SPECIAL MISSPELLED WORDS BUFFER
  253. BX7 X2
  254. SA7 VOCEC
  255. IX7 X6+X7 ADD IN LENGTH OF VOWEL TABLE
  256. SA7 VOCEND
  257. SX3 1000 AND IT IS THIS LONG
  258. IX7 X2+X3
  259. SA7 CBUFEND
  260. *
  261. PVLOOP ZR X1,VDONE SEE IF AT END OF LINE
  262. *
  263. VLOOP MX6 0 CLEAR USER INFORMATION WORD
  264. SA6 URINFO
  265. *
  266. RJ CONTENT GET ANY WORD CONTENTED
  267. *
  268. SA2 ENDTYPE UPDATE WORDPT FOR ERROR ROUTINES
  269. NZ X2,VLLP BUT NOT IF IN ENDINGS
  270. BX0 X6 SAVE X6
  271. SX6 A1
  272. SA6 WORDPT
  273. BX6 X0
  274. *
  275. VLLP ZR X7,VCK IF NO WORD, SEE WHAT CAUSED STOP
  276. *
  277. *
  278. SX2 X1-COPEQ HANDLE (WORD=NUM) USER INFO CASE
  279. NZ X2,VLOOP9
  280. SA2 VOCTYPE ONLY LEGAL IN TWO WORD VOCABS
  281. ZR X2,VERRNE CLEAR VOCAB FLAG AND EXIT
  282. BX0 X6 SAVE CONTENT WORD
  283. MX6 0 INITIALIZE NUMBER (X6 IS SAVED IN X0)
  284. *
  285. VLOOP5 RJ GETOP GET NEXT CHARACTER
  286. SX3 B2-COPNUM SEE IF NUMBER
  287. NZ X3,VLOOP7 OUT IF NOT NUMBER
  288. AX2 45 GET THE INTEGER VALUE OF THE NUMBER
  289. SX2 X2-1R0 REDUCE FROM DISPLAY CODE
  290. BX3 X6 GET COPY OF CURRENT INTEGER
  291. LX3 3 MULTIPLY BY 8
  292. LX6 1 MULTIPLY BY 2
  293. IX6 X3+X6 SO, NOW HAVE MULTIPLIED BY 10
  294. IX6 X2+X6 ADD IN CURRENT DIGIT
  295. EQ VLOOP5 GET NEXT CHARACTER
  296. *
  297. VLOOP7 ZR X6,VERRUSR MUST BE A NUMBER THERE
  298. MX3 60-URIBITS MAKE SURE NOT OVER BIT FIELD
  299. BX3 X3*X6
  300. NZ X3,VERRUSR
  301. LX6 SYNBITS PRE-POSITION
  302. SA6 URINFO SAVE FOR LATER USE
  303. BX6 X0 RESTORE X6
  304. SX1 B2 AND GET CURRENT OP CODE IN X1
  305. * /--- BLOCK VOCABULARY 00 000 77/01/18 14.34
  306. *
  307. *
  308. VLOOP9 SX2 X1-COPDIV CHECK FOR ENDINGS (WORD/S/ING)
  309. NZ X2,VLGO
  310. *
  311. SA3 PHRASE ENDINGS NOT ALLOWED IN PHRASES
  312. NZ X3,VERREP
  313. *
  314. RJ GETOPN CHECK TO INCLUDE BASE WORD AS
  315. SX2 B3-COPDIV SYNONYM
  316. ZR X2,VEND DO NOT INCLUDE BASE WORD IN VOCABULARY
  317. *
  318. VLGO BX0 X6 SAVE X6 AROUND STORE
  319. SX6 X1 SAVE OP CODE
  320. LX6 30
  321. SX2 A1 SAVE CURRENT INPUT CHARACTER ADDRESS
  322. BX6 X6+X2
  323. SA6 SAVITAX
  324. BX6 X0
  325. *
  326. SA0 WORK USED BY MANY AFTER HERE
  327. SA3 VOCEC GET START OF ECS BUFFER
  328. BX5 X6 GET COPY OF CONTENT WORD
  329. AX5 56 GET VOWEL COUNT
  330. SA5 VCTABLE+X5 INDEX INTO VOWEL TABLE
  331. SX4 X5 GET REL START OF WORDS WITH THIS VOWEL CNT
  332. IX3 X3+X4 MAKE ABSOLUTE START OF SEARCH
  333. AX5 30 GET NUMBER OF WORDS WITH THIS VOWEL COUNT
  334. IX5 X3+X5 GET ABSOLUTE END OF SEARCH
  335. SX2 1
  336. IX5 X5+X2 ADD ONE TO END
  337. *
  338. SA1 VOCTYPE GET TYPE OF VOCABULARY
  339. NZ X1,BVOC2
  340. *
  341. *
  342. MX4 60-SYNBITS MASK FOR USEFULL BITS
  343. BX7 X6-X7 CONSTRUCT ONE WORD CONTENT WORD
  344. BX7 X4*X7
  345. *
  346. * BINARY CHOP ECS TRANSFER SORT
  347. *
  348. IX0 X5-X3 GET NUMBER OF WORDS
  349. *
  350. BCLOOP1 AX0 1 BINARY SEARCH
  351. ZR X0,BCDONE1
  352. IX0 X0+X3 MAKE ABSOLUTE
  353. + RE 1
  354. RJ ECSPRTY
  355. SA1 A0 BRING UP WORD
  356. BX2 X1*X4
  357. IX2 X7-X2 SEE IF WORD LOOKING FOR
  358. ZR X2,VERRSHW
  359. PL X2,BCPLUS1
  360. BX5 X0 RESET BOTTOM
  361. IX0 X5-X3 GET NUMBER OF WORDS
  362. EQ BCLOOP1
  363. BCPLUS1 BX3 X0 RESET TOP
  364. IX0 X5-X3 GET NUMBER OF WORDS
  365. EQ BCLOOP1
  366. *
  367. * /--- BLOCK VOCABULARY 00 000 77/08/14 23.40
  368. *
  369. BCDONE1 SA2 WDTYPE -AND- IN BASE KEYWORD
  370. BX7 X2+X7
  371. SA7 A0
  372. SA1 VOCLTH INCREMENT NUMBER OF VOCABULARY WORDS
  373. SX7 X1+1
  374. SA7 A1
  375. *
  376. SX1 1
  377. *
  378. * ADJUST VOWEL TABLE
  379. SA3 A5 GET PROPER VOWEL TABLE WORD AGAIN
  380. MX4 1
  381. LX4 31
  382. IX6 X3+X4 ADD 1 TO COUNT OF WORDS OF THIS VOWEL COUNT
  383. SA6 A3
  384. SB2 VCTABLE+8 GET END OF VOWEL TABLE + 1
  385. VOWT1 SB3 A3+1
  386. GE B3,B2,VOWT2 ADJUST TO END OF TABLE
  387. SA3 B3 GET NEXT TABLE WORD
  388. IX6 X3+X1 ADD 1 TO RELATIVE START OF THESE WORDS
  389. SA6 A3
  390. EQ VOWT1
  391. *
  392. VOWT2 BX0 X5 LOCATION TO START INSERT IN CONDENSE BUFFER
  393. *
  394. SA5 VOCEND LAST WORD USED IN BUFFER
  395. IX6 X5+X1 INCREMENT BY 1 VOCAB WORD
  396. SA6 A5
  397. BX5 X6 AND INTO X5 FOR LATER USE IN MOVE ROUTINE
  398. SA1 CBUFEND GET LAST WORD OF CONDENSE BUFFER
  399. IX1 X6-X1
  400. PL X1,VERRTB TEST FOR BINARY TOO LONG
  401. *
  402. SX2 CWKLTH-1
  403. *
  404. VOCTOP1 SA0 WORK+1 START OF SCRATCH AREA
  405. IX6 X5-X0 GET NUMBER OF WORDS TO MOVE DOWN
  406. SB2 X6 FOR VOCLST1
  407. IX7 X2-X6
  408. PL X7,VOCLST1 SEE IF THIS LAST MOVE NEEDED
  409. + RE CWKLTH-1 READ-IN ECS BUFFER
  410. RJ ECSPRTY
  411. SA0 WORK RESET TO INCLUDE EXTRA WORD
  412. + WE CWKLTH-1 WRITE BACK OUT SHIFTED DOWN ONE
  413. RJ ECSPRTY
  414. SA1 A0+CWKLTH-1 GET LAST WORD READ-IN
  415. BX6 X1
  416. SA6 A0 AND POSITION IT FOR NEXT TIME WRITE-OUT
  417. IX0 X0+X2 RE-SET CURRENT PLACE WORKING ON
  418. EQ VOCTOP1
  419. *
  420. VOCLST1 RE B2 READ IN LAST PIECE
  421. RJ ECSPRTY
  422. SA0 WORK SET TO EXTRA WORD
  423. SB2 B2+1 AND EXTRA COUNT
  424. + WE B2
  425. RJ ECSPRTY
  426. EQ VADDED
  427. *
  428. *
  429. BVOC2 IX3 X3-X2 BACK UP THE BEGINNING
  430. MX2 HASHBTS
  431. SA6 VOCCONT SAVE FOR POSSIBLE USE IN PHRASE
  432. BCLOOP2 IX0 X5-X3 DO VOCABS BINARY CHOP
  433. AX0 2 THUS GET RID OF ONES BIT
  434. ZR X0,BCDONE2
  435. LX0 1
  436. IX0 X0+X3 MAKE ABSOLUTE
  437. * /--- BLOCK VOCABULARY 00 000 77/08/09 17.50
  438. + RE 2 GET TWO WORD VOCABS ENTRY
  439. RJ ECSPRTY
  440. SA1 A0 GET FIRST WORD
  441. IX1 X6-X1
  442. NZ X1,BCPM SEE IF FIRST WORDS MATCH
  443. SA4 A0+1 BRING UP SECOND WORD
  444. BX1 X2*X4 JUST LOOK AT HASH BITS
  445. IX1 X7-X1 SEE IF THEY MATCH
  446. ZR X1,VFIND
  447. BCPM PL X1,BCPLUS2
  448. BX5 X0
  449. EQ BCLOOP2
  450. BCPLUS2 BX3 X0
  451. EQ BCLOOP2
  452. *
  453. *
  454. VFIND BX7 X4 TRANSFER HASH WORD TO X7
  455. BX5 X0 SAVE ADDRESS FOR USE IN PHRASE
  456. SX6 1
  457. IX5 X5+X6
  458. *
  459. SA3 SAVITAX RESTORE A1-X1
  460. SA1 X3
  461. LX3 30
  462. SX1 X3
  463. *
  464. SX4 X1-COPASTR SEE IF THIS IS PART OF A PHRASE
  465. SA3 PHRASE SEE IF ALREADY IN PHRASE
  466. NZ X3,INPHR ALREADY IN PHRASE
  467. ZR X4,PHRST AHA...FIRST WORD OF A PHRASE
  468. *
  469. MX2 60-SYNBITS MUST SEE IF THIS WORD ONLY IN A PHRASE
  470. BX4 -X2*X7
  471. SX4 X4-1 IN WHICH CASE THE BASE SYNONYM=1
  472. NZ X4,VERRSHW ALLOW A WORD TO OCCUR ONLY ONCE IN VOCABS
  473. BX7 X2*X7
  474. SA2 WDTYPE NOW MUST SET TO THIS WORD-TYPE
  475. BX7 X2+X7
  476. SA3 URINFO ALSO PUT IN ANY USER INFO
  477. BX7 X3+X7
  478. SA7 A0+1 PUT BACK IN CHANGED CONDITION (HASH WORD)
  479. + WE 2 WRITE BACK OUT TO ECS BUFFER
  480. RJ ECSPRTY
  481. EQ VADDED
  482. *
  483. *
  484. BCDONE2 SA6 A0 STORE AWAY CONTENT WORD
  485. SA2 WDTYPE -AND- IN BASE KEYWORD
  486. BX7 X2+X7
  487. SA3 URINFO ALSO PUT IN ANY USER INFO
  488. BX7 X3+X7
  489. SA7 A0+1 STORE AWAY HASH WORD
  490. *
  491. SX2 2
  492. *
  493. SA3 A5 GET VOWEL TABLE WORD AGAIN
  494. MX4 1
  495. LX4 32
  496. IX6 X3+X4 ADD 2 TO COUNT OF THIS GROUP OF WORDS
  497. SA6 A3
  498. SB2 VCTABLE+8 GET END OF BUFFER+1
  499. VOWT5 SB3 A3+1
  500. GE B3,B2,VOWT6 DO TILL END OF BUFFER
  501. SA3 B3 GET NEXT VOWEL TABLE WORD
  502. IX6 X3+X2 ADD TO RELATIVE START
  503. SA6 A3
  504. EQ VOWT5
  505. *
  506. VOWT6 SA1 VOCLTH INCREMENT NUMBER OF VOCABULARY WORDS
  507. IX6 X1+X2 TWO WORDS FOR VOCABS CASE
  508. SA6 A1
  509. * /--- BLOCK VOCABULARY 00 000 77/08/14 23.41
  510. *
  511. SA4 VOCEND LAST WORD USED IN BUFFER
  512. IX6 X4+X2 INCREMENT BY 2 VOCABS WORDS
  513. SA6 A4
  514. *
  515. BX0 X5 LOCATION TO START INSERT IN CONDENSE BUFFER
  516. SX1 1
  517. IX5 X5+X1 FOR POSSIBLE USE IN PHRASE
  518. *
  519. IX4 X4+X1 LAST WORD USED PLUS 1
  520. SA1 CBUFEND GET LAST WORD OF CONDENSE BUFFER
  521. IX1 X6-X1
  522. PL X1,VERRTB TEST FOR BINARY TOO LONG
  523. *
  524. SX2 CWKLTH-2
  525. *
  526. VOCTOP2 SA0 WORK+2 START OF SCRATCH AREA
  527. IX6 X4-X0 GET NUMBER OF WORDS TO MOVE DOWN
  528. SB2 X6 FOR VOCLST2
  529. IX3 X2-X6
  530. PL X3,VOCLST2 SEE IF THIS LAST MOVE NEEDED
  531. + RE CWKLTH-2 READ-IN ECS BUFFER
  532. RJ ECSPRTY
  533. SA0 WORK RESET TO INCLUDE EXTRA WORD
  534. + WE CWKLTH-2 WRITE BACK OUT SHIFTED DOWN ONE
  535. RJ ECSPRTY
  536. SA1 A0+CWKLTH-2 GET LAST WORDS READ-IN
  537. BX6 X1
  538. SA6 A0 AND POSITION IT FOR NEXT TIME WRITE-OUT
  539. SA1 A0+CWKLTH-1
  540. BX6 X1
  541. IX0 X0+X2 RE-SET CURRENT PLACE WORKING ON
  542. SA6 A0+1
  543. EQ VOCTOP2
  544. *
  545. VOCLST2 RE B2 READ IN LAST PIECE
  546. RJ ECSPRTY
  547. SA0 WORK SET TO EXTRA WORD
  548. SB2 B2+2 AND EXTRA COUNT
  549. + WE B2
  550. RJ ECSPRTY
  551. *
  552. *
  553. SA3 SAVITAX RESTORE A1 AND X1 HERE
  554. SA1 X3
  555. LX3 30
  556. SX1 X3
  557. *
  558. SX4 X1-COPASTR SEE IF PHRASE MARKER
  559. SA3 PHRASE SEE WHERE IN PHRASE
  560. NZ X3,INPH
  561. NZ X4,VADDED NOT STARTING PHRASE
  562. *
  563. MX6 60-SYNBITS-URIBITS MUST SET -ONLY IN A PHRASE- MARKER
  564. * AND NOT USER INFO BITS EITHER
  565. BX7 X6*X7
  566. SX6 1
  567. BX7 X6+X7 BASE SYNONYM = 1 MEANS ONLY IN A PHRASE
  568. *
  569. PHRST SA2 PSTART STARTING PHRASE
  570. BX7 X2+X7 SET START BIT
  571. EQ BCDONEP
  572. *
  573. INPH MX6 60-SYNBITS-URIBITS MUST SET -ONLY IN A PHRASE- MARKER
  574. * AND NOT USER INFO BITS EITHER
  575. BX7 X6*X7
  576. SX6 1
  577. BX7 X6+X7 BASE SYNONYM = 1 MEANS ONLY IN A PHRASE
  578. INPHR NZ X4,ENDPHR SEE IF ENDING PHRASE
  579. SA2 PMIDDLE SET MIDDLE OF PHRASE BIT
  580. BX7 X2+X7
  581. BCDONEP SA7 WORK RESTORE HASH WORD WITH PROPER BITS SET
  582. SA0 A7
  583. BX0 X5
  584. + WE 1
  585. RJ ECSPRTY
  586. * /--- BLOCK VOCABULARY 00 000 77/08/14 23.43
  587. *
  588. LX3 5 SHIFT PHRASE-A-BUILDING
  589. SA2 VOCCONT GET CONTENT WORD
  590. BX3 X2-X3 PUT IN CONTENT BITS
  591. MX0 HASHBTS
  592. BX2 X0*X7 AND HASH OF WORD 2
  593. BX6 X2-X3
  594. SA6 A3 AND STORE BACK IN PHRASE
  595. EQ VLOOP GO GET NEXT WORD
  596. *
  597. *
  598. ENDPHR SA4 PEND SET END OF PHRASE BIT
  599. BX7 X4+X7
  600. SA2 PHNUM GET PHRASE COUNT
  601. SX6 X2+1 AND INCREMENT
  602. MX0 60-PHBITS
  603. BX0 X0*X6
  604. NZ X0,VERRTP SEE IF TOO MANY PHRASES
  605. SA6 A2
  606. *
  607. MX0 60-SYNBITS-PHBITS-URIBITS GET PHRASE READY FOR STORAGE
  608. BX4 X3
  609. LX4 PHBITS+SYNBITS+URIBITS
  610. BX3 X3-X4
  611. BX3 X0*X3
  612. MX0 60-PHBITS GET LINK FROM LAST WORD
  613. LX7 HASHBTS+3+PHBITS
  614. BX4 -X0*X7
  615. BX7 X0*X7 CLEAR OUT LAST LINK
  616. BX7 X7+X6 AND PUT IN THIS LINK
  617. LX7 60-HASHBTS-3-PHBITS
  618. SA7 WORK PUT HASH WORD BACK WITH PROPER BITS SET
  619. SA0 A7
  620. BX0 X5
  621. + WE 1
  622. RJ ECSPRTY
  623. LX4 SYNBITS+URIBITS POSITION UP PHRASE LINK
  624. BX3 X3+X4 PHRASE + LINK
  625. SA4 WDTYPE AND ADD IN BASE SYNONYM
  626. BX6 X3+X4
  627. *
  628. SA1 URINFO ALSO PUT IN ANY USER INFO
  629. BX6 X1+X6
  630. SA6 WORK STORE AWAY PHRASE
  631. SA0 A6
  632. SA1 VOCEND GET LAST WORD USED IN BUFFER
  633. SX2 1 GOING TO ADD 1 TO IT
  634. IX6 X1+X2
  635. SA6 A1
  636. BX0 X6 SET UP ECS WRITE POINTER FOR PLACING PHRASE
  637. SA1 CBUFEND SEE IF BUFFER TOO LONG
  638. IX1 X6-X1
  639. PL X1,VERRTB
  640. + WE 1 WRITE THE PHRASE WORD OUT
  641. RJ ECSPRTY
  642. *
  643. MX6 0
  644. SA6 PHRASE CLEAR OUT PHRASE FLAG
  645. *
  646. VADDED SA3 ENDTYPE SEE IF DOING ENDINGS
  647. NZ X3,VENDNXT
  648. *
  649. SA2 SAVITAX NOW MUST RESTORE A1 AND X1
  650. SA1 X2
  651. LX2 30
  652. SX1 X2
  653. *
  654. SX2 X1-COPDIV SKIP INCR., IF STARTING ENDINGS
  655. ZR X2,VEND ENDINGS WITH BASE WORD IN VOCABULARY
  656. *
  657. VADDED1 SA2 WDTYPE GET BASE KEYWORD TYPE
  658. ZR X2,VCK IF EXTRA WORD, ONTO NEXT
  659. SA3 CONCEPT SEE IF IN SINGLE KEYWORD MODE
  660. NG X3,VCK NEGATIVE MEANS SYNONYMOUS KEYWORDS MODE
  661. SX6 X3+1 INCREMENT TO NEXT KEYWORD
  662. * /--- BLOCK VOCABULARY 00 000 77/08/14 23.27
  663. SA6 A3
  664. SA6 A2
  665. AX6 SYNBITS CHECK THAT SYN NUMBER NOT TOO MANY BITS
  666. NZ X6,VERRTS
  667. *
  668. VCK SA2 PHRASE CANNOT BE CONSTRUCTING A PHRASE HERE
  669. NZ X2,VERRORS
  670. *
  671. ZR X1,VDONE SEE IF END OF LINE
  672. *
  673. SX2 X1-COPPER
  674. NG X2,VLOOP ANYTHING LESS IS MOST LIKELY TO CONTINUE
  675. *
  676. SA2 WDTYPE GET WORD TYPE
  677. NZ X2,VIMP SEPARATE EXTRA WORDS FROM KEYWORDS
  678. *
  679. * DOING EXTRA WORDS <...>
  680. SX3 X1-COPGTH CHECK FOR END OF EXTRA WORDS
  681. NZ X3,VERRORS NOTHING ELSE IS ALLOWED
  682. SA3 CONCEPT SET WORD TYPE BACK TOCURRENT KEYWORD NUMBER
  683. BX6 X3
  684. SA6 A2
  685. EQ VLOOP
  686. VIMP SA3 CONCEPT SEE IF PROCESSING SYNONYMS
  687. NG X3,VSYNS NEG IS (...) CASE
  688. SX4 X1-COPLPRN SEE IF STARTING SYNONYMOUS KEYWORDS
  689. NZ X4,VIMP2
  690. BX6 X3 SET TO SYNONYMOUS KEYWORDS (...) CASE
  691. SA6 A2 SET WORD TYPE
  692. BX6 -X6 SET CONCEPT -NEG- TO SIGNIFY SYN-KEYWORDS
  693. SA6 A3
  694. EQ VLOOP
  695. *
  696. VIMP2 SX4 X1-COPLTH SEE IF EXTRA WORDS &lt;...> CASE
  697. NZ X4,VERRORS ALL ELSE AN ERROR
  698. MX6 0
  699. SA6 A2 SET WORD TYPE TO EXTRA WORDS CASE
  700. EQ VLOOP
  701. *
  702. VSYNS SX4 X1-COPRPRN SEE IF FINISHED WITH SYN. KEYWORDS
  703. NZ X4,VERRORS ALL ELSE AN ERROR
  704. BX3 -X3 SET -CONCEPT- BACK TO SINGLE KEYWORD
  705. SX6 X3+1 INCREMENT KEYWORD
  706. SA6 A2
  707. SA6 A3
  708. AX6 SYNBITS CHECK THAT SYN NUMBER NOT TOO MANY BITS
  709. ZR X6,VLOOP
  710. EQ VERRTS
  711. *
  712. VDONE SA1 NEXTCOM SEE IF NEXT LINE A CONTINUATION
  713. SA2 COMCONT LOAD BLANK
  714. BX1 X1-X2
  715. NZ X1,VDONE1
  716. RJ GETLINE GET THE CONTINUATION INPUT LINE
  717. SA1 PRETAG SET TO START OF INPUT STRING
  718. EQ VLOOP
  719. *
  720. VDONE1 SA2 WDTYPE MAKE SURE NOT IN &lt;..> OR (..)
  721. ZR X2,VERRSF CANNOT BE IN EXTRA WORDS
  722. SA2 CONCEPT
  723. NG X2,VERRSF CANNOT BE IN SYN. KEYWORDS
  724. SA2 VOCLTH GET LENGTH OF VOCABULARY
  725. ZR X2,VERRSF
  726. * /--- BLOCK VOCABULARY 00 000 77/08/14 23.37
  727. *
  728. SA3 VOCTYPE SET VOCABULARY TYPE
  729. LX3 30
  730. BX6 X2+X3 TYPE AND COUNT
  731. SA3 PHNUM GET NUMBER OF PHRASES
  732. IX2 X2+X3 MUST ADD PHRASE COUNT TO VOCAB COUNT
  733. SX2 X2+1 ADD IN FIRST WORD OF BUFFER
  734. *
  735. *
  736. SA6 VCTABLH STORE AWAY PACKED UP WORD OF COMPLETED BUFF
  737. SA0 A6
  738. SA1 VOCEC
  739. BX0 X1
  740. + WE 9 PUT OUT HEADER AND VOCABULARY BY VOWEL TABL
  741. RJ ECSPRTY
  742. *
  743. SX2 X2+8 ADD VOWEL TABLE LENGTH FOR PROPER UNIT LTH
  744. *
  745. SA1 CONDPNT GET CURRENT READ-IN ECS POINTER
  746. *
  747. SA3 XSIMP SEE IF SPECIAL -SYSLIB- VOCABULARY
  748. IX3 X0-X3
  749. NZ X3,VDONE2
  750. MX2 0 MAKE 0 LENGTH SO -SYSLIB- NOT USED UP
  751. EQ VDONE3
  752. *
  753. *
  754. VDONE2 SA3 VOCEND GET LAST WORD USED
  755. SX7 1 ADD 1
  756. IX7 X3+X7
  757. SA7 A1 STORE AWAY NEXT USABLE PLACE OF CONDENSE BF
  758. *
  759. VDONE3 SA3 CONBUFF ADDRESS OF CONDENSE BUFFER
  760. IX6 X1-X3 BIAS TO UNIT
  761. LX6 ULOC2+ULOC3+ULOC4
  762. BX6 X6+X2 INSERT IN TOTAL LENGTH
  763. LX6 60-ULOC1-ULOC2-ULOC3-ULOC4
  764. SA1 JJVOCU GET LOCATION OF LIST IN ULOC TABLE
  765. SA6 X1+ULOC SET ENTRY INTO ULOC TABLE
  766. EQ NXTLINE
  767. *
  768. VAGAIN NZ X1,VERRORS MAKE SURE NOTHING ELSE IN THIS LINE
  769. SA1 NEXTCOM MAKE SURE NO OTHER LINES
  770. SA2 COMCONT
  771. BX1 X1-X2
  772. ZR X1,VERRORS
  773. SA6 JJVOCU SET TO THE MENTIONED VOCABULARY
  774. EQ NXTLINE ON TO NEXT COMMAND
  775. *
  776. VERRORS MX6 0 SET VOCUNIT TO ZERO TO KILL ANY *CONCEPT*S
  777. SA6 JJVOCU
  778. EQ ERRORC
  779. *
  780. VERRSF SB1 64 ERRORS IN FINAL CHECK
  781. EQ VERRV
  782. *
  783. VERRNE SB1 65 = NOT ALLOWED IN VOCAB (USE VOCABS)
  784. EQ VERRV
  785. *
  786. VERRUSR SB1 60 USER INFO NUMVEER OUT OF RANGE
  787. EQ VERRV
  788. *
  789. VERREP SB1 104 ENDINGS OPTION CANNOT BE USED IN PHRASES
  790. EQ VERRV
  791. *
  792. VERRTP SB1 114 TOO MANY PHRASES
  793. EQ VERRV
  794. *
  795. VERRTS SB1 115 TOO MANY BASE SYNONYMS
  796. EQ VERRV
  797. *
  798. VERRTB SB1 116 BINARY BECOMES TOO LONG
  799. EQ VERRV
  800. *
  801. *
  802. VERRV MX6 0 KILL VOCABS
  803. SA6 JJVOCU
  804. EQ =XERR NO RETURN
  805. * /--- BLOCK VERRSHOW 00 000 77/01/17 22.44
  806. TITLE SHOW VOCABULARY ERRORS
  807. *
  808. VERRSHW SA1 CFIRST GET ADDRESS OF FIRST CHARACTER
  809. * (MIGHT NOT BE START OF ACTUAL WORD..SP)
  810. SA2 SAVITAX GET CURRENT A1
  811. SX6 X2
  812. IX6 X6-X1 GET LENGTH OF BADNESS
  813. SX2 X6-21
  814. NG X2,VERR3 SHOW ONLY FIRST 20 CHARACTERS
  815. SX6 20
  816. VERR3 SA6 NCHAR
  817. *
  818. SB1 1
  819. SB3 10
  820. SB2 0 INDEX INTO SHOWOUT
  821. SB4 X6-1
  822. MX7 0
  823. *
  824. VERRL LX7 6
  825. SA2 X1 GET NEXT CHARACTER
  826. BX7 X2+X7 PACK UP
  827. SX1 X1+B1
  828. SB3 B3-B1
  829. NZ B3,VERRL
  830. *
  831. SA7 SHOWOUT+B2
  832. SB2 B2+B1
  833. MX7 0
  834. SB3 10
  835. SB4 B4-B3
  836. PL B4,VERRL
  837. *
  838. SB1 906 **DUPLICATE WORD**
  839. SB2 B0
  840. SX1 B0
  841. SA2 NCHAR COUNT WILL BE MERGED WITH UNIT
  842. SB3 SHOWOUT BUFFER ADDRESS
  843. SB4 2
  844. RJ =XRJERRB
  845. SA2 SAVITAX NOW RESTORE A1 AND X1
  846. SA1 X2
  847. LX2 30
  848. SX1 X2
  849. SA3 ENDTYPE SEE IF IN ENDINGS
  850. ZR X3,VCK
  851. EQ VENDNXT
  852. *
  853. * /--- BLOCK ENDINGS 00 000 77/01/24 01.14
  854. TITLE ENDINGS
  855. * PROCESS ENDINGS FOR WORDS WITHIN A VOCABULARY
  856. WLEN EQU 30 MAX CHARS IN WORD
  857. ELEN EQU 10 MAX CHARS IN ENDING
  858. EWORD BSS WLEN+ELEN+1 WORD W/ ENDING, / AND 00B
  859. ENDTYPE BSS 1 0=NOT IN ENDINGS, 1=/NUM, -1/CHARS
  860. ESAVE BSS 1 SAVE ADDRESS OF REAL CHARACTER STRING
  861. EWDEND BSS 1 ADDRESS OF END OF BASE WORD
  862. ENFONT BSS 1 NECESSARY TO SAVE FONT ALONG THE WAY
  863. *
  864. *
  865. VEND SA1 CFIRST GET START OF BASE WORD
  866. SA1 X1-1 BACK UP ONE
  867. SA2 EFSTART GET FONT AT START OF WORD AGAIN
  868. BX6 X2
  869. SA6 FONTFLG
  870. SB1 1
  871. SB4 EWORD+WLEN INITIALIZE TO MAXIMUM LENGTH BASE WORD
  872. SB5 EWORD
  873. *
  874. EWL SB3 A1 SAVE THIS CHARACTER POSITION
  875. RJ GETOP
  876. SX3 B2-COPDIV CONTINUE UNTIL THE DIVIDE SIGN
  877. ZR X3,EWLD4
  878. SX3 B2-COPEQ ALSO LOOK FOR USER OPTIONS (=)
  879. ZR X3,EWLD3
  880. EWL1 GE B5,B4,VERRORS MUST BE LESS THAN WLEN
  881. SB3 B3+B1 INCREMENT BY 1
  882. SA2 B3 GET CHARACTER
  883. BX6 X2
  884. SA6 B5
  885. SB5 B5+B1
  886. SX2 A1-B3
  887. ZR X2,EWL
  888. EQ EWL1
  889. *
  890. EWLD3 RJ GETOP GET TO ENDINGS SIGN
  891. SX3 B2-COPDIV
  892. NZ X3,EWLD3
  893. EWLD4 RJ GETOPN ALSO SEE IF TWO // IN ROW
  894. SX3 B3-COPDIV
  895. NZ X3,EWLDN
  896. RJ GETOP ADVANCE OVER THE SECOND /
  897. *
  898. EWLDN SX6 B5 SAVE ADDRESS OF END OF BASE WORD
  899. SA6 EWDEND
  900. EGET SB3 A1 SAVE THIS ADDRESS
  901. RJ GETOP GET OP CODE
  902. SX3 B2-COPNUM SEE IF /NUM CASE
  903. NZ X3,ELTTRS
  904. SX6 A1 SAVE THIS ADDRESS
  905. SA6 ESAVE
  906. SA6 WORDPT ALSO FOR ERROR POINTER
  907. SA3 FONTFLG MUST SAVE FONT HERE
  908. BX6 X3
  909. SA6 ENFONT
  910. AX2 45 GET NUMBER
  911. SX2 X2-1R0 REDUCE FROM DISPLAY CODE
  912. LX2 3 MULTIPLY BY 8
  913. SA3 XBEND GET ADDRESS OF ECS ENDINGS BUFFER
  914. IX0 X2+X3
  915. MX3 0 INITIALIZE TO ZERO ENDING NUMBER
  916. SA0 ENDINGS SET UP CM ADDRESS
  917. + RE ENDTOT
  918. RJ ECSPRTY
  919. *
  920. SA2 ENDINGS CHECK FOR USE OF ENDINGS BEFORE
  921. ZR X2,VERRORS THAT ENDINGS DECLARED
  922. *
  923. * /--- BLOCK ENDINGS 00 000 77/01/24 01.14
  924. *
  925. ENDNUM SX6 X3+B1 INCREMENT ENDING NUMBER
  926. SA6 ENDTYPE STORE FOR NEXT TIME
  927. SA1 ENDINGS+X3 GET ENDING
  928. ZR X1,VENDNT1 SEE IF DONE WITH THIS GROUP OF ENDINGS
  929. SA2 EWDEND GET ADDRESS OF END OF BASE WORD
  930. SB2 X2
  931. MX0 54
  932. ELUP LX1 6
  933. BX6 -X0*X1
  934. SA6 B2 ADD ON THIS CHARACTER
  935. BX1 X0*X1 CLEAR OUT CHARACTER
  936. SB2 B2+B1 INCREMENT
  937. NZ X1,ELUP SEE IF ANY MORE
  938. EAGN MX6 0 ENTRY HERE FROM ELTTRS BELOW
  939. SA6 B2 PUT IN TRAILING ZERO
  940. SA1 EWORD-1 SET UP INPUT CHARACTER ADDRESS
  941. SA2 EFSTART GET ORIGINAL FONT AT START OF BASE WORD
  942. BX6 X2
  943. SA6 FONTFLG AND RESET TO THIS FONT SINCE WORD GOING
  944. EQ VLOOP THROUGH AGAIN
  945. *
  946. *
  947. ELTTRS ZR B2,VERRORS MUST BE SOMETHING THERE
  948. SX3 B2-COPCR LETTERS/NUMBERS/SUP/SUB/BKSP
  949. PL X3,VERRORS ALL ELSE AN ERROR
  950. ELTTRS1 SB4 A1
  951. RJ GETOP
  952. ZR B2,ELTTRS3 SEE IF END OF LINE
  953. SX3 B2-COPCR LOOP IF LETTERS/NUMBERS/SUP/SUB/BKSP
  954. NG X3,ELTTRS1
  955. SX3 B2-COPEQ SEE IF USER OPTIONS
  956. NZ X3,ELTTRS3
  957. ELTTRS2 SB4 A1
  958. RJ GETOP NOW RUN THRU ANY NUMBERS
  959. SX3 B2-COPNUM
  960. ZR X3,ELTTRS2
  961. ELTTRS3 SX6 B4 SAVE LAST ADDRESS
  962. SA6 ESAVE
  963. SA6 WORDPT ALSO FOR ERROR POINTER
  964. SA3 FONTFLG MUST SAVE FONT HERE
  965. BX6 X3
  966. SA6 ENFONT
  967. *
  968. SA2 EWDEND GET ADDRESS OF END OF BASE WORD
  969. SB2 X2
  970. ELTMOVE SB3 B3+B1 INCREMENT
  971. SA1 B3 GET NEXT CHARACTER
  972. BX6 X1
  973. SA6 B2
  974. SB2 B2+B1 INCREMENT
  975. LT B3,B4,ELTMOVE
  976. SX6 -1
  977. SA6 ENDTYPE SET ENDING TYPE TO LETTERS
  978. EQ EAGN
  979. *
  980. *
  981. VENDNXT SB1 1 B1 USED LOTS, SA3 ENDTYPE ALREADY DONE
  982. PL X3,ENDNUM BRANCH FOR /NUM CASE
  983. VENDNT1 SA1 ESAVE RESTORE LAST REAL CHARACTER ADDRESS
  984. SA1 X1
  985. SA2 ENFONT MUST RESTORE FONT SAVED ALONG THE WAY HERE
  986. BX6 X2
  987. SA6 FONTFLG
  988. MX6 0
  989. SA6 ENDTYPE ALSO CLEAR ENDTYPE FOR POSSIBLE EXIT
  990. RJ GETOP GET NEXT OPERATION
  991. SX3 B2-COPDIV SEE IF ENDINGS CONTINUES
  992. ZR X3,EGET
  993. SX1 B2 PUT LAST OP CODE INTO X1
  994. EQ VADDED1 ELSE OUT OF ENDINGS
  995. ***
  996. * /--- BLOCK ENDINGS-IN 00 000 76/04/08 14.34
  997. TITLE ENDGSIN READIN FOR ENDINGS COMMAND
  998. ENDTOT EQU 8 ALLOW EIGHT ENDINGS OF A PARTICULAR KIND
  999. *
  1000. END02 SA1 PRETAG ADDRESS OF INPUT STRING
  1001. EON RJ GETOP GET THE ENDING NUMBER
  1002. SX0 B2-COPNUM
  1003. ZR X0,EWD1
  1004. SX0 B2-COPSP SKIP LEADING SPACES
  1005. ZR X0,EON
  1006. EQ ENDGERR
  1007. *
  1008. EWD1 AX2 45 GET INTEGER VALUE
  1009. SX2 X2-1R0
  1010. LX2 3 MULTIPLY BY 8
  1011. SA3 XBEND GET ECS ADDRESS OF ENDINGS BUFFER
  1012. IX0 X2+X3 NOW HAVE ECS ADDRESS OF THIS ENDINGS BUFFER
  1013. MX5 0 COUNT OF ENDINGS IN THIS RUN
  1014. SB4 B0 NO COMMA FOUND YET
  1015. *
  1016. ETOP1 SB3 A1 SAVE THIS ADDRESS
  1017. MX6 0 CLEAR ENDING-A-BUILDING
  1018. RJ GETOP MUST FIND COMMA AND CLEAR OFF SPACES
  1019. ETOP2 SX3 B2-COPSP
  1020. ZR X3,ETOP1
  1021. SX3 B2-COPCOMA
  1022. NZ X3,ELOOP
  1023. SB4 1 FLAG THAT COMMA FOUND
  1024. EQ ETOP1
  1025. *
  1026. ELOOP ZR B4,EDONE MUST HAVE SEEN A COMMA
  1027. SB1 60 INITIALIZE SHIFT COUNT
  1028. ZR B2,ENDGERR MUST NOT BE AT END OF LINE
  1029. SX3 B2-COPCR ALLOW LETTERS/NUMBERS
  1030. PL X3,ENDGERR ERROR IF NOT A LETTER
  1031. *
  1032. EMAKE SB1 B1-6 DECREMENT SHIFT COUNT
  1033. NG B1,ENDGERR
  1034. SB3 B3+1
  1035. SA2 B3 GET CHARACTER
  1036. LX2 B1,X2 SHIFT INTO PROPER PLACE
  1037. BX6 X2+X6 ADD INTO REST OF CHARACTERS
  1038. SX2 A1-B3
  1039. NZ X2,EMAKE LOOP FOR CHARACTERS OF MORE THAN 6-BITS
  1040. RJ GETOP GET NEXT OPERATION
  1041. ZR B2,ESTO
  1042. SX3 B2-COPCR ALLOW LETTERS/NUMBERS
  1043. NG X3,EMAKE
  1044. *
  1045. ESTO SX2 X5-ENDTOT SEE IF TOO MANY ENDINGS
  1046. PL X2,ENDGERR
  1047. SA6 X5+ENDINGS STORE AWAY ENDINGS
  1048. SX5 X5+1 INCREMENT
  1049. SB4 B0 NO COMMA FOUND YET
  1050. MX6 0 CLEAR ENDING-A-BUILDING
  1051. EQ ETOP2
  1052. *
  1053. EDONE NZ B2,ENDGERR MUST BE AT END OF LINE
  1054. ZR X5,ENDGERR MUST BE SOME COUNT OF ENDINGS
  1055. *
  1056. SA0 ENDINGS CM ADDRESS OF ENDINGS
  1057. *
  1058. MX6 0
  1059. SA6 X5+ENDINGS STORE ZERO FOR END TEST DURING EXECUTION
  1060. + WE ENDTOT WRITE OUT TO ECS BUFFER
  1061. RJ ECSPRTY
  1062. EQ NXTLINE GO ON TO NEXT TUTOR COMMAND
  1063. *
  1064. ENDGERR SX6 A1 STORE CURRENT INPUT ADDRESS FOR ERRORC
  1065. SA6 WORDPT
  1066. EQ ERRORC
  1067. *
  1068. *
  1069. ENDINGS BSS 8 THE EIGHT ENDINGS
  1070. BSSZ 1 GUARANTEE ONE WORD OF ZERO
  1071. * /--- BLOCK CONCEPT 00 000 78/08/29 17.20
  1072. TITLE CONCEPT ANSWER READ-IN
  1073. *
  1074. * CONCEPT COMMAND READ-IN
  1075. *
  1076. * COMMAND...
  1077. * 12 BITS = NUMBER OF CONCEPTS
  1078. * 15 BITS = POINTER TO CONCEPTS RELATIVE TO START
  1079. * OF THIS UNITS ECS RESIDENT EXTRA STORAGE
  1080. * 9 BITS = VOCABULARY UNIT NUMBER
  1081. * 12 BITS = MAXIMUM CONCEPT COMMAND RUN-ON
  1082. * 12 BITS = COMMAND NUMBER
  1083. *
  1084. * DATA WORDS IN BINARY
  1085. * 1 BIT = ZERO FOR BINARY SEARCHES
  1086. * 37 BITS = HASHED CONCEPT
  1087. * 12 BITS = CONCEPT COMMAND RUN-ON COUNT
  1088. * 10 BITS = POINTER (REL TO B5) +1 TO USER INFO OPTIONS
  1089. *
  1090. *
  1091. * USER INFORMATION OPTION PACKAGES
  1092. * TOP BITS = GETVAR CODE TO STORE INFO
  1093. * 39-49 = BASE SYNONYM TO DO USER OP ON
  1094. * 50-59 = REL PTR +1 TO ADDITIONAL USER INFO OPTIONS
  1095. *
  1096. *
  1097. *
  1098. CON01 SA1 JJVOCU MUST BE PREVIOUS *VOCAB* COMMAND
  1099. ZR X1,ERRORC
  1100. *
  1101. SA2 COMMAND GET CURRENT COMMAND NAME
  1102. BX6 X2
  1103. SA6 CNAME STORE FOR LATER TEST OF REPEATED COMMANDS
  1104. *
  1105. SA1 X1+ULOC GET UNIT LOCATION INFO WORD
  1106. NG X1,ERRORC IN CASE VOCAB NOT IN RIGHT
  1107. AX1 60-ULOC1 GET RELATIVE START OF VOCABS IN BINARY
  1108. SA2 CONBUFF POINTER TO START OF CONDENSE BUFFER
  1109. IX0 X1+X2 GET ABSOLUTE ADDRESS
  1110. SA0 VCTABLH GET HEADER AND VOWEL TABLE
  1111. + RE 9
  1112. RJ ECSPRTY
  1113. BX6 X0
  1114. SA6 VOCEC KEEP BUFFER ADDRESS
  1115. SA1 A0
  1116. SX6 X1+8 COUNT OF WORDS PLUS VOWEL TABLE BIAS
  1117. SA6 VOCLTH
  1118. AX1 30
  1119. SX6 X1
  1120. SA6 VOCTYPE SAVE TYPE OF VOCABULARY
  1121. *
  1122. MX7 0
  1123. SA7 CONBIAS CLEAR RUN-ON CONCEPT COUNTER
  1124. *
  1125. SA1 ECSRESB GET ADDRESS OF ECS ARG BUFFER
  1126. SX2 ECSRESL AND LENGTH
  1127. IX7 X1+X2
  1128. SA7 CBUFEND GET END OF BUFFER PLUS ONE
  1129. SA2 ECSARGS GET CURRENT LENGTH OF ECS ARGS
  1130. IX3 X1+X2 GET CURRENT PLACE IN BUFFER
  1131. SX7 1
  1132. IX7 X3-X7 START POINTERS BACK ONE
  1133. SA7 COCEC SO, THIS IS THE BUFFER FOR CONCEPTS
  1134. SA7 COCEND LAST WORD USED
  1135. *
  1136. *
  1137. CONCPTK SA1 PRETAG SET TO START OF CHARACTER STRING
  1138. * B1 CANNOT BE USED UNTIL INPUT EXHAUSTED
  1139. SB5 B0 INITIALIZE COUNT OF WORDS IN CONCEPT
  1140. *
  1141. * /--- BLOCK CONCEPT 00 000 77/03/03 02.46
  1142. AVLOOP RJ CONTENT GET NEXT WORD CONTENTED
  1143. *
  1144. ZR X7,AVCK IF NOTHING THERE SEE WHAT CAUSED STOP
  1145. SA3 VOCEC GET VOCABS BUFFER
  1146. SA0 WORK USED BY MANY ECS READS LATER
  1147. BX5 X6 GET COPY OF CONTENT WORD
  1148. AX5 56 GET NUMBER OF VOWELS IN THIS WORD
  1149. SA5 VCTABLE+X5 GET PROPER VOWEL TABLE ENTRY
  1150. SX2 X5 GET RELATIVE START OF WORDS OF THIS VOW LTH
  1151. IX3 X3+X2 MAKE ABSOLUTE THE START OF SEARCH
  1152. AX5 30 GET NUMBER OF WORDS OF THIS VOWEL LENGTH
  1153. IX5 X3+X5 GET END
  1154. SX2 1
  1155. IX5 X2+X5 ADD ONE MORE
  1156. SA4 VOCTYPE GET TYPE OF VOCABULARY
  1157. NZ X4,CONF2
  1158. *
  1159. BX6 X6-X7 CONSTRUCT ONE WORD CONTENT WORD
  1160. MX7 60-SYNBITS
  1161. BX6 X7*X6
  1162. *
  1163. CONFIN1 IX0 X5-X3 DO VOCAB BINARY CHOP
  1164. AX0 1
  1165. ZR X0,CERRWD
  1166. IX0 X0+X3 MAKE ABSOLUTE
  1167. + RE 1
  1168. RJ ECSPRTY
  1169. SA4 A0 BRING UP WORD
  1170. BX2 X4*X7
  1171. IX2 X6-X2 SEE IF WORD LOOKING FOR
  1172. ZR X2,CWR1
  1173. PL X2,CPLUS1
  1174. BX5 X0
  1175. EQ CONFIN1
  1176. CPLUS1 BX3 X0
  1177. EQ CONFIN1
  1178. *
  1179. CONF2 IX3 X3-X2 BACK UP THE BEGINNING
  1180. CONFIN2 IX0 X5-X3 DO VOCABS BINARY CHOP
  1181. AX0 2 THUS GET RID OF ONES BIT
  1182. ZR X0,CERRWD
  1183. LX0 1
  1184. IX0 X0+X3 MAKE ABSOLUTE
  1185. + RE 2 GET TWO WORD VOCABS ENTRY
  1186. RJ ECSPRTY
  1187. SA2 A0 GET FIRST WORD
  1188. IX2 X6-X2
  1189. NZ X2,CONON SEE IF FIRST WORDS MATCH
  1190. SA4 A0+1 BRING UP SECOND WORD
  1191. MX2 HASHBTS
  1192. BX2 X2*X4 JUST LOOK AT HASH BITS
  1193. IX2 X7-X2 SEE IF THEY MATCH
  1194. ZR X2,CWRD
  1195. CONON PL X2,CPLUS2
  1196. BX5 X0
  1197. EQ CONFIN2
  1198. CPLUS2 BX3 X0
  1199. EQ CONFIN2
  1200. *
  1201. CERRWD SB1 62 ERROR, WORD NOT IN VOCABULARY
  1202. RJ =XRJERR
  1203. EQ CONSYN
  1204. *
  1205. *
  1206. CWR1 BX4 -X7*X4 USE ONLY BASE SYNONYM FOR -VOCAB- CASE
  1207. CWRD SX3 B5-CCLTH SEE IF OVERFLOW OF BUFFERS
  1208. PL X3,LNGUNIT
  1209. BX7 X4
  1210. SA7 CHBUF+B5 STORE AWAY HASH/INFO WORD
  1211. SA6 CCBUF+B5 STORE AWAY CONTENT FOR LATER PHRASE
  1212. SB5 B5+1
  1213. *
  1214. * /--- BLOCK CONCEPT 00 000 75/12/11 12.00
  1215. AVCK ZR X1,AVCK1 SEE IF ALL DONE
  1216. SX2 X1-COPCOMA
  1217. NG X2,AVLOOP LOOP UNTIL FIND ALL WORDS
  1218. NZ X2,ERRORC ALL ELSE AN ERROR
  1219. SA3 VOCTYPE ONLY 2 WORD VOCAB CASE CAN HAVE USER OPS
  1220. ZR X3,ERRORC
  1221. *
  1222. AVCK1 SX7 A1 SAVE CHAR ADDRESS
  1223. SA7 WORDPT
  1224. SX7 X1 SAVE LAST OPERATION
  1225. SA7 SAVIT
  1226. *
  1227. MX6 0 PRE-SET X6=0 FOR POSSIBLE USE AT CNDPK3
  1228. ZR B5,CNDPK3 CONCEPT BLANK (X6 SHOULD BE ZERO)
  1229. SB2 B5
  1230. SB1 B0
  1231. SX6 B5 SAVE NUMBER OF WORDS IN CONCEPT
  1232. SA6 CONLTH
  1233. *
  1234. SA3 VOCTYPE GET TYPE OF VOCABULARY
  1235. ZR X3,CORDER SKIP LOOKING AT PHRASES IF -VOCAB-
  1236. *
  1237. * MUST TANGLE WITH PHRASES HERE
  1238. *
  1239. CPLOOP SA1 CHBUF+B1 BRING UP A WORD
  1240. BX2 X1
  1241. LX2 HASHBTS LOOK IF A START OF A PHRASE
  1242. PL X2,CPLOOPZ
  1243. *
  1244. MX7 HASHBTS START OF A POSSIBLE PHRASE
  1245. SB5 B2 GET CURRENT END OF LIST
  1246. CPLOOP1 SA5 CCBUF+B1 GET CONTENT BITS
  1247. BX4 X1*X7 GET HASH BITS
  1248. BX5 X4-X5 PUT TOGETHER
  1249. SB3 B1
  1250. CPLOOPA SB3 B3+1
  1251. GE B3,B5,CPLOOPZ OUT IF DO NOT FIND AN END OF PHRASE
  1252. SA2 CHBUF+B3 BRING UP NEXT WORDS INFO BITS
  1253. BX3 X2
  1254. LX3 HASHBTS+1 RUN THRU MIDDLE OF PHRASE WORDS
  1255. PL X3,CPLOOPB SEE IF NO LONGER MIDDLE PHRASE
  1256. SB4 B3+1
  1257. GE B4,B5,CPLOOPB SEE IF THIS IS LAST WORD
  1258. SA4 CCBUF+B3 BRING UP THIS WORD-S CONTENT BITS
  1259. LX5 5 BUILD A PHRASE WORD
  1260. BX5 X5-X4
  1261. BX4 X2*X7 GET ONLY HASH BITS
  1262. BX5 X5-X4
  1263. EQ CPLOOPA
  1264. CPLOOPB LX3 1 NOW SEE IF FIND END OF PHRASE
  1265. PL X3,CPLOOPM IF NOT END, TRY SOMETHING ELSE
  1266. BX4 X5 NOW MAKE PHRASE WORD
  1267. LX4 PHBITS+SYNBITS+URIBITS
  1268. BX5 X4-X5
  1269. AX5 PHBITS+SYNBITS+URIBITS GET JUST HASH STUFF
  1270. AX2 60-HASHBTS-3-PHBITS GET LINK TO PHRASE WORD
  1271. CPLOOPC MX3 60-PHBITS
  1272. BX2 -X3*X2 GETLINK
  1273. ZR X2,CPLOOPM RUN OUT OF LINKS
  1274. SA3 VOCEC GET PHRASE WORD
  1275. IX0 X2+X3
  1276. SA3 VOCLTH
  1277. IX0 X0+X3
  1278. * /--- BLOCK CONCEPT 00 000 78/02/28 23.51
  1279. + RE 1 READ IN PHRASE WORD FROM VOCABS BUFFER
  1280. RJ ECSPRTY
  1281. SA2 A0 GET PHRASE WORD
  1282. BX4 X2
  1283. AX4 PHBITS+SYNBITS+URIBITS GET JUST HASH BITS
  1284. BX4 X4-X5 SEE IF THIS IS THE PHRASE
  1285. ZR X4,CPLOOPD GOT IT
  1286. AX2 SYNBITS+URIBITS ELSE, TRY FOR A CHAIN LINK
  1287. EQ CPLOOPC
  1288. *
  1289. CPLOOPM SB5 B5-1 SO TRY FOR A SHORTER LENGTH PHRASE
  1290. EQ CPLOOP1
  1291. *
  1292. CPLOOPD SB1 B1+1 NOW SET EXTRA PHRASE WORDS TO EXTRA WORDS
  1293. MX6 0
  1294. SA6 CHBUF+B1
  1295. LT B1,B3,CPLOOPD
  1296. BX1 X2
  1297. *
  1298. CPLOOPZ MX3 60-SYNBITS
  1299. BX6 -X3*X1 NOW GET BASE SYNONYM BITS
  1300. SA6 A1 JUST BASE SYNONYM BITS
  1301. *
  1302. SX6 X6-1 MAKE SURE THAT WORD WAS DEFINED AS SOMETHIN
  1303. NZ X6,CPLZ ERROR IF ONLY A PART OF A PHRASE
  1304. *
  1305. SB1 63
  1306. RJ =XRJERR
  1307. EQ CONSYN
  1308. *
  1309. CPLZ SB1 B1+1
  1310. LT B1,B2,CPLOOP
  1311. *
  1312. *
  1313. CORDER SA3 TSPECS SEE IF ORDER IS IMPORTANT
  1314. LX3 NOORDER
  1315. PL X3,CND NORMAL CASE IS THAT ORDER IS IMPORTANT
  1316. SB1 B0
  1317. *
  1318. * ORDER IS NOT IMPORTANT...THUS, BY ORDERING THE
  1319. * WORD NUMBERS, ONE CAN ELIMINATE ANY ORDER.
  1320. *
  1321. CNBUB1 SA1 CHBUF+B1 DO SORT
  1322. SB3 B1
  1323. CNBUB2 SB3 B3+1
  1324. GE B3,B2,CNBUB3
  1325. SA2 CHBUF+B3
  1326. IX3 X1-X2
  1327. NG X3,CNBUB2
  1328. BX6 X1 MUST CHANGE THE ENTRIES
  1329. BX7 X2
  1330. SA6 A2
  1331. SA7 A1
  1332. BX1 X2
  1333. *
  1334. EQ CNBUB2
  1335. CNBUB3 SB1 B1+1
  1336. LT B1,B2,CNBUB1
  1337. *
  1338. * NOW MUST CONSTRUCT THE CONCEPT WORD
  1339. CND MX6 0
  1340. SB1 B0
  1341. CNDPK1 SA1 CHBUF+B1 BRING UP THE WORD NUMBER
  1342. ZR X1,CNDPK2 SKIP EXTRA WORDS
  1343. LX6 SYNBITS SHIFT WHATS THERE UP A BIT
  1344. BX6 X6-X1 ADD IN THIS NUMBER
  1345. CNDPK2 SB1 B1+1
  1346. LT B1,B2,CNDPK1 LOOP THRU ALL NUMBERS
  1347. *
  1348. ZR X6,ERRORC ERROR IF NOTHING THERE
  1349. * /--- BLOCK CONCEPT 00 000 78/08/29 17.18
  1350. *
  1351. LX6 12+10+1 MOVE UP OUT OF WAY OF OTHER FIELDS
  1352. *
  1353. MX1 60-12-10-1 CLEAR OUT BITS NEEDED FOR OTHER FIELDS THAT
  1354. BX2 -X1*X6 MAY HAVE BEEN SET BY LONG CONCEPTS
  1355. BX6 X1*X6
  1356. LX2 36
  1357. BX6 X6-X2 EXCULSIVE-OR IN...THUS, BOTTOM CLEAR
  1358. LX6 59 MAKE SURE THE TOP BIT IS ZERO
  1359. * FOR BINARY SEARCHES
  1360. CNDPK3 SA2 CONBIAS GET RUN-ON COUNT OF CONCEPTS
  1361. MX1 60-12-10
  1362. BX3 X1*X2
  1363. NZ X3,ERRORC TEST FOR FIELD TOO BIG
  1364. LX2 10 MOVE INTO POSITION
  1365. BX6 X2+X6 ADD THIS TO DATA WORD
  1366. *
  1367. SA0 WORK BE SURE SET TO WORK BUFFER
  1368. SA3 COCEC GET START OF ECS BUFFER
  1369. SA5 COCEND GET END OF BUFFER
  1370. SX2 1
  1371. IX5 X5+X2 ADD ONE TO END
  1372. MX4 60-12-10 MASK FOR HASH OF CONCEPT
  1373. BX7 X4*X6 CLEAR SEARCH WORD TO JUST HASH
  1374. *
  1375. * /--- BLOCK CONCEPT 00 000 77/03/03 02.47
  1376. IX0 X5-X3 GET WORD COUNT
  1377. *
  1378. CCLOOP1 AX0 1 BINARY SEARCH
  1379. ZR X0,CCDONE1
  1380. IX0 X0+X3 MAKE ABSOLUTE
  1381. + RE 1
  1382. RJ ECSPRTY
  1383. SA1 A0 BRING UP NEXT CONCEPT
  1384. BX2 X1*X4
  1385. IX2 X7-X2 SEE IF CONCEPT LOOKING FOR
  1386. ZR X2,CERRSHW
  1387. PL X2,CCPLUS1
  1388. BX5 X0 RESET BOTTOM
  1389. IX0 X5-X3 GET WORD COUNT
  1390. EQ CCLOOP1
  1391. CCPLUS1 BX3 X0 RESET TOP
  1392. IX0 X5-X3 GET WORD COUNT
  1393. EQ CCLOOP1
  1394. *
  1395. *
  1396. CERRSHW SB1 59 DUPLICATE CONCEPT ERROR
  1397. RJ =XRJERR
  1398. EQ CONSYN JUST MAKE NULL CONCEPT AND GO ON
  1399. *
  1400. *
  1401. CCDONE1 SA4 SAVIT GET LAST USER OPERATION
  1402. ZR X4,COWT1
  1403. SA3 INX GET EXTRA STORAGE LOCATION
  1404. MX7 0
  1405. SA7 X3+INFO CLEAR OUT USER OP WORD (ZERO IS NO OP)
  1406. SX3 X3+1 HAVE TO ADD ONE SINCE BIAS COULD BE ZERO
  1407. BX6 X6+X3 ADD TO CONCEPT WORD
  1408. *
  1409. COWT1 SA6 A0 STORE AWAY CONCEPT
  1410. *
  1411. SX1 1
  1412. *
  1413. BX0 X5 LOCATION TO START INSERT IN CONDENSE BUFFER
  1414. *
  1415. SA5 COCEND LAST WORD USED IN BUFFER
  1416. IX6 X5+X1 INCREMENT BY 1 CONCEPT
  1417. SA6 A5
  1418. BX5 X6 AND INTO X5 FOR LATER USE IN MOVE ROUTINE
  1419. SA1 CBUFEND GET LAST WORD OF CONDENSE BUFFER
  1420. IX1 X6-X1
  1421. PL X1,LNGUNIT TEST FOR BINARY TOO LONG
  1422. *
  1423. SX2 CWKLTH-1
  1424. *
  1425. COCTOP1 SA0 WORK+1 START OF SCRATCH AREA
  1426. IX6 X5-X0 GET NUMBER OF WORDS TO MOVE DOWN
  1427. SB2 X6 FOR COCLST1
  1428. IX7 X2-X6
  1429. PL X7,COCLST1 SEE IF THIS LAST MOVE NEEDED
  1430. + RE CWKLTH-1 READ-IN ECS BUFFER
  1431. RJ ECSPRTY
  1432. SA0 WORK RESET TO INCLUDE EXTRA WORD
  1433. + WE CWKLTH-1 WRITE BACK OUT SHIFTED DOWN ONE
  1434. RJ ECSPRTY
  1435. SA1 A0+CWKLTH-1 GET LAST WORD READ-IN
  1436. BX6 X1
  1437. SA6 A0 AND POSITION IT FOR NEXT TIME WRITE-OUT
  1438. IX0 X0+X2 RE-SET CURRENT PLACE WORKING ON
  1439. EQ COCTOP1
  1440. *
  1441. COCLST1 RE B2 READ IN LAST PIECE
  1442. RJ ECSPRTY
  1443. SA0 WORK SET TO EXTRA WORD
  1444. SB2 B2+1 AND EXTRA COUNT
  1445. + WE B2
  1446. RJ ECSPRTY
  1447. *
  1448. * /--- BLOCK USER OPS 00 000 77/03/03 02.47
  1449. *
  1450. * THE FOLLOWING USER OPERATION OPTIONS DOES NOT HANDLE
  1451. * CHARACTER INPUT TOTALLY THROUGH THE TABLE-DRIVEN
  1452. * MACHINERY...CAN CAUSE A PROBLEM UNTIL -PUTCOMP-
  1453. * FIXED TO USE TABLES IN -CONTENT-
  1454. *
  1455. SA4 WORDPT SEE IF IN USER INFO OPTION
  1456. SA3 X4 GET LAST CHARACTER
  1457. SA4 SAVIT GET LAST USER OP
  1458. ZR X4,CONSYN SEE IF ANY USER OPERATIONS TO HANDLE
  1459. SX6 1R,
  1460. *
  1461. ATOCOM SA3 A3+1 CHANGE ALL _ TO COMMAS
  1462. ZR X3,UILOOP
  1463. SX2 X3-65B CHECK FOR ASSIGNMENT ARROW
  1464. NZ X2,ATOCOM LOOP THRU ALL REMAINING CHARS
  1465. SA6 A3 MAKE CHANGE
  1466. EQ ATOCOM
  1467. *
  1468. UILOOP SA3 INX SAVE AND INCREMENT EXTRA STORAGE LOC
  1469. BX6 X3
  1470. SA6 INFLOC
  1471. SX6 X3+1
  1472. SA6 A3
  1473. SA2 ICX DO OVERFLOW CHECKS
  1474. IX2 X6-X2
  1475. PL X2,LNGUNIT
  1476. *
  1477. SA4 WORDPT MAKE SURE HAVE CHARACTER ADDRESS
  1478. SX6 X4+1 INCREMENT OVER COMMA
  1479. SA6 WORDPT
  1480. *
  1481. *
  1482. CALL PUTCOMP DECODE VARIABLE
  1483. LX1 60-XCODEL PUT GETVAR CODE AT TOP
  1484. BX6 X1
  1485. SA6 CGETVAR STORE FOR LATER
  1486. SA2 LASTKEY
  1487. SX2 X2-1R, MAKE SURE LAST CHAR A COMMA
  1488. NZ X2,CERRPRB
  1489. *
  1490. SA1 WORDPT GET CHARACTER AFTER COMMA
  1491. SA1 X1-1
  1492. *
  1493. *
  1494. RJ CONTENT GET NEXT WORD CONTENTED
  1495. *
  1496. ZR X7,CERRPRB ERROR IF NOTHING THERE
  1497. SA3 VOCEC GET VOCABS BUFFER
  1498. SA0 WORK USED BY MANY ECS READS LATER
  1499. BX5 X6 GET COPY OF CONTENT WORD
  1500. AX5 56 GET NUMBER OF VOWELS IN THIS WORD
  1501. SA5 VCTABLE+X5 GET PROPER VOWEL TABLE ENTRY
  1502. SX2 X5 GET RELATIVE START OF WORDS OF THIS VOW LTH
  1503. IX3 X3+X2 MAKE ABSOLUTE THE START OF SEARCH
  1504. AX5 30 GET NUMBER OF WORDS OF THIS VOWEL LENGTH
  1505. IX5 X3+X5 GET END
  1506. SX2 1
  1507. IX5 X2+X5 ADD ONE MORE
  1508. * /--- BLOCK USER OPS 00 000 76/01/15 01.12
  1509. *
  1510. IX3 X3-X2 BACK UP THE BEGINNING
  1511. UONFIN2 IX0 X5-X3 DO VOCABS BINARY CHOP
  1512. AX0 2 THUS GET RID OF ONES BIT
  1513. ZR X0,CERRPRB NO FIND WORD IN VOCABULARY
  1514. LX0 1
  1515. IX0 X0+X3 MAKE ABSOLUTE
  1516. + RE 2 GET TWO WORD VOCABS ENTRY
  1517. RJ ECSPRTY
  1518. SA2 A0 GET FIRST WORD
  1519. IX2 X6-X2
  1520. NZ X2,UONON SEE IF FIRST WORDS MATCH
  1521. SA4 A0+1 BRING UP SECOND WORD
  1522. MX2 HASHBTS
  1523. BX2 X2*X4 JUST LOOK AT HASH BITS
  1524. IX2 X7-X2 SEE IF THEY MATCH
  1525. ZR X2,UWRD
  1526. UONON PL X2,UPLUS2
  1527. BX5 X0
  1528. EQ UONFIN2
  1529. UPLUS2 BX3 X0
  1530. EQ UONFIN2
  1531. *
  1532. CERRPRB SB1 61 PROBLEM IN ASSIGNING USER INFO
  1533. RJ =XRJERR
  1534. EQ CONSYN CONTINUE...NULL CONCEPT INVOLVED
  1535. *
  1536. *
  1537. * BE SURE WORD IS IN CONCEPT
  1538. UWRD SX7 A1 SAVE CURRENT CHARACTER ADDRESS
  1539. SA7 WORDPT
  1540. MX7 60-SYNBITS MASK FOR SYNONYM BITS
  1541. BX6 -X7*X4 BASE SYNONYM NUMBER LOOKING FOR
  1542. *
  1543. SX2 X6-1 ILLEGAL IF WORD ONLY OCCURS IN A PHRASE
  1544. ZR X2,CERRPRB
  1545. *
  1546. SB1 B0 NOW SEARCH THRU TO FIND WORD
  1547. SA2 CONLTH
  1548. SB2 X2 GET NUMBER OF WORDS TO SEARCH
  1549. *
  1550. CUFND SA2 CHBUF+B1 GET WORD
  1551. BX2 X2-X6 SEE IF THIS IS WHAT LOOKING FOR
  1552. ZR X2,CUFND5
  1553. SB1 B1+1
  1554. LT B1,B2,CUFND
  1555. EQ CERRPRB NO FIND ... ERROR
  1556. *
  1557. CUFND5 LX6 10 MOVE KEY BASE SYNONYM UP
  1558. *
  1559. SA2 CGETVAR GET GETVAR CODE
  1560. BX6 X6+X2 COMBINE
  1561. *
  1562. SA3 INFLOC GET REL LOCATION OF USER OP IN EXTRA STO
  1563. *
  1564. CUFND8 ZR X1,CONS1
  1565. SX2 X1-COPCOMA MAKE SURE ANOTHER COMMA
  1566. ZR X2,CUFND9 GO AHEAD IF COMMA
  1567. SX2 X1-COPSP ELSE SEE IF SPACES
  1568. NZ X2,CERRPRB ALL ELSE AN ERROR
  1569. RJ GETOP GET NEXT OPERATION SYMBOL
  1570. SX1 B2
  1571. SX7 A1
  1572. SA7 WORDPT
  1573. EQ CUFND8 AND RE-CHECK
  1574. *
  1575. CUFND9 SA1 INX GET CURRENT EXTRA STORAGE ADDRESS FOR NEXT
  1576. MX7 0
  1577. SA7 X1+INFO CLEAR NEXT USER OP WORD...ZERO IS NULL
  1578. SX1 X1+1 HAVE TO ADD ONE SINCE BIAS COULD BE ZERO
  1579. BX6 X1+X6 ADD TO LAST AS LINK
  1580. SA6 X3+INFO FINALLY STORE USER OPERATION INFO
  1581. EQ UILOOP
  1582. *
  1583. CONS1 SA6 X3+INFO STORE AWAY THE LAST USER OPERATION
  1584. *
  1585. *
  1586. * /--- BLOCK CONCEPT 00 000 77/03/29 21.03
  1587. *
  1588. *
  1589. CONSYN SA1 NEXTCOM NOW SEE IF MORE SYNONYMOUS CONCEPTS
  1590. SA2 COMCONT
  1591. BX2 X1-X2
  1592. NZ X2,CONRUN
  1593. RJ GETLINE GET NEXT LINE
  1594. EQ CONCPTK AND INTO PACK-UP LOOP AGAIN
  1595. *
  1596. CONRUN SA2 CNAME HOLDS EITHER CONCEPT OR MISCON (OR CHANGES)
  1597. BX2 X1-X2 SEE IF RUN OF SAME COMMAND
  1598. NZ X2,CONDN IF NOT, THEN ALL DONE
  1599. SA1 CONBIAS ELSE, KEEP COUNT OF RUN-ONS
  1600. SX6 X1+1
  1601. SA6 A1
  1602. RJ GETLINE GET NEXT LINE
  1603. EQ CONCPTK AND INTO PACK-UP LOOP AGAIN
  1604. *
  1605. *
  1606. CONDN SA2 ECSRESB GET ECS ARG BUFFER
  1607. SA1 ECSARGS GET AMOUNT USED
  1608. IX2 X1+X2 GET CURRENT PLACE IN BUFFER
  1609. SA3 COCEND GET END
  1610. IX6 X3-X2 NUMBER OF CONCEPTS FOUND -1
  1611. SX7 1
  1612. IX6 X6+X7
  1613. IX7 X1+X6
  1614. SA7 A1 UPDATE BINARY POINTER FOR OTHERS
  1615. *
  1616. LX6 15
  1617. BX6 X6+X1 COMBINE WITH STARTING RELATIVE ADDRESS
  1618. LX6 9
  1619. SA2 JJVOCU AND VOCABULARY UNIT NUMBER
  1620. BX6 X6+X2
  1621. LX6 12
  1622. SA2 CONBIAS AND MAXIMUM CONCEPT RUN-ON BIAS
  1623. BX6 X6+X2
  1624. LX6 12 AND MAKE SPACE FOR COMMAND CODE
  1625. EQ PUTCODE PUT COMMAND AWAY
  1626. *
  1627. CONBIAS BSS 1 CURRENT COUNT OF CONCEPT COMMAND IN RUN
  1628. CNAME BSS 1 IS STORED IN AT ENTRY WITH NAME
  1629. * OF CURRENT COMMAND CONDENSING...
  1630. * EITHER CONCEPT OR MISCON OR THEIR CHANGED
  1631. * COUNTERPARTS
  1632. *
  1633. CONLTH BSS 1 NUMBER OF WORDS IN CONCEPT
  1634. CCLTH EQU 20 ALLOW 20 WORDS IN CONCEPT
  1635. CCBUF BSS CCLTH CONTENT WORD
  1636. CHBUF BSS CCLTH HASH WORD
  1637. *
  1638. *
  1639. *
  1640. INFLOC BSS 1 USER OP WORD IN EXTRA STORAGE
  1641. CGETVAR BSS 1 SAVES GETVAR CODE DURING USER INFO OPTION
  1642. *
  1643. COCEC BSS 1 STARTING ADDRESS OF CONCEPTS IN ECS
  1644. COCEND BSS 1 ENDING ADDRESS OF CONCEPTS IN ECS
  1645. * /--- BLOCK SPECS 00 000 77/12/08 15.17
  1646. TITLE -SPECS-
  1647. *
  1648. *
  1649. * THIS COMMAND ALTERS ANSWER HANDLING
  1650. *
  1651. EXT SCANNER
  1652. *
  1653. SPE01 SB1 SPNAMES START OF TABLE OF LEGAL NAMES
  1654. SB2 SPEND END OF TABLE OF LEGAL NAMES
  1655. MX5 60 FULL WORD MASK
  1656. *
  1657. RJ SCANNER
  1658. NZ X0,ERRNAME
  1659. SA6 TSPECS SET TO THESE SPECS FLAGS FOR FOLLOWING
  1660. EQ PUTCODE
  1661. *
  1662. *
  1663. * THE ORDER OF THE FOLLOWING TABLE IS VERY IMPORTANT
  1664. *
  1665. * WHEN SOMETHING IS CHANGED IN THIS TABLE, A
  1666. * SIMILAR CHANGE MUST BE MADE IN -PCTEXT-
  1667. *
  1668. SPNAMES VFD 60/7LNOSPELL TURN OFF THE SPELLER
  1669. VFD 60/7LNOORDER TURN OFF ORDER CHECKER
  1670. VFD 60/7LNOCANON TURN OFF CANONICAL FORM
  1671. VFD 60/6LNODIFF TURN OFF THE NUMERICALLY CLOSE MARKER
  1672. VFD 60/7LOKSPELL SPELLINGS ARE OK
  1673. VFD 60/7LOKEXTRA EXTRA WORDS ARE ACCEPTABLE
  1674. VFD 60/8LALLWORDS TREAT ALL ENTRIES AS CHARS NOT NUMBERS
  1675. VFD 60/6LNOMARK DO NOT DO ANY MARKUP OF THE ANSWER
  1676. VFD 60/7LEXORDER ORDER THE KEYWORDS AND EXTRA WORDS
  1677. VFD 60/5LCANON PRODUCE CANONICAL FORM
  1678. VFD 60/9LBUMPSHIFT BUMP ALL SHIFT CODES
  1679. VFD 60/6LNOOKNO DO NOT OUTPUT -OK- OR -NO-
  1680. VFD 60/8LHOLDMARK SAVE MARKUP FOR LATER MARKUP COMMAND
  1681. VFD 60/5LNOOPS NO ARITHMETIC OPERATIONS LEGAL
  1682. VFD 60/6LNOVARS NO VARIABLE REFERENCES LEGAL
  1683. VFD 60/7LOKIDENT ALGEBRAIC IDENTITY OK
  1684. VFD 60/8LALPHXNUM WORD-NUMBER BOUNDRY ACTS AS PUNCTUATN
  1685. VFD 60/8LOKASSIGN OK TO ASSIGN A VALUE TO A STUDENT VAR
  1686. VFD 60/5LOKCAP OK TO HAVE FIRST LETTER CAPITALIZED
  1687. VFD 60/5LTOLER ALLOW NUMERICAL TOLERANCE OF 1%
  1688. *
  1689. SPEND BSS 1 HOLE FOR WORD CURRENTLY PROCESSING
  1690. *
  1691. *
  1692. * /--- BLOCK END 00 000 76/07/21 20.49
  1693. *
  1694. *
  1695. ENDOV
  1696. *
  1697. *
  1698. OVTABLE
  1699. *
  1700. *
  1701. END ANSIN$
plato/source/plaopl/ansin.txt ยท Last modified: 2023/08/05 18:54 by Site Administrator