User Tools

Site Tools


plato:source:plaopl:answ1

Table of Contents

ANSW1

Table Of Contents

  • [00008] -ANSW1-
  • [00041] ANSWER/WRONG COMMAND EXECUTION ROUTINE
  • [00988] ANSWERA/WRONGA COMMAND EXECUTION
  • [01262] -ANSWERA-/-WRONGA- ERRORS
  • [01305] AUNAM โ€“ FIND LIST IN UNIT TABLE
  • [01392] MATCH JUDGING ROUTINE
  • [01747] ANSWER MARKUP ROUTINES
  • [02011] OFFMARK,MARKUP
  • [02195] COMPARE

Source Code

ANSW1.txt
  1. ANSW1
  2. * /--- FILE TYPE = E
  3. * /--- BLOCK ANSW1 00 000 78/12/18 20.10
  4. IDENT PLAT16$
  5. LCC OVERLAY(PLATO,1,0)
  6. END
  7. IDENT ANSW1
  8. TITLE -ANSW1-
  9. *
  10. *
  11. CST
  12. *
  13. *
  14. ANSW1$ OVFILE
  15. *
  16. *
  17. EXT PROCESS IN FILE EXEC1
  18. EXT ECSPRTY IN FILE ECSPRT
  19. EXT WORDGET,GETJSYM IN FILE ANSWER
  20. EXT EQTOLER IN FILE GETVAR
  21. EXT NPUTVAR IN FILE GETVAR
  22. EXT WRONG=,WRONGC= IN FILE EXEC1
  23. EXT CKWORDX,ANSOUT IN FILE ANSWER
  24. EXT TUTWRT,SIMPLOT,FIRSTXY,WHRFOUT
  25. EXT OFFITR IN FILE TUTOUT
  26. EXT GETCODX,BOUNDS IN FILE EXEC1
  27. EXT CONTENT,CONTAB IN CONTEN
  28. EXT FONTFLG,CSSPERM IN FILE CONTEN
  29. EXT WRONGA= IN EXEC1
  30. EXT WORDS,GETOP,UNUM
  31. EXT CSLOAD,LOADFLG IN AUTLOAD
  32. *
  33. *
  34. HASHBTS EQU 27 TOP 27 BITS CAN BE CONSIDERED A HASH
  35. SYNBITS EQU 10 BITS NEEDED FOR BASE SYNONYM NUMBER
  36. PSTART EQU 27 LEFT SHIFT TO PHRASE START BIT
  37. SPINFOB EQU 15 SPELLING FITNESS BITS
  38. *
  39. *
  40. * /--- BLOCK ANS1 00 000 78/12/18 20.11
  41. TITLE ANSWER/WRONG COMMAND EXECUTION ROUTINE
  42. NANSOV OVRLAY
  43. *
  44. * -A5- NOT TOUCHED FOR ENTIRE ROUTINE
  45. *
  46. *
  47. RJ WORDGET GET STUDENT ANSWER INTO -CONTENT- WORDS
  48. *
  49. *
  50. AREDO AX5 12 GET RID OF COMMAND CODE
  51. *
  52. SX6 -1 SET TO START AT FIRST STUDENT WORD
  53. SA6 AREGB1
  54. SA6 ANYFIND NEG IF NO WORD EVER MATCHED
  55. *
  56. ZERO ABUFW,JJSENB ZERO OUT JUDGEMENT WORDS
  57. *
  58. MX6 48
  59. BX7 -X6*X5 GET KEYWORD COUNT IN THIS ANSWER
  60. SA7 AKEYWDS
  61. AX5 12
  62. BX1 -X6*X5 GET NUMBER OF AUTHOR WORDS
  63. SB3 X1 B3 HOLDS REMAINING AUTHOR WORDS TO LOOK AT
  64. AX5 12 GET RELATIVE START OF WORDS IN ECS
  65. MX6 42
  66. BX7 -X6*X5
  67. *
  68. SA2 ECSXSTO ABSOLUTE ADDRESS OF START OF ECS EXTRA STOR
  69. IX0 X2+X7 NOW HAVE ABSOLUTE STARTING ADDRESS OF WORDS
  70. *
  71. AX5 18 SEE IF SYNONYMOUS ANSWER FOLLOWING
  72. MX6 0
  73. ZR X5,ASTO
  74. IX6 X0+X1 THEN GET ABSOLUTE ECS ADDRESS OF SYN ANSWER
  75. ASTO SA6 ASFLAG
  76. *
  77. ZR B3,ABLANK SEE IF BLANK AUTHOR ANSWER
  78. *
  79. SA3 TWCOUNT SEE IF BLANK STUDENT ANSWER
  80. ZR X3,ABLANK0
  81. *
  82. SA0 AWORK SET TILL RUN OUT OF AUTHOR WORDS
  83. MX6 0
  84. SA6 ALIST INITIALIZE TO MAIN LIST
  85. SA6 ASPELL SET TO NO MISSPELLED KEYWORDS
  86. SA6 ATAKEN NO WORDS OUT OF CIRCULATION YET
  87. *
  88. *
  89. * B2 = LAST STUDENT WORD TO SEARCH (DOES WRAP AROUND SEARCH
  90. * OF STUDENT WORDS)
  91. * B3 = NUMBER OF REMAINING AUTHOR WORDS
  92. * A0 = POINTS TO -WORK- BUFFER
  93. * X0 = ADDRESS OF NEXT AUTHOR WORD
  94. *
  95. *
  96. * /--- BLOCK ALOOP 00 000 78/02/13 17.04
  97. ALOOP GT B3,B0,ALOOP1 SEE IF RUN OUT OF AUTHOR WORDS
  98. SA3 ALIST SEE IF IN A SUB LIST
  99. ZR X3,ADONE IF NOT, THEN ALL DONE
  100. SX6 1
  101. IX0 X3+X6 RE-ESTABLISH AND INCREMENT ECS POINTER
  102. SA4 ALISTCT GET BACK REMAINING LIST COUNT
  103. SB3 X4-1
  104. MX6 0
  105. SA6 A3 AND SET FLAG TO WORKING ON MAIN LIST
  106. EQ ALOOP
  107. *
  108. ALOOP1 RE 2 GET IN NEXT AUTHOR WORD
  109. RJ ECSPRTY
  110. *
  111. SA3 A0 GET AUTHOR WORD
  112. PL X3,AWORD SEPARATE MAIN LIST FROM SUB LIST
  113. *
  114. ALOOP2 BX6 X3 SAVE MAIN LIST INFO WORD
  115. SA6 AMAIN
  116. BX6 X0 SAVE ECS POINTER
  117. SA6 ALIST
  118. SX7 B3 SAVE REMAINING COUNT
  119. SA7 ALISTCT
  120. *
  121. LX3 1 NOW GET SUB-LIST
  122. AX3 31 GET UNIT NUMBER
  123. SA4 ECSULOC GET ECS ADDRESS OF -ULOC- TABLE
  124. IX0 X3+X4
  125. + RE 1 READ IT IN
  126. RJ ECSPRTY
  127. SA4 A0 GET ENTRY
  128. NG X4,PROCESS SOMETHING WRONG...JUST SKIP THIS COMMAND
  129. *
  130. BX0 X4
  131. AX0 60-ULOC1 TOP BITS ARE BIAS TO REL LOCATION IN BIN
  132. SA3 ECSLES GET ECS ADDRESS OF LESSON
  133. IX0 X0+X3 NOW HAVE ABSOLUTE ECS ADDRESS
  134. LX4 ULOC1+ULOC2+ULOC3+ULOC4 NOW GET THE LENGTH
  135. MX5 60-ULOC4
  136. BX7 -X5*X4
  137. SB3 X7
  138. EQ ALOOP NOW BACK TO LOOP
  139. *
  140. *
  141. *
  142. AWORD SB3 B3-2 DECREMENT NUMBER OF REMAINING AUTHOR WORDS
  143. SX6 2
  144. IX0 X0+X6 INCREMENT AUTHOR WORD ECS POINTER
  145. SA4 A0+1 BRING UP SECOND PART OF AUTHOR WORD
  146. *
  147. SA1 AREGB1 START SEARCHING AT THIS STUDENT WORD
  148. SA2 TWCOUNT AND TO END OF STUDENT WORDS
  149. SB1 X1 THIS DOES BETTER ORDERING JOB WHEN
  150. SB2 X2 AUTHOR ANSWER HAS DUPLICATE WORDS
  151. *
  152. *
  153. ASLOOP SB1 B1+1 INCREMENT STUDENT POINTER
  154. GE B1,B2,ASDONE SEE IF DONE WITH STUDENT WORDS
  155. *
  156. * /--- BLOCK AWORD 00 000 76/04/08 14.28
  157. SA1 ATAKEN SEE IF THIS WORD ALREADY OUT OF CIRCULATION
  158. LX1 X1,B1
  159. PL X1,ASL1
  160. SA1 TSPECS SEE IF SPECS EXORDER
  161. LX1 EXORDER
  162. PL X1,ASLOOP
  163. MX7 60-SYNBITS THEN MUST NOT ALLOW IGNORE WORDS
  164. BX2 X4 TO GO BEYOND THEIR KEYWORD FIELDS
  165. SA1 ALIST SEE IF IN LIST
  166. ZR X1,ASL0
  167. BX2 X1
  168. ASL0 BX1 -X7*X2 SEE IF KEYWORD OR IGNORE
  169. NZ X1,ASLOOP TRY FOR ANOTHER AUTHOR WORD
  170. EQ ALOOP DO NOT LET IGNORE (EXORDER) GO PAST KEYWORD
  171. *
  172. ASL1 SA1 JJSBUF+B1 GET FIRST PART OF STUDENT WORD
  173. SA2 JJHBUF+B1 GET SECOND PART
  174. RJ CKWORDX SEE IF NO MATCH, PERFECT MATCH, MISSPELLING
  175. NG X6,ASLOOP NO MATCH...ON TO NEXT WORD
  176. SA6 ANYFIND SOMETHING
  177. *
  178. SA1 TSPECS SEE IF SPECS EXORDER
  179. LX1 EXORDER
  180. PL X1,ASLOOP1
  181. MX7 60-SYNBITS THEN MUST NOT ALLOW IGNORE WORDS
  182. BX2 X4
  183. SA1 ALIST SEE IF IN LIST
  184. ZR X1,ASL11
  185. BX2 X1
  186. ASL11 BX1 -X7*X2 TO GET IN FRONT OF PRECEEDING KEYWORDS
  187. NZ X1,ASLOOP1
  188. SA1 AREGB1 SEE IF ANY PREVIOUS MATCHED KEYWORD
  189. NG X1,ASLOOP1
  190. SX2 B1
  191. IX2 X1-X2
  192. PL X2,ASLOOP
  193. *
  194. *
  195. ASLOOP1 BX7 X4 SEE IF WORD PART OF A PHRASE
  196. LX7 PSTART
  197. MX5 3
  198. BX5 X5*X7
  199. NZ X5,APHRASE
  200. *
  201. NZ X6,ASP SEE IF MISSPELLING
  202. *
  203. *
  204. BX6 X4 ---PERFECT MATCH---
  205. *
  206. SA1 ALIST SEE IF IN LIST
  207. ZR X1,AST
  208. SA2 AMAIN IN WHICH CASE, MUST GET AUTHOR INFO WORD
  209. BX6 X2
  210. *
  211. AST MX7 60-SYNBITS GET ONLY THE AUTHOR INFO BITS HERE
  212. BX6 -X7*X6
  213. MX7 1 SET TOP BIT OF PERFECT MATCH
  214. BX7 X6+X7
  215. SA7 ABUFW+B1 STORE AUTHOR WORD INFO
  216. *
  217. *
  218. *
  219. ARATTLE MX7 60-SYNBITS FOR PERFECT MATCH, SKIP ANY OTHER
  220. BX5 -X7*X6 KEYWORDS OF THIS COUNT
  221. ZR X5,ASLOOP BUT GO THRU ALL STUDENT WORDS IF IGNORE
  222. *
  223. * X5 AND X7 USED ALL THE WAY TO -AROLL1-
  224. *
  225. MX6 1 TAKE THIS WORD OUT OF CIRCULATION
  226. LX6 59
  227. AX6 X6,B1
  228. LX6 1
  229. SA1 ATAKEN
  230. BX6 X1+X6
  231. SA6 A1
  232. *
  233. CX6 X6 SEE IF ALL WORDS TAKEN BY KEYWORDS
  234. SA1 TWCOUNT
  235. BX6 X1-X6
  236. ZR X6,ADONE
  237. * /--- BLOCK AWORD 00 000 76/04/08 14.28
  238. *
  239. * /--- BLOCK AWORD 00 000 75/07/28 03.03
  240. SX6 B1 SAVE THIS LOCATION FOR START OF
  241. SA6 AREGB1 NEXT SEARCH ON STUDENT WORDS
  242. *
  243. SA1 ASPELL MUST CLEAR OUT ANY PREVIOUS MISSPELLED
  244. ZR X1,ARATT KEYWORD OF SAME GROUP OF SYNONYMS
  245. SX2 ABUFW+B1 SEE IF THIS SAME WORD
  246. BX2 X1-X2
  247. ZR X2,ARAT
  248. SA2 X1 GET PREVIOUS MISSPELLING
  249. BX2 -X7*X2 GET KEYWORD COUNT
  250. BX2 X2-X5 IS IT DIFFERENT FROM THIS TIME
  251. MX6 0
  252. NZ X2,ARAT IF SAME, MUST CLEAR OUT PREVIOUS
  253. SA6 A2 SO THAT WORD IS NOT TAKEN
  254.  
  255. ARAT MX6 0
  256. SA6 A1 KILL SPELL FLAG
  257. *
  258. ARATT SA1 TSPECS SEE IF SPECS EXORDER
  259. LX1 EXORDER
  260. PL X1,ARO
  261. AEO SB1 B1+1 GET JUDGEMENT ON REST OF STUDENT WORDS
  262. GE B1,B2,ARO
  263. SA1 ABUFW+B1
  264. ZR X1,AEO
  265. BX1 -X7*X1
  266. NZ X1,AEO SEE IF THIS AN IGNORE WORD
  267. MX6 0
  268. SA6 A1 KILL SINCE IT IS OUT OF ORDER
  269. EQ AEO
  270. *
  271. ARO SA3 ALIST BACK OUT OF LIST IF IN ONE
  272. ZR X3,AROLL
  273. SX6 1
  274. IX0 X3+X6 INCREMENT ECS POINTER
  275. SA4 ALISTCT GET MAIN AUTHOR WORD COUNT
  276. SB3 X4-1 DECREMENT AUTHOR WORD COUNT
  277. MX6 0
  278. SA6 A3 KILL LIST FLAG
  279. *
  280. AROLL LE B3,B0,ADONE SEE IF EXHAUSTED ALL AUTHOR WORDS
  281. + RE 2 GET NEXT AUTHOR WORD
  282. RJ ECSPRTY
  283. SA3 A0 BRING UP TO CM
  284. NG X3,AROLL1 SEPARATE MAIN WORDS FROM LIST
  285. SA4 A0+1 GET AUTHOR INFO WORD
  286. BX1 -X7*X4 GET THIS AUTHOR KEYWORD COUNT
  287. BX2 X1-X5 SEE IF SAME AS MATCHED WORD
  288. NZ X2,AWORD STOP SKIPPING WHEN FIND DIFFERENT NUMBER
  289. SB3 B3-2 DECREMENT AUTHOR WORD COUNT
  290. SX6 2
  291. IX0 X0+X6 INCREMENT ECS POINTER
  292. EQ AROLL TRY TO SKIP ANOTHER WORD
  293. *
  294. AROLL1 BX1 -X7*X3 GET AUTHOR KEYWORD COUNT
  295. BX2 X1-X5 SEE IF THE NUMBER SKIPPING
  296. NZ X2,ALOOP2 EXIT IF DIFFERENT
  297. SB3 B3-1 DECREMENT AUTHOR WORD COUNT
  298. SX6 1
  299. IX0 X0+X6 INCREMENT ECS POINTER
  300. EQ AROLL
  301. *
  302. *
  303. *
  304. *
  305. *
  306. * /--- BLOCK ASP 00 000 76/04/19 02.36
  307. ASP BX7 X4 ---MISSPELLED WORD---
  308. SA1 ALIST SEE IF IN LIST
  309. ZR X1,ASP1
  310. SA2 AMAIN
  311. BX7 X2
  312. ASP1 MX5 60-SYNBITS GET ONLY AUTHOR INFO HERE
  313. BX7 -X5*X7
  314. *
  315. SA1 ABUFW+B1 MUST SEE IF THIS STUDENT WORD ALREADY
  316. ZR X1,ASP2 MISSPELLED
  317. BX2 X1 SPELL TAKES PRECEDENCE OVER BAD PHRASE
  318. LX2 PSTART+1
  319. NG X2,ASP2
  320. AX1 60-SPINFOB GET SPELLING FITNESS
  321. IX1 X6-X1 IF SO, THEN MUST SEE IF THIS BETTER SPELL
  322. PL X1,ASLOOP IF PREVIOUS EQUAL OR BETTER, SKIP OUT
  323. *
  324. ASP2 LX6 60-SPINFOB SHIFT SPELLING FITNESS UP
  325. BX6 X6+X7 POSITIVE WORD WITH FITNESS AND INFO
  326. NZ X7,ASP3 SEPARATE KEYWORDS FROM IGNORE WORDS
  327. SA6 ABUFW+B1 STORE MISSPELLED IGNORE WORD JUDGEMENT
  328. MX6 0
  329. SA6 ASPELL KILL THE KEYWORD SPELL FLAG
  330. EQ ASLOOP AND ON TO NEXT STUDENT WORD
  331. *
  332. ASP3 SA1 ASPELL SEE IF PREVIOUS MISSPELLING IN THIS
  333. ZR X1,ASP5 SYNONYMOUS GROUP OF KEYWORDS
  334. SA2 X1 GET ADDRESS OF PREVIOUS MISSPELLING
  335. BX1 -X5*X2 GET KEYWORD COUNT
  336. BX1 X1-X7 SEE IF SAME COUNT AS THIS KEYWORD
  337. NZ X1,ASP5 ONLY INTERESTED IN SAME COUNT
  338. IX1 X6-X2 SEE WHICH IS CLOSEST MISSPELLING
  339. PL X1,ASLOOP PREVIOUS AS GOOD OR BETTER
  340. MX7 0
  341. SA7 A2 CLEAR OUT PREVIOUS WORDS JUDGEMENT
  342. * SINCE ONLY ONE JUDGEMENT PER KEYWORD GROUP
  343. ASP5 SA6 ABUFW+B1 AND FINALLY STORE WORD JUDGEMENT
  344. SX7 A6 SAVE THIS LOCATION AS PREVIOUS MISSPELL FLG
  345. SA7 ASPELL
  346. EQ ASLOOP CONTINUE THROUGH STUDENT WORDS
  347. *
  348. *
  349. * /--- BLOCK APHRASE 00 000 77/11/24 12.38
  350. * ---PHRASE---
  351. APHRASE PL X5,ABADPH PASS ONLY START OF PHRASE
  352. *
  353. MX7 0 CLEAR PHRASE SPELLING FLAGS
  354. SA7 APHSPL CAN ONLY BE 40 STUDENT WORDS
  355. SA7 APHSPC CLEAR CAP FLAGS
  356. SA7 APHSPC1 CLEAR CAP FLAGS NOT OK BY SPECS OKCAP
  357. *
  358. ZR X6,APH1 SEE IF PERFECT MATCH
  359. *
  360. MX7 1 SET UP PROPER BIT
  361. LX7 59
  362. AX7 X7,B1 SET A BIT FOR THIS WORD
  363. LX7 1
  364. SA7 APHSPL SET SPELL FLAG
  365. SX6 X6-3 SEE IF CAPITALIZATION ERROR
  366. PL X6,APH1
  367. SA7 APHSPC SET CAP FLAG
  368. SX6 X6+2
  369. ZR X6,APH1 SEPARATE SPECS OKCAPS TYPES
  370. SA7 APHSPC1 NOT OK BY SPECS OKCAPS
  371. *
  372. APH1 BX6 X0 SAVE ECS POINTER
  373. SA6 APREGX0
  374. SX6 B3 SAVE REMAINING AUTHOR WORDS
  375. SA6 APREGB3
  376. SX6 B1 SAVE STUDENT WORD POINTER
  377. SA6 APREGB1
  378. *
  379. APLOOP SB1 B1+1 INCREMENT TO NEXT STUDENT WORD
  380. GE B1,B2,ANOPH SEE IF CAN CONTINUE
  381. *
  382. SA1 ATAKEN SEE IF THIS WORD ALREADY OUT OF CIRCULATION
  383. LX1 X1,B1
  384. NG X1,ANOPH
  385. *
  386. SA1 JJSBUF+B1 GET NEXT STUDENT WORD
  387. SA2 JJHBUF+B1
  388. LE B3,B0,ANOPH SEE IF CAN GET AUTHOR WORD
  389. + RE 2
  390. RJ ECSPRTY
  391. SA3 A0 GET AUTHOR WORDS
  392. SA4 A0+1
  393. SX6 2
  394. IX0 X0+X6
  395. SB3 B3-2
  396. *
  397. RJ CKWORDX SEE IF WORDS MATCH
  398. *
  399. NG X6,ANOPH OUT IF NO MATCH
  400. *
  401. SA6 ANYFIND SOMETHING
  402. *
  403. ZR X6,APL2 PASS PERFECT MATCHES
  404. *
  405. * /--- BLOCK APHRASE 00 000 78/08/28 22.56
  406. MX5 1 MISSPELLING HERE
  407. LX5 59
  408. AX5 X5,B1 SET A BIT FOR THIS WORD
  409. LX5 1
  410. SA1 APHSPL GET SPELL FLAGS
  411. BX7 X5+X1
  412. SA7 A1
  413. SX6 X6-3 SEE IF CAPITALIZATION ERROR
  414. PL X6,APL2
  415. SA1 APHSPC
  416. BX7 X5+X1
  417. SA7 A1 SET CAP FLAG
  418. SX6 X6+2
  419. ZR X6,APL2 SEPARATE CAP TYPES
  420. SA1 APHSPC1 SET BIT FOR TYPE NOT OK BY SPECS OKCAPS
  421. BX7 X5+X1
  422. SA7 A1
  423. *
  424. *
  425. *
  426. APL2 BX5 X4 SEE IF MIDDLE OF PHRASE
  427. LX5 PSTART+1
  428. NG X5,APLOOP LOOP UNTIL FIND END
  429. *
  430. * PERFECT MATCH TO A PHRASE
  431. SA1 ALIST SEE IF IN LIST
  432. ZR X1,APD
  433. SA1 AMAIN GET AUTHOR INFO
  434. MX7 60-SYNBITS
  435. BX1 -X7*X1
  436. BX4 X4+X1 AND PUT INTO THIS WORD
  437. *
  438. APD SA1 APREGB1 GET POSITION OF START OF PHRASE
  439. SB3 B1 GET END OF PHRASE
  440. SB1 X1 START OF PHRASE
  441. SX5 B3-B1
  442. SX5 X5+1 GET NUMBER OF WORDS IN PHRASE
  443. *
  444. *
  445. MX2 1 GET PHRASE BITS RIGHT
  446. LX2 60-PSTART SET PHRASE START BIT
  447. BX7 X4+X2 COMBINE AUTHOR INFO WITH PHRASE BITS
  448. AX2 2 KILL PHRASE END BIT (THIS WORD IS
  449. BX7 -X2*X7 THE END OF PHRASE WORD)
  450. * FIRST OF PHRASE WORD NOT AS IGNORE WORD
  451. *
  452. MX3 1 SEE IF PERFECT OR MISSPELLED
  453. SA1 APHSPL GET MISSPELL FLAGS
  454. LX2 X1,B1 SEE IF THIS WORD MISSPELLED
  455. NG X2,APD1S NEGATIVE MEANS MISSPELLED
  456. BX7 X3+X7
  457. EQ APD1
  458. *
  459. APD1S SA1 APHSPC SEE IF CAP ERROR
  460. LX2 X1,B1
  461. NG X2,APD1C
  462. SX2 1
  463. LX2 60-SPINFOB+2 GUARANTEE SOMETHING IN SPELL FIELD
  464. BX7 X2+X7
  465. EQ APD1
  466. *
  467. APD1C MX2 SPINFOB CLEAR OUT SPELL AREA
  468. BX7 -X2*X7
  469. MX2 1 PUT A ONE INTO SPELL AREA
  470. SA1 APHSPC1 SEPARATE SPECS OKCAPS TYPES
  471. LX1 X1,B1
  472. PL X1,APD1CC
  473. SX2 1 PUT A TWO INTO SPELL AREA
  474. APD1CC LX2 60-SPINFOB+1 PUT A 1 OR 2 IN SPELL AREA
  475. BX7 X7+X2
  476. *
  477. * /--- BLOCK APHRASE 00 000 78/08/28 22.23
  478. APD1 SA7 ABUFW+B1 STORE THIS WORD JUDGEMENT FOR FIRST OF PHR
  479. *
  480. SA2 ASPELL SEE IF SHOULD KILL SPELL FLAG
  481. ZR X2,APDLY
  482. SX7 ABUFW+B1 GET THIS ADDRESS
  483. IX7 X2-X7
  484. NG X7,APDLY IS PREVIOUS MISSPELLING EARLIER
  485. SX7 ABUFW+B3 GET LAST POSSIBLE ADDRESS
  486. IX7 X7-X2 IS PREVIOUS MISSPELLING LATER
  487. NG X7,APDLY
  488. MX7 0
  489. SA7 A2
  490. *
  491. APDLY SA2 ATAKEN SET BITS TO TAKE THESE WORDS OU OF CIRC
  492. MX7 1 TAKE THIS WORD OUT OF CIRCULATION
  493. LX7 59
  494. AX7 X7,B1
  495. LX7 1
  496. BX7 X2+X7 COMBINE WITH PREVIOUS SET BITS
  497. *
  498. APDL SB1 B1+1 STORE JUDGEMENT FOR REST OF PHRASE WORDS
  499. *
  500. MX6 1 TAKE THESE WORDS OUT OF CIRCULATION
  501. LX6 59
  502. AX6 X6,B1
  503. LX6 1
  504. BX7 X6+X7
  505. *
  506. SA1 APHSPL SEE IF SPELL FLAG
  507. LX2 X1,B1 GET SPELLING JUDGEMENT
  508. NG X2,APDLS NEGATIVE MEANS MISSPELLED
  509. BX6 X3+X4 SET PERFECT BIT
  510. EQ APDLZ
  511. *
  512. APDLS SA1 APHSPC SEE IF CAP ERROR
  513. LX2 X1,B1
  514. NG X2,APDLC
  515. SX2 1
  516. LX2 60-SPINFOB+2 GUARANTEE SOMETHING IN SPELL FIELD
  517. BX6 X2+X4
  518. EQ APDLZ
  519. *
  520. APDLC MX2 SPINFOB CLEAR OUT SPELL AREA
  521. BX6 -X2*X4
  522. MX2 1 PUT A 1 IN SPELL AREA
  523. SA1 APHSPC1 SEPARATE SPECS OKCAPS TYPES
  524. LX1 X1,B1
  525. PL X1,APDLCC
  526. SX2 1 PUT A 2 INTO SPELL AREA
  527. APDLCC LX2 60-SPINFOB+1 PUT A 1 OR 2 IN SPELL AREA
  528. BX6 X6+X2
  529. *
  530. APDLZ SA6 ABUFW+B1 THIS WORD HAS ONLY END OF PHRASE BIT SET
  531. LT B1,B3,APDL
  532. *
  533. SA7 A2 FINALLY SAVE BITS OF WORDS OUT OF CIRC
  534. *
  535. * /--- BLOCK ASDONE 00 000 79/05/02 14.44
  536. *
  537. * -X6- SHOULD NOT BE TOUCHED UNTIL -ARATTLE-
  538. *
  539. *
  540. SA1 APREGX0 RESTORE REGISTERS TO JUST LIKE SINGLE WORD
  541. BX0 X1 MATCH CASE SO CAN USE -ARATTLE-
  542. SA1 APREGB3
  543. SB3 X1
  544. + RE 2 GET ORIGINAL AUTHOR WORD BACK
  545. RJ ECSPRTY
  546. SA3 A0
  547. SA4 A0+1
  548. * B1 OK AS SET TO LAST WORD OF PHRASE
  549. *
  550. EQ ARATTLE DO WHAT PERFECT MATCH DOES
  551. *
  552. *
  553. *
  554. ANOPH SA1 APREGX0 NO PHRASE...SO RESTORE ALL REGISTERS
  555. SX0 2
  556. IX0 X1-X0 POINT TO ORIGINAL AUTHOR WORD
  557. SA1 APREGB3
  558. SB3 X1 AND ORIGINAL LENGTH
  559. SA1 APREGB1
  560. SB1 X1
  561. + RE 2 GET ORIGINAL AUTHOR WORD BACK
  562. RJ ECSPRTY
  563. SA3 A0
  564. SA4 A0+1
  565. *
  566. SX1 2 ADJUST X0 TO BE LIKE AT START
  567. IX0 X0+X1 OF PHRASE JUDGING
  568. *
  569. * SET THIS WORD TO BROKEN PHRASE
  570. *
  571. *
  572. ABADPH BX6 X4
  573. SA1 ABUFW+B1 EXIT IF OTHER JUDGMENT ALREADY
  574. NZ X1,ASLOOP
  575. SA1 ALIST SEE IF IN A LIST
  576. ZR X1,ABADPH1
  577. SA1 AMAIN GET MAIN LIST INFO
  578. BX6 X1
  579. ABADPH1 MX7 60-SYNBITS
  580. BX6 -X7*X6
  581. MX7 2 SET JUDGEMENT TO BROKEN PHRASE
  582. LX7 60-PSTART-1 (FLAGGED BY HAVING MIDDLE AND END
  583. BX6 X6+X7
  584. SA6 ABUFW+B1 OF PHRASE BITS SET)
  585. EQ ASLOOP ON TO NEXT STUDENT WORD
  586. *
  587. *
  588. *
  589. ASDONE SA2 AREGB1 SEE IF DONE WITH STUDENT WORDS
  590. NG X2,ALOOP IF NEGATIVE, DID ALL ALREADY
  591. SB2 X2
  592. LE B1,B2,ALOOP SEE IF ALREADY DID WORDS BEFORE LAST MT
  593. SB1 -1 DO WORDS BEFORE LAST PERFECT MATCH
  594. EQ ASLOOP
  595. *
  596. *
  597. * /--- BLOCK ADONE 00 000 76/06/26 16.14
  598. TITLE
  599. * THE FOLLOWING SETS A CRITERION ON THE STUDENT ANSWER.
  600. * CRITERION = +4 FOR EVERY KEYWORD IN ORDER
  601. * +3 FOR KEYWORD OUT OF ORDER
  602. * OR FOR CAPITALIZATION ERROR
  603. * +2 FOR MISSPELLED KEYWORD
  604. * OR FOR CAP AND OUT OF ORDER ERROR
  605. * +1 FOR MISSPELLED KEYWORD OUT OF ORDER
  606. * ALSO, THE JUDGE BUFFER IS CHANGED TO THE FOLLOWINGIN
  607. * PREPARATION FOR ERROR FEEDBACK TO STUDENT.
  608. *
  609. * 0 FOR GOOD WORD
  610. * 1 FOR UNFOUND WORD (XXX-OUT)
  611. * 2 FOR NOT IN VOCABULARY (UUU-OUT)
  612. * 3 FOR MISSPELLED WORD (===-OUT)
  613. * 4 FOR OUT OF ORDER (MOVE LEFT)
  614. * 5 FOR MISSPELLED, OUT OF ORDER
  615. * 6 FOR OUT OF SEQUENCE (INSERT BEFORE)
  616. * 7 FOR MISPELLED, OUT OF SEQUENCE
  617. * 8 FOR BAD CAPITALIZATION (POINT UP FIRST LETTER)
  618. * 9 FOR BROKEN PHRASE
  619. * 10 FOR BAD CAPITALIZATION, OUT OF ORDER
  620. * 11 FOR BAD CAPITALIZATION, OUT OF SEQUENCE
  621. * 12 FOR WORDS MISSING AT THE END OF ANSWER (SPECIAL CASE)
  622. * 12 IS EXTRA WORD AT END OF BUFFER
  623. *
  624. * /--- BLOCK ADONE 00 000 76/03/01 13.42
  625. *
  626. *
  627. ADONE SA1 ANYFIND SEE IF ANY WORDS MATCHED
  628. NG X1,AMORE IF NOT, THEN EXIT IMMEDIATELY
  629. *
  630. SB1 B0 INITIALIZE STUDENT WORD POINTER
  631. SA1 TWCOUNT GET NUMBER OF STUDENT WORDS
  632. SB2 X1
  633. SB3 B0 WILL HOLD COUNT OF KEYWORDS
  634. MX7 0 NO ERRORS YET (BAD BITS)
  635. SA1 TSPECS
  636. BX0 X1 X0 HOLDS SPECS BITS
  637. MX4 0 CRITERION
  638. MX5 0 HIGHEST KEYWORD YET FOUND (FOR ORDER CK)
  639. SA0 B0 NO FATAL ERRORS YET
  640. *
  641. * A0 HOLDS FATAL ERROR FLAG
  642. * B1 HOLDS STUDENT WORD CURRENTLY ON
  643. * B2 HOLDS NUMBER OF STUDENT WORDS
  644. * X0 HOLDS SPECS BITS
  645. * X4 HOLDS CRITERION
  646. * X5 HOLDS HIGHEST KEYWORD YET FOUND
  647. * X7 HOLDS BAD BITS
  648. *
  649. *
  650. ADONEL SA1 ABUFW+B1 GET JUDGEMENT WORD
  651. NZ X1,AREAL SOMETHING THERE
  652. *
  653. MX6 1 SET -EXTRA- WORD FLAG
  654. LX6 60-JFEXTRA
  655. BX7 X7+X6
  656. *
  657. BX6 X0
  658. LX6 OKEXTRA SEE IF EXTRA WORDS OK
  659. NG X6,ALOK
  660. SX6 1
  661. EQ ALSTORE
  662. *
  663. *
  664. AREAL BX2 X1 SEE IF MIDDLE/END OF PHRASE
  665. LX2 PSTART+2 BOTH HAVE THE END PHRASE BIT SET
  666. NG X2,AIGNOR PASS FIRST WORD, TREAT REST AS IGNORE
  667. *
  668. MX6 60-SYNBITS MASK FOR COMMAND INFO
  669. BX2 -X6*X1 GET INFO
  670. ZR X2,AIGNOR SEE IF IGNORE WORD, PASS KEYWORDS
  671. *
  672. SB3 B3+1 KEEP COUNT OF KEYWORDS FOUND
  673. *
  674. IX3 X5-X2 COMPARE THE KEYWORD NUMBER WITH HIGHEST YET
  675. PL X3,AKOOR SEE IF OUT OF ORDER
  676. BX5 X2 SAVE THIS NEW HIGH
  677. *
  678. *
  679. SX3 X3+1 SEE IF OUT OF SEQUENCE (IF JUMP BY MORE
  680. NZ X3,AKOS THAN ONE KEYWORD)
  681. *
  682. * /--- BLOCK ADONE 00 000 76/06/26 16.15
  683. AKO PL X1,AKSP SEPARATE PERFECTS FROM MISSPELLINGS
  684. *
  685. AKOK SX4 X4+4 ADD 4 TO CRITERION
  686. EQ ALOK
  687. *
  688. AKOOR MX6 1 SET BAD ORDER BIT
  689. LX6 60-JFORDER
  690. BX7 X7+X6
  691. BX6 X0
  692. LX6 NOORDER SEE IF SPECS -NOORDER-
  693. NG X6,AKO NOORDER
  694. NG X1,AKOORR CHECK SPELLING
  695. AX1 60-SPINFOB SEE IF CAPITALIZATION ERROR
  696. SX1 X1-3
  697. PL X1,AKOOR1
  698. MX6 1 SET BAD CAP BIT
  699. LX6 60-JFCAP
  700. BX7 X6+X7
  701. SX1 X1+2 LIMIT SPECS OKCAP
  702. NZ X1,AKOOR0
  703. BX6 X0
  704. LX6 OKCAP SEE IF OKCAP
  705. NG X6,AKOORR
  706. AKOOR0 BX6 X0 SEE IF OKSPELL
  707. LX6 OKSPELL
  708. NG X6,AKOORR
  709. SX6 10 OUT OF ORDER AND CAPITALIZATION ERR
  710. SX4 X4+2 GIVE 2 POINTS
  711. EQ ALSTORE
  712. AKOOR1 MX6 1 SET SPELL BAD BIT
  713. LX6 60-JFSPELL
  714. BX7 X7+X6
  715. AKOOR2 BX6 X0
  716. LX6 OKSPELL
  717. NG X6,AKOORR
  718. SX6 5 MISSPELLED KEYWORD OUT OF ORDER
  719. SX4 X4+1 ONLY 1 FOR MISSPELL KEYWORD OUT OF ORDER
  720. EQ ALSTORE
  721. AKOORR SX6 4 SET TO SHOW OUT OF ORDER ARROW
  722. SX4 X4+3 INCREASE CRITERION
  723. EQ ALSTORE
  724. *
  725. * /--- BLOCK ADONE 00 000 76/06/14 01.19
  726. *
  727. * OUT OF SEQUENCE (STUDENT MISSED A WORD)
  728. AKOS MX6 1 SET BAD ORDER BIT
  729. LX6 60-JFORDER
  730. BX7 X7+X6
  731. BX6 X0
  732. LX6 NOORDER SEE IF SPECS -NOORDER-
  733. NG X6,AKO NOORDER
  734. NG X1,AKOS3 CHECK SPELLING
  735. AX1 60-SPINFOB SEE IF CAPITALIZATION ERROR
  736. SX1 X1-3
  737. PL X1,AKOS1
  738. MX6 1 SET BAD CAP BIT
  739. LX6 60-JFCAP
  740. BX7 X6+X7
  741. SX1 X1+2 LIMIT OKCAP
  742. NZ X1,AKOS0
  743. BX6 X0
  744. LX6 OKCAP SEE IF OKCAP
  745. NG X6,AKOS3
  746. AKOS0 BX6 X0 SEE IF OKSPELL
  747. LX6 OKSPELL
  748. NG X6,AKOS3
  749. SX6 11 OUT OF SEQUENCE AND CAPITALIZATION
  750. SX4 X4+2
  751. EQ ALSTORE
  752. AKOS1 MX6 1 SET SPELL BAD BIT
  753. LX6 60-JFSPELL
  754. BX7 X7+X6
  755. AKOS2 BX6 X0
  756. LX6 OKSPELL
  757. NG X6,AKOS3
  758. SX6 7 MISSPELLED KEYWORD OUT OF SEQUENCE
  759. SX4 X4+2 ONLY 2 SINCE MISSPELLED
  760. EQ ALSTORE
  761. AKOS3 SX6 6 SET TO SHOW OUT OF SEQUENCE WEDGE
  762. SX4 X4+4 INCREASE CRITERION BY FULL AMOUNT
  763. EQ ALSTORE
  764. * /--- BLOCK ADONE 00 000 76/06/26 16.15
  765. *
  766. *
  767. AKSP AX1 60-SPINFOB SEE IF CAPITALIZATION ERROR
  768. SX6 X1-3 SEE IF STUDENT WORD A NUMBER
  769. ZR X6,AKSP4
  770. PL X6,AKSP1
  771. MX6 1 SET BAD CAP BIT
  772. LX6 60-JFCAP
  773. BX7 X6+X7
  774. SX1 X1-1 LIMIT OKCAP
  775. NZ X1,AKSP0
  776. BX6 X0
  777. LX6 OKCAP SEE IF OKCAP
  778. NG X6,AKOK
  779. AKSP0 BX6 X0
  780. LX6 OKSPELL
  781. NG X6,AKOK
  782. SX4 X4+3 GIVE 3 POINTS FOR CAPITALIZATION ERROR
  783. SX6 8 POINT OUT BAD CAPITALIZATION
  784. EQ ALSTORE
  785. AKSP1 MX6 1 SET SPELL BAD BIT
  786. LX6 60-JFSPELL
  787. BX7 X7+X6
  788. BX6 X0
  789. LX6 OKSPELL
  790. NG X6,AKOK
  791. SX4 X4+2 ONLY 2 FOR MISSPELLED KEYWORD
  792. SX6 3 SET TO DISPLAY MISSPELLED WORD
  793. EQ ALSTORE
  794. *
  795. AKSP4 MX6 1 A CLOSE NUMBER...FOR NOW JUST UNDERLINE
  796. LX6 60-JFSPELL AND GIVE AUTHOR INFO LIKE MISSPELLING
  797. BX7 X7+X6
  798. SX4 X4+2 TREAT SAME A MISSPELLING
  799. SX6 3 MISSPELLING MARKUP
  800. EQ ALSTORE EVENTUALLY NEED SPECIAL NUMBER CASE
  801. *
  802. * IGNORE WORD CHECKING
  803. AIGNOR NG X1,ALOK SEE IF PERFECT IGNORE
  804. LX2 59 SEE IF BROKEN PHRASE
  805. NG X2,ABRP
  806. AX1 60-SPINFOB SEE IF CAPITALIZATION ERROR
  807. SX1 X1-3
  808. PL X1,AIS1
  809. MX6 1 SET BAD CAP BIT
  810. LX6 60-JFCAP
  811. BX7 X6+X7
  812. SX1 X1+2 LIMIT OKCAP
  813. NZ X1,AIS0
  814. BX6 X0
  815. LX6 OKCAP SEE IF OKCAP
  816. NG X6,ALOK
  817. AIS0 BX6 X0
  818. LX6 OKSPELL
  819. NG X6,ALOK
  820. SX6 8 POINT OUT BAD CAPITALIZATION
  821. EQ ALSTORE
  822. * /--- BLOCK ADONE 00 000 76/06/14 02.25
  823. AIS1 MX6 1 SET SPELL BAD BIT
  824. LX6 60-JFSPELL
  825. BX7 X7+X6
  826. BX6 X0
  827. LX6 OKSPELL
  828. NG X6,ALOK
  829. SX6 3 SET TO DISPLAY MISSPELLED WORD
  830. EQ ALSTORE
  831. *
  832. *
  833. ABRP MX6 1 BROKEN PHRASE
  834. LX6 60-JFPHRAS
  835. BX7 X7+X6 SET BAD BIT
  836. BX6 X0
  837. LX6 OKEXTRA SEE IF IGNORE EXTRA WORDS
  838. NG X6,ALOK
  839. SX6 9 SHOW BROKEN PHRASE MARKUP
  840. MX2 60-SYNBITS SEE IF BROKEN KEYWORD PHRASE
  841. BX2 -X2*X1
  842. ZR X2,ALSTORE
  843. SX4 X4+1 IF SO, THEN ADD A LITTLE TO CRITERION
  844. EQ ALSTORE
  845. *
  846. *
  847. ALOK MX6 0 THIS WORD IS OK
  848. SA6 A1 STORE AWAY THIS JUDGEMENT
  849. EQ ALNXT
  850. ALSTORE SA6 A1 STORE AWAY THIS JUDGEMENT
  851. SA0 1 SET FATAL ERROR FLAG
  852. *
  853. ALNXT SB1 B1+1 INCREMENT WORD POINTER
  854. LT B1,B2,ADONEL LOOP UNTIL FINISHED
  855. * ** B2 NOT TO BE CHANGED UNTIL ABAD *******
  856. *
  857. MX6 0 CLEAR AN EXTRA WORD TO ZERO
  858. SA6 ABUFW+B1 SPACE GUARANTEED BY -WORDGET-
  859. * ** A6 NOT TO BE CHANGED TILL AFTER ABAD **
  860. *
  861. SA2 AKEYWDS SEE IF STUDENT HAS ENOUGH KEYWORDS
  862. * * X2 AND X5 NOT TO BE TOUCHED TILL ABAD ***
  863. SB1 X2
  864. EQ B1,B3,ASJFLG SEE IF ANSWER ENTIRE
  865. MX6 1 SET ENTIRE BAD BIT
  866. LX6 60-JFENTIR
  867. BX7 X6+X7
  868. SA0 1 SET FATAL ERROR FLAG
  869. *
  870. ASJFLG SA7 TJFLAGS STORE JUDGEMENT FLAGS
  871. *
  872. SB1 A0
  873. NZ B1,ABAD SEE IF FATAL ERROR FOUND
  874. *
  875. BX3 X2 GET COPY OF -AKEYWDS-
  876. LX3 2 MULTIPLY BY 4
  877. BX6 X3-X4 SEE IF STUDENT CRITERION THIS HIGH
  878. ZR X6,AOK IF SO, PERFECT ANSWER
  879. *
  880. *
  881. * ***SHOULD EVENTUALLY ADD TO CRITERION
  882. * SETTING THE MATCH OF AUTHORS AND STUDENTS NUMBER OF KEYWORDS
  883. * /--- BLOCK ADONE 00 000 78/06/09 14.50
  884. *
  885. ABAD SA1 JJSBUFA
  886. IX3 X4-X1 SEE IF THIS JUDGEMENT BETTER THAN LAST BEST
  887. NG X3,AMORE SEE IF SYNONYMOUS ANSWER FOLLOWING
  888. *
  889. IX3 X2-X5 SEE IF STUDENT NEEDS MORE WORDS AT END
  890. ZR X3,ABAD1
  891. BX3 X0 GET SPECS BITS
  892. LX3 NOORDER SEE IF NOORDER IN OPERATION
  893. NG X3,ABAD1 IN WHICH CASE, BETTER NOT DO ANYTHING
  894. SX6 12 PUT WEDGE AFTER ANSWER
  895. SA6 A6 SET UP ONE EXTRA DUMMY WORD
  896. SA3 LONG GET LENGTH OF STUDENT INPUT
  897. SX6 X3+1 ADD ONE (SINCE IT IS -1 AT ANSMARK)
  898. LX6 15 GET INTO POSITION
  899. SA6 JJXY+B2 STORE IN DUMMY WORD AT END
  900. * THIS SPACE GUARANTEED BY WORDGET
  901. *
  902. ABAD1 BX6 X4
  903. SA6 A1 STORE THIS CRITERION
  904. SA7 A1+3 STORE BAD BITS
  905. BX6 X2
  906. SA6 A1+1 STORE NUMBER OF AUTHOR KEYWORDS
  907. SX6 B2
  908. SA6 A1+2 STORE NUMBER OF STUDENT WORDS
  909. BX6 X0
  910. SA6 A1+5 STORE SPECS BITS
  911. *
  912. SA0 ABUFW WRITE THESE BUFFERS OUT TO ECS
  913. SA1 ATEMPEC GET TEMPORARY ECS SCRATCH BUFFER
  914. BX0 X1 GET WORK ECS BUFFER
  915. + WE JJSENB
  916. RJ ECSPRTY
  917. SA0 JJSBUFA+JJINF MOVE INTO -A- BUFFER
  918. + RE JJSENB
  919. RJ ECSPRTY
  920. *
  921. AMORE SA1 ASFLAG SEE IF THERE IS A FOLLOWING SYN ANSWER
  922. ZR X1,PROCESS
  923. BX0 X1 READ IN THIS ANSWER COMMAND INFO WORD
  924. SA0 AWORK
  925. + RE 1
  926. RJ ECSPRTY
  927. SA1 A0
  928. BX5 X1 IF SO, THEN FIX LIKE ORIGINAL CASE
  929. EQ AREDO
  930. *
  931. *
  932. * /--- BLOCK ADONE 00 000 78/06/09 14.52
  933. *
  934. ABLANK0 SA2 AKEYWDS SEE IF NO KEYWORDS IN AUTHOR
  935. EQ ABLANK1
  936. ABLANK SA2 TWCOUNT SEE IF STUDENT ANSWER BLANK
  937. ABLANK1 NZ X2,AMORE SEE IF ANOTHER SYN AUTHOR ANS
  938. MX7 0
  939. SA7 TJFLAGS CLEAR JUDGE FLAGS
  940. AOK SB7 XANSC SET TO ANSWER CONTINGENCY
  941. MX6 0 CLEAR JUDGE BUFFER FLAG
  942. SA6 JJSBUFA
  943. SA5 A5 BRING UP COMMAND WORD
  944. MX6 60-XCMNDL
  945. BX5 -X6*X5 GET COMMAND CODE
  946. SX7 WRONG= GET WRONG COMMAND NUMBER
  947. IX7 X5-X7 BRANCH OFF WRONG
  948. ZR X7,AWRONG
  949. SX7 WRONGC= GET WRONGC COMMAND NUMBER
  950. IX7 X5-X7 BRANCH OFF WRONGC
  951. ZR X7,AWRONG
  952. SX7 WRONGA= WRONGA COMMAND
  953. IX7 X5-X7 BRANCH OFF WRONGA
  954. ZR X7,AWRONG
  955. SX6 -1 ANSWER COMMAND
  956. SA6 TJUDGED
  957. EQ PROCESS
  958. AWRONG SX6 0 WRONG COMMAND
  959. SA6 TJUDGED
  960. EQ PROCESS
  961. *
  962. *
  963. *
  964. * /--- BLOCK ADONE 00 000 77/11/24 12.35
  965. AMAIN BSS 1 AUTHOR MAIN LIST INFO WORD
  966. ALIST BSS 1 MAIN LIST ECS ADDRESS AS SUB LIST FLAG
  967. ALISTCT BSS 1 REMAINING COUNT OF MAIN LIST
  968. AKEYWDS BSS 1 NUMBER OF AUTHOR KEYWORDS
  969. AREGB1 BSS 1 HOLDS B1 OF LAST WORD MATCHED PERFECTLY
  970. ASPELL BSS 1 -B1- INDEX OF PREVIOUS MISSPELLED KEYWORD
  971. APREGX0 BSS 1 SAVED REG X0 FOR PHRASE CHECKING
  972. APREGB1 BSS 1 SAVED REG B1 FOR PHRASE CHECKING
  973. APREGB3 BSS 1 SAVED REG B3 FOR PHRASE CHECKING
  974. APHSPL BSS 1 PHRASE SPELL FLAGS (CAN ONLY BE 40 STU WDS)
  975. APHSPC BSS 1 PHRASE CAP FLAGS
  976. APHSPC1 BSS 1 PHRASE CAP FLAGS NOT OK BY SPECS OKCAP
  977. ATAKEN BSS 1 BITS SET TO TAKE WORDS OUT OF CIRCULATION
  978. *
  979. AWORK BSS 2 TWO WORD ECS READ-IN BUFFER
  980. *
  981. ABUFW BSS JJSENB JUDGMENT ON EACH WORD
  982. ASFLAG BSS 1 FLAG TO TELL IF SYNONYMOUS ANSWER FOLLOWING
  983. ANYFIND BSS 1 NEGATIVE IF NO WORDS MATCHED
  984. *
  985. *
  986. ENDOV
  987. * /--- BLOCK ANSWER 00 000 76/06/02 13.15
  988. TITLE ANSWERA/WRONGA COMMAND EXECUTION
  989. EJECT
  990. *
  991. * -ANSWERA- COMMAND (NUMBER 413)
  992. * -WRONGA- COMMAND (NUMBER 433)
  993. *
  994. * THESE COMMANDS READ A CHARACTER STRING FROM STUDENT
  995. * VARIABLES, CONTENT IT, AND COMPARE THE CONTENT
  996. * WITH THE STUDENT ANSWER.
  997. *
  998. * SYNONYMOUS ANSWERS ARE NOT ALLOWED.
  999. *
  1000. * USES'; A0,A1,A2,A3,A4,A6,A7
  1001. * ALL X
  1002. * B1,B2,B3
  1003. *
  1004. * MACROS'; NGETVAR
  1005. *
  1006. * CALLS'; WORDS, CSLOAD, CSULOAD, CONTENT,
  1007. * AUNAM,GETOP,UNUM,GETJSYM
  1008. *
  1009. ANSAOV OVRLAY
  1010. *
  1011. * MAKE SURE THE PROPER JUDGING SYMBOL SET IS
  1012. * IN CM.
  1013. *
  1014. SA1 TJSYM USER JUDGING SYMBOL SET NAME
  1015. SA2 CONTAB SET CURRENTLY IN CM
  1016. BX2 X1-X2 SEE IF SAME SET
  1017. ZR X2,ANSAXXX --- SAME SET, CONTINUE
  1018. RJ GETJSYM ELSE GET PROPER SET
  1019.  
  1020. ANSAXXX SA5 A5 RESTORE COMMAND WORD
  1021. LX5 XCODEL SHIFT UNIT ECS BIAS
  1022. MX3 -XCODEL
  1023. BX1 -X3*X5 EXTRACT UNIT ECS BIAS
  1024.  
  1025. SA2 ECSXSTO UNIT ECS BASE ADDRESS
  1026. SA0 ECSBUFA TEMP STORE ECS WORD
  1027.  
  1028. IX0 X1+X2 FORM UNIT ECS WORD ADDRESS
  1029. + RE 1
  1030. RJ ECSPRTY
  1031.  
  1032. SA1 A0 RETRIEVE ECS WORD
  1033. BX5 X1 TO X5 FOR NGETVAR
  1034. LX5 XCODEL SHIFT BUFFER BIAS TO LOW ORDER
  1035. BX6 -X3*X5 EXTRACT WORDS BUFFER BIAS
  1036. SA6 A0 STORE FOR LATER
  1037. NGETVAR GET STRING ADDRESS INTO A1
  1038.  
  1039. SX6 A1 SAVE FOR LATER
  1040. SA6 SAVSSA
  1041. LX5 XCODEL SHIFT CHAR COUNT CODE
  1042. NGETVAR GET CHAR COUNT INTO X1
  1043.  
  1044. ZR X1,ERRBADL BAD NUMBER OF CHARS
  1045. SX3 X1-JUJLTH-1 CHECK FOR > *JUJLTH*
  1046. PL X3,ERRBADL BAD NUMBER OF CHARS
  1047. SX1 X1+0 CHECK FOR WIERD BIG NUMBERS
  1048. NG X1,ERRBADL BAD NUMBER OF CHARS
  1049. SX3 X1 SAVE COUNT OVER ',WORDS',
  1050.  
  1051. SA2 SAVSSA (X2) = ADDRESS OF STRING
  1052. SA0 X2
  1053. RJ WORDS CHECK BOUNDS
  1054.  
  1055. SB3 X3 RETRIEVE CHAR COUNT
  1056. SA2 A0 1ST WORD OF STRING
  1057. SA0 JJANSA TEMP STRING BUFFER
  1058. *
  1059. * CLEAR THE CHAR BUFFER
  1060. *
  1061. SA1 AZERBUF ADDRESS OF 0 WORDS IN ESM
  1062. BX0 X1
  1063. + RE JUJLTH+1 CLEAR CHAR BUFFER
  1064. RJ ECSPRTY
  1065. **
  1066. * STUFF CHARACTERS FROM STRING INTO BUFFER
  1067. **
  1068. SB1 10 CHARS / WORD
  1069. MX0 -6 CHARACTER MASK
  1070. * /--- BLOCK ANSWER 00 000 78/12/18 20.12
  1071. SB2 B0 STORAGE INDEX
  1072. LACHAR LX2 6 POSITION NEXT CHAR
  1073. BX6 -X0*X2 EXTRACT IT
  1074. ZR X6,ZAPWORK EXIT IF 0 CHAR
  1075. SA6 A0+B2 STORE CHAR
  1076. SB2 B2+1
  1077. EQ B2,B3,ZAPWORK EXIT IF CHAR COUNT REACHED
  1078. SB1 B1-1 DECREMENT CHARS-IN-WORD COUNT
  1079. NZ B1,LACHAR
  1080. SA2 A2+1 LOAD NEXT WORD
  1081. SB1 10 RESET CHARS-IN-WORD COUNT
  1082. EQ LACHAR
  1083.  
  1084. ZAPWORK SA1 PREANSA CHAR BUFFER ADDRESS FOR LATER
  1085. ZERO CONBUF,CONBUFL CLEAR CONTENT WORDS
  1086.  
  1087. AATOP SX7 0
  1088. SA7 PHRASE NOT IN PHRASE
  1089. SX7 1 INITIALIZE';
  1090. SA7 KEYWDS - KEYWORD COUNT
  1091. SA7 WDTYPE - WORD TYPE
  1092. SA7 ATYPE - 0=IGNORE, 1=KEYWD, -1=SYN. KEYWD
  1093. *
  1094. AALOOP SX7 0
  1095. SA7 FONTFLG CLEAR FONT FLAG
  1096. SA7 CSSPERM CLEAR PERMANENT SUP/SUB BIAS
  1097. RJ CONTENT GET NEXT ELEMENT
  1098. NZ X7,ALOOPA SEE WHAT'7S THERE
  1099. SA4 PHRASE SEE IF IN PHRASE
  1100. ZR X4,ACK NO PHRASE, CONTINUE
  1101. EQ ERRPHR ERROR IF IN PHRASE
  1102. *
  1103. ALOOPA SX2 0 INITIALIZE PHRASE BITS
  1104. SX3 X1-COPASTR SET UP PHRASE CONTINUE TEST
  1105. SA4 PHRASE LOAD PHRASE FLAG
  1106. NZ X4,PHMIDDL SEE IF PHRASE STARTED
  1107. NZ X3,ALOOP1 NOT IN PHRASE OR STARTING ONE
  1108. SA2 PSTART STARTING PHRASE
  1109. MX4 1 SET PHRASE FLAG
  1110. EQ ALOOP1
  1111.  
  1112. * /--- BLOCK ANSWER 00 000 78/12/15 08.55
  1113. PHMIDDL NZ X3,PHEND IN PHRASE CHECK CONTINUATION
  1114. SA2 PMIDDLE IN MIDDLE OF PHRASE
  1115. EQ ALOOP1
  1116.  
  1117. PHEND SA2 PEND END OF PHRASE
  1118. SX4 0 CLEAR PHRASE FLAG
  1119.  
  1120. ALOOP1 BX7 X7+X2 ADD PHRASE BITS
  1121. SA2 WDTYPE GET WORD TYPE
  1122. BX7 X7+X2 ADD WORD TYPE
  1123. SA2 CONBUF CHECK FOR OVERFLOW
  1124. SX3 X2-JUJLTH-2
  1125. PL X3,ERRWDS TOO MANY CONTENT WORDS
  1126. SA6 X2+CONBUF+1 STORE CONTENT WORD
  1127. SA7 A6+1 STORE HASH WORD
  1128. SX6 X2+2 INCREMENT CONTENT WORD COUNT
  1129. SA6 CONBUF STORE CONTENT WORD COUNT
  1130. BX6 X4 MOVE PHRASE FLAG
  1131. SA6 A4 STORE PHRASE FLAG
  1132.  
  1133. SA2 ATYPE GET LOCATION IN COMMAND
  1134. ZR X2,ACK IGNORABLE WORDS
  1135. NG X2,ACK SYNONYMS
  1136. NZ X4,ACK IF IN PHRASE
  1137. SA2 KEYWDS INCREMENT NUMBER OF KEYWORDS
  1138. SX6 X2+1
  1139. SA6 KEYWDS STORE NUMBER OF KEYWORDS
  1140. SA6 WDTYPE AND WORD TYPE
  1141.  
  1142. ACK ZR X1,ADONE SEE IF END-OF-LINE
  1143. SX2 X1-COPCOMA .LT. 0 IS LETTER/NUMBER
  1144. NG X2,AALOOP NEXT ITEM IF LETTER/NUMBER
  1145. SA4 PHRASE GET PHRASE FLAG
  1146. NZ X4,ERRPHRC PHRASE HAS BAD CHARACTER
  1147. SA2 ATYPE GET WHERE IN ANSWER COMMAND
  1148. ZR X2,IGN IGNORABLE WORDS
  1149. NG X2,SYNK SYNONYMS
  1150. SX3 X1-COPCOMA SEE IF SYNONYM FOLLOWS
  1151. ZR X3,ERRSYNA SYNONYMOUS ANSWERS NOT ALLOWED
  1152. SX3 X1-COPLPRN START OF SYNONYMOUS KEYWORDS
  1153. NZ X3,OTH OTHER THINGS
  1154. MX6 -1 SET TO SYNONYMOUS KEYWORDS
  1155. SA6 ATYPE STORE TYPE
  1156. EQ AALOOP
  1157.  
  1158. * /--- BLOCK ANSWER 00 000 78/12/15 08.55
  1159. SYNK SX3 X1-COPCOMA TEST FOR COMMA
  1160. ZR X3,AALOOP COMMA OK IN KEYWORDS
  1161. SX3 X1-COPRPRN CHECK FOR END OF KEYWORDS
  1162. NZ X3,SYNKK CHECK FOR SYNONYM LIST
  1163. SA3 KEYWDS INCREMENT KEYWORD COUNT
  1164. SX6 X3+1
  1165. SA6 KEYWDS
  1166. SA6 ATYPE ANSWER TYPE
  1167. SA6 WDTYPE WORD TYPE
  1168. EQ AALOOP
  1169.  
  1170. SYNKK SX3 X1-COPLPRN SEE IF KEYWORD LIST ((LIST))
  1171. NZ X3,ERRCHAR ILLEGAL CHARACTER
  1172. SX3 COPRPRN PROBABLY UNNECESSARY
  1173. EQ ALISTIN
  1174.  
  1175. OTH SX3 X1-COPLTH SEE IF <
  1176. NZ X3,ERRCHAR ILLEGAL CHARACTER
  1177. MX6 0 SET TO IGNORABLE
  1178. SA6 WDTYPE
  1179. SA6 ATYPE
  1180. EQ AALOOP
  1181.  
  1182. IGN SX3 X1-COPGTH SEE IF >
  1183. NZ X3,IGN1
  1184. SA4 KEYWDS SET BACK TO KEYWORDS
  1185. BX6 X4
  1186. SA6 WDTYPE
  1187. SA6 ATYPE
  1188. EQ AALOOP
  1189.  
  1190. IGN1 SX3 X1-COPCOMA SEE IF COMMA
  1191. ZR X3,AALOOP COMMA OK IN EXTRA WORDS
  1192. SX3 X1-COPLTH SEE IF EXTRA LIST
  1193. NZ X3,ERRCHAR ILLEGAL CHARACTER
  1194. SX3 COPGTH PROBABLY UNNECESSARY
  1195.  
  1196. ALISTIN BX7 X3 SAVE FOR POSSIBLE LATER USE
  1197. SA7 WKWD
  1198. SX7 B1 SAVE B1 AND B2 OVER ',AUNAM',
  1199. SA7 SAVEB1
  1200. SX7 B2
  1201. SA7 SAVEB2
  1202. RJ AUNAM FIND LIST UNIT NUMBER
  1203. ZR X6,ERRLIST LIST NOT FOUND
  1204. SA3 SAVEB1 RESTORE B1, B2
  1205. SB1 X3
  1206. SA3 SAVEB2
  1207. SB2 X3
  1208. LX6 30 MOVE UNIT NUMBER
  1209. MX7 1 SET TO LIST WORD
  1210. BX6 X6+X7 FORM LIST WORD
  1211. SA2 WDTYPE GET WORD TYPE
  1212. BX6 X6+X2 ADD TO LIST WORD
  1213. * /--- BLOCK ANSWER 00 000 76/06/02 13.15
  1214. SA2 CONBUF GET CURRENT WORD COUNT
  1215. SX3 X2-JUJLTH-1 DO OVERFLOW TEST
  1216. PL X3,ERRWDS TOO MANY CONTENT WORDS
  1217. SA6 X2+CONBUF+1 STORE LIST REFERENCE
  1218. SX6 X2+1 INCREMENT WORD COUNT
  1219. SA6 CONBUF STORE CONTENT WORD COUNT
  1220. SA3 WKWD RESTORE X3
  1221. SX4 X1-COPCOMA CHECK FOR ((LISTX,LISTY))
  1222. ZR X4,ALISTIN GET NEXT LIST
  1223.  
  1224. BX4 X1-X3 CHECK FOR > OR )
  1225. ZR X4,AALOOP
  1226. EQ ERRTERM IMPROPER LIST TERMINATOR
  1227.  
  1228. ADONE SA2 ATYPE MUST NOT BE IGN, SYN, PHRASE
  1229. ZR X2,ERRIEND PREMATURE END OF IGNORABLES
  1230. NG X2,ERRSEND PREMATURE END OF SYNONYMS
  1231. SA2 PHRASE GET PHRASE FLAG
  1232.  
  1233. NZ X2,ERRPHR PREMATURE PHRASE END
  1234. SA2 CONBUF GET NUMBER OF WORDS SO FAR
  1235.  
  1236. MX7 48 TEST FOR 12-BIT OVERFLOW
  1237. BX7 X7*X2
  1238. NZ X7,ERR12B 12-BIT OVERFLOW
  1239.  
  1240. SA3 ECSBUFA RETRIEVE UNIT ECS BUFFER BIAS
  1241. SA4 ECSXSTO UNIT ECS BASE ADDRESS
  1242.  
  1243. IX0 X3+X4 FORM UNIT ECS BUFFER ADDRESS
  1244. SB1 X2 NUMBER OF WORDS TO WRITE
  1245. SA0 A2+1 STARTING ADDRESS TO READ
  1246.  
  1247. + WE B1 STORE CONTENT WORDS
  1248. RJ ECSPRTY
  1249.  
  1250. LX3 12 MOVE BIAS INTO EXTRA STORAGE
  1251. BX5 X3+X2 ADD NUMBER OF CONTENT WORDS
  1252. SA2 KEYWDS GET NUMBER OF KEYWORDS
  1253.  
  1254. ZR X2,ERRKEY NO KEYWORDS
  1255. SX2 X2-1 ADJUST TO CORRECT NUMBER
  1256.  
  1257. LX5 12 MAKE ROOM FOR KEYWORDS COUNT
  1258. BX5 X5+X2 ADD TO PSEUDO-COMMAND WORD
  1259. LX5 12 FINALIZE PSEUDO-COMMAND
  1260.  
  1261. GOANS EXEC ANSW1,NANSOV GO JUDGE STUDENT INPUT
  1262. TITLE -ANSWERA-/-WRONGA- ERRORS
  1263. EJECT
  1264. ERRBADL SX6 3 BAD NUMBER OF INPUT CHARACTERS
  1265. EQ ERROUT
  1266. *
  1267. ERRPHR SX6 4 PREMATURE PHRASE END
  1268. EQ ERROUT
  1269. *
  1270. ERRPHRC SX6 5 BAD CHAR IN PHRASE
  1271. EQ ERROUT
  1272. *
  1273. ERRWDS SX6 6 TOO MANY CONTENT WORDS
  1274. EQ ERROUT
  1275. *
  1276. ERR12B SX6 7 12-BIT OVERFLOW
  1277. EQ ERROUT
  1278. *
  1279. ERRCHAR SX6 8 STRING CONTAINS ILLEGAL CHAR
  1280. EQ ERROUT
  1281. *
  1282. ERRIEND SX6 9 PREMATURE END OF IGNORABLES
  1283. EQ ERROUT
  1284. *
  1285. ERRSEND SX6 10 PREMATURE END OF SYNONYMS
  1286. EQ ERROUT
  1287. *
  1288. ERRKEY SX6 11 NO KEYWORDS IN STRING
  1289. EQ ERROUT
  1290. *
  1291. ERRSYNA SX6 12 SYNONYMOUS ANSWERS NOT ALLOWED
  1292. * /--- BLOCK ANSWER 00 000 76/06/02 13.15
  1293. EQ ERROUT
  1294. *
  1295. ERRTERM SX6 13 IMPROPER -LIST- TERMINATION CHAR
  1296. EQ ERROUT
  1297. *
  1298. ERRLCH SX6 14 TOO MANY CHARS IN -LIST- NAME
  1299. EQ ERROUT
  1300. *
  1301. ERRLIST SX6 15 BAD -LIST- NAME (0 OR NOT FOUND)
  1302. ERROUT SA6 TJUDGED
  1303. SB7 XANSC ANSWER CONTINGENCY
  1304. EQ PROCESS DON'7T BOTHER CHECKING STUDENT INPUT
  1305. TITLE AUNAM -- FIND LIST IN UNIT TABLE
  1306. EJECT
  1307. *
  1308. * AUNAM -- FIND -LIST- UNIT IN TABLE
  1309. *
  1310. * ENTER'; X3 = END CHARACTER ',)', OR ',>',
  1311. *
  1312. * EXIT'; X6 = 0 UNIT NOT FOUND
  1313. * = +N UNIT NUMBER N
  1314. *
  1315. AUNAM EQ *
  1316. SB1 42 ONLY ALLOW 7 CHARS, SPACE AT START
  1317. MX6 0
  1318.  
  1319. VUN SB3 A1 SAVE CURRENT CHAR ADDRESS
  1320. RJ GETOP GET NEXT OPCODE FROM ',CONTEN',
  1321. SX0 B2-COPSP SEE IF LEADING SPACE
  1322. ZR X0,VUN LOOP TO CLEAN OFF LEADING SPACES
  1323.  
  1324. VULOOP ZR B2,VUMADE SEE IF END-OF-LINE
  1325. SX0 B2-COPCOMA SEE IF COMMA
  1326. ZR X0,VUMADE
  1327. SX0 B2-COPSP SEE IF SPACE
  1328. ZR X0,VUMADE
  1329. SX0 B2
  1330. IX0 X0-X3 TEST FOR END MARK
  1331. ZR X0,VUMADE
  1332.  
  1333. VUMAKE SB1 B1-6 DECREMENT SHIFT COUNT
  1334. NG B1,ERRLCH TOO MANY CHARS IN LIST NAME
  1335. SB3 B3+1 GET 6-BIT CHARACTERS NEEDED
  1336. SA2 B3
  1337. LX0 B1,X2 SHIFT TO CORRECT POSITION
  1338. BX6 X6+X0 ADD TO NAME BUILDING
  1339. SX2 A1-B3
  1340. NZ X2,VUMAKE LOOP FOR CHARS OF .GT. 6 BITS
  1341.  
  1342. RJ GETOP GET NEXT OPCODE FROM ',CONTEN',
  1343. EQ VULOOP
  1344.  
  1345. VUMADE ZR X6,ERRLIST NO -LIST- NAME
  1346. SX0 1R SPACE AT START OF WORD
  1347. LX0 42
  1348. BX6 X6+X0 UNAM ENTRY STARTS W/SPACE
  1349. SX7 B2 SAVE LAST OPCODE
  1350. LX7 30
  1351. SX2 A1 SAVE LAST CHAR ADDRESS
  1352. BX7 X7+X2
  1353. SA7 SAVIT
  1354. BX1 X6 ',UNUM', EXPECTS IT IN X1
  1355. SA6 SAVLIST SAVE NAME FOR EXECERR
  1356. LX1 12 LEFT-JUSTIFY UNIT NAME
  1357.  
  1358. RJ UNUM RETURN W/NUMBER IN X6
  1359.  
  1360. SA2 SAVIT RESTORE CHAR ADDRESS, LAST OP
  1361. SA1 X2
  1362. LX2 30
  1363. SX1 X2
  1364. EQ AUNAM
  1365.  
  1366. *
  1367.  
  1368. SAVIT BSS 1 SCRATCH USED BY ',AUNAM',
  1369. PHRASE BSS 1 PHRASE START FLAG
  1370. WDTYPE BSS 1 CURRRENT WORD TYPE
  1371. KEYWDS BSS 1 NUMBER OF KEYWORDS
  1372. ATYPE BSS 1 0=IGNORE, 1=KEYWORD, -1=SYN KEYWORDS
  1373. * /--- BLOCK ANSWER 00 000 76/06/02 13.15
  1374. WKWD BSS 1 SAVES X3
  1375. ECSBUFA BSS 1 ECS BUFFER ADDRESS
  1376. SAVEB1 BSS 1 TEMP. STORE B1, B2
  1377. SAVEB2 BSS 1
  1378. SAVSSA BSS 1 SAVE STARTING STRING ADDRESS
  1379. SAVLIST BSS 1 SAVE LIST NAME FOR EXECERR
  1380. PREANSA BSS 1 ADDRESS OF *JJANSA*-1
  1381. JJANSA BSS JUJLTH+1 CHAR BUFFER
  1382. *
  1383. CONBUFL EQU JUJLTH+2 CONTENT WORDS BUFFER LENGTH
  1384. CONBUF BSS CONBUFL CONTENT WORDS BUFFER
  1385. *
  1386. *
  1387. PSTART VFD 27/0,1/1,22/0 PHRASE START BIT
  1388. PMIDDLE VFD 28/0,1/1,21/0 MIDDLE WORD IN PHRASE
  1389. PEND VFD 29/0,1/1,20/0 LAST WORD IN PHRASE
  1390. *
  1391. ENDOV
  1392. TITLE MATCH JUDGING ROUTINE
  1393. * EACH STUDENT WORD IS BROUGHT UP IN TURN. THEN RUN THROUGH
  1394. * ALL AUTHOR WORDS LOOKING FOR A MATCH.
  1395. *
  1396. NMATOV OVRLAY
  1397. RJ WORDGET GET STUDENT ANSWER INTO -CONTENT- WORDS
  1398. MX6 0
  1399. SA6 MLIST NOT IN SUB-LIST
  1400. SA6 MSPEVER NO MISSPELLING YET
  1401. SA6 MCEVER NO CAP ERROR YET
  1402. SA6 MBADPH NO PHRASE ERROR YET
  1403. SB7 XANSC PRE-SET TO ANS-C
  1404. SA2 TWCOUNT GET NUMBER OF STUDENT WORDS
  1405. ZR X2,MATDONE EXIT -NO- IF NO WORDS THERE
  1406. *
  1407. SB2 X2 STUDENT WORD COUNT IN B2 FOR REMAINDER
  1408. LX5 XCODEL+18 GET RELATIVE STARTING LOC OF WORDS
  1409. MX0 42 18 BIT MASK
  1410. BX6 -X0*X5
  1411. SA1 ECSXSTO GET START OF ECS RESIDENT EXTRA STORAGE
  1412. IX6 X6+X1 NOW HAVE ABSOLUTE ECS ADDRESS
  1413. SA6 MAINPT STORE AWAY FOR LATER
  1414. LX5 12 GET NUMBER OF WORDS
  1415. MX0 48 12 BIT MASK
  1416. BX6 -X0*X5
  1417. SA6 MAINCNT STORE AWAY FOR LATER
  1418. SB1 B0 SET CURRENT STUDENT WORD TO ZERO
  1419. SA0 MWORK A0 SET FOR ENTIRE REST OF ROUTINE
  1420. *
  1421. MLOOP GE B1,B2,MATDONE EXIT IF RUN OUT OF STUDENT WORDS
  1422. SA1 JJSBUF+B1 GET FIRST PART OF STUDENT WORD
  1423. SA2 JJHBUF+B1 GET SECOND PART OF STUDENT WORD
  1424. SB1 B1+1 INCREMENT STUDENT WORD COUNT
  1425. *
  1426. MX6 0
  1427. SA6 MSPELL NO SPELLING ERROR YET FOR THIS WORD
  1428. *
  1429. SA3 MAINPT GET AUTHOR LIST
  1430. BX0 X3
  1431. SA4 MAINCNT AND AUTHOR WORD COUNT
  1432. SB3 X4
  1433. *
  1434. MALOOP GT B3,B0,MALREAD SEE IF AUTHOR LIST EXHAUSTED
  1435. SA3 MLIST SEE IF IN A SUB LIST
  1436. ZR X3,MALOOPS IF NO, SEE IF FOUND A MISSPELLING
  1437. SX6 1
  1438. IX0 X3+X6 INCREMENT MAIN LIST
  1439. SA4 MLISTCT GET BACK MAIN LIST COUNT
  1440. SB3 X4-1 DECREMENT COUNT OF AUTHOR WORDS
  1441. MX6 0
  1442. * /--- BLOCK ANSWER 00 000 76/06/02 13.15
  1443. SA6 A3 AND SET FLAG TO WORKING ON MAIN LIST
  1444. EQ MALOOP AND BACK TO LOOP ON AUTHORS WORDS
  1445. *
  1446. * /--- BLOCK MATCH 00 000 76/06/14 01.28
  1447. *
  1448. *
  1449. MALOOPS SA3 MSPELL SEE IF FOUND A MISSPELLING THIS RUN
  1450. ZR X3,MLOOP IF NOT, ON TO NEXT STUDENT WORD
  1451. *
  1452. MX7 1
  1453. SA2 TSPECS LOAD SPECS BITS
  1454. *
  1455. SX3 X3-3 JUDGER YIELDS FITNESS OF 1 OR 2 FOR CAP ERR
  1456. PL X3,MS1 ON TO GENERAL SPELLING TEST
  1457. SA7 MCEVER SET ENTIRE MATCH CAP ERROR
  1458. LX7 60-JFCAP SET BAD CAP BIT
  1459. SX3 X3+2 LIMIT OKCAP
  1460. NZ X3,MS1A
  1461. BX3 X2
  1462. LX3 OKCAP SEE IF SPECS OKCAP
  1463. NG X3,MS2 FOUND WORD IF OKCAP
  1464. EQ MS1A ELSE SEE IF OKSPELL
  1465. *
  1466. MS1 SA7 MSPEVER SET ENTIRE MATCH SPELL FLAG
  1467. LX7 60-JFSPELL SET BAD SPELL FLAG BIT
  1468. MS1A LX2 OKSPELL SEE IF SPECS OKSPELL
  1469. PL X2,MLOOP ON TO NEXT STUDENT WORD
  1470. MS2 SA7 TJFLAGS
  1471. SA4 MSPELLI GET AUTHOR INFO WORD
  1472. SA1 MSPELLS GET STUDENT WORD POINTER BACK
  1473. SA1 X1
  1474. MX0 0 FLAG FOR ONE WORD FOUND
  1475. EQ MGOT EXIT WITH THIS WORD
  1476. * /--- BLOCK MATCH 00 000 78/02/13 17.06
  1477. *
  1478. MALREAD RE 2 GET IN NEXT AUTHOR WORD IN THIS RUN
  1479. RJ ECSPRTY
  1480. *
  1481. SA3 A0 GET WORD
  1482. PL X3,MWD SEE IF A SUBLIST
  1483. *
  1484. BX6 X3 SAVE MAIN LIST INFO WORD
  1485. SA6 MMAIN
  1486. BX6 X0 SAVE MAIN LIST POINTER AS A FLAG
  1487. SA6 MLIST
  1488. SX7 B3
  1489. SA7 MLISTCT AND SAVE COUNT
  1490. LX3 1 NOW GET SUB-LIST
  1491. AX3 31 GET UNIT NUMBER
  1492. SA4 ECSULOC GET ECS ADDRESS OF -ULOC- TABLE
  1493. IX0 X3+X4
  1494. + RE 1 READ IT IN
  1495. RJ ECSPRTY
  1496. SA4 A0 GET ENTRY
  1497. NG X4,MATDONE SOMETHING WRONG...SKIP OUT GRACEFULLY
  1498. *
  1499. BX0 X4
  1500. AX0 60-ULOC1 TOP BITS ARE BIAS TO LOCATION
  1501. SA3 ECSLES GET ECS ADDRESS OF LESSON
  1502. IX0 X0+X3 NOW HAVE ABSOLUTE ECS ADDRESS
  1503. LX4 ULOC1+ULOC2+ULOC3+ULOC4 GET LENGTH
  1504. MX5 60-ULOC4
  1505. BX7 -X5*X4
  1506. SB3 X7
  1507. EQ MALOOP NOW BACK TO LOOP
  1508. *
  1509. MWD SX6 2
  1510. SB3 B3-2 SUBTRACT 2 FROM AUTHOR COUNT
  1511. IX0 X0+X6 INCREMENT ECS POINTER
  1512. SA4 A0+1 BRING UP SECOND PART
  1513. *
  1514. RJ CKWORDX SEE IF NO MATCH, PERFECT MATCH, SPELL ERROR
  1515. NG X6,MALOOP NO MATCH
  1516. ZR X6,MG PERFECT MATCH
  1517. *
  1518. * /--- BLOCK MATCH 00 000 77/11/24 11.02
  1519. * SPELLING ERROR
  1520. SA3 MSPELL SEE IF PREVIOUS MISSPELLING
  1521. ZR X3,MFSP
  1522. IX3 X6-X3 SEE IF PREVIOUS A CLOSER MISSPELLING
  1523. PL X3,MALOOP IN WHICH CASE, ON TO NEXT WORD
  1524. *
  1525. MFSP BX5 X4 SEE IF DOING A PHRASE
  1526. LX5 PSTART
  1527. PL X5,MSP1 SEE IF START OF PHRASE
  1528. *
  1529. MX7 1 MARK IT AS A PHRASE MISSPELLING
  1530. SX6 X6-3 SEE IF CAP ERROR
  1531. NG X6,MSSCAP1
  1532. SA7 PSPELL THIS TIME
  1533. SA7 MSPEVER FOR ALL TIME
  1534. EQ MSS1
  1535. MSSCAP1 SA7 PSPELC SET PHRASE CAP ERROR
  1536. SA7 MCEVER FOR ALL TIME
  1537. SX6 X6+2 LIMIT OKCAP
  1538. NZ X6,MSS1
  1539. SA3 TSPECS SEE IF SPECS OKCAP
  1540. LX3 OKCAP
  1541. NG X3,MPHRASE TRY FOR A BAD PHRASE
  1542. MSS1 SA3 TSPECS SEE IF SPECS -OKSPELL-
  1543. LX3 OKSPELL
  1544. PL X3,MALOOP IF NOT, THEN GO ON TO NEXT AUTHOR WORD
  1545. EQ MPHRASE SEE IF CAN MATCH PHRASE
  1546. *
  1547. MSP1 MX7 3 EXIT IF MIDDLE OF PHRASE
  1548. BX7 X7*X5
  1549. NZ X7,MALOOP
  1550. SA6 A3 STORE THIS SPELLING FITNESS
  1551. SA3 MLIST SEE IF IN SUB-LIST
  1552. ZR X3,MSGOT
  1553. SA4 MMAIN SAVE MAIN INFO WORD
  1554. MSGOT BX6 X4
  1555. SA6 MSPELLI SAVE AUTHOR INFO
  1556. SX6 A1 SAVE POINTER TO STUDENT WORD
  1557. SA6 MSPELLS
  1558. EQ MALOOP SEE IF CAN FIND A PERFECT MATCH THIS RUN
  1559. *
  1560. *
  1561. * FOUND PERFECT WORD MATCH...NOW SEE IF AUTHOR WORD
  1562. * IS PART OF A PHRASE...
  1563. *
  1564. MG BX5 X4 CHECK IF THIS WORD STARTS A PHRASE
  1565. LX5 PSTART GET START PHRASE BIT
  1566. MX6 3 LOOK AT PHRASE BITS
  1567. BX6 X6*X5
  1568. MX7 0 SET TO NO SPELLING ERROR YET IN PHRASE
  1569. SA7 PSPELL
  1570. SA7 PSPELC NO CAP ERROR IN PHRASE YET
  1571. NZ X6,MPHRASE SOMETHING OF A PHRASE HERE
  1572. MX0 0 FLAG FOR ONE WORD FOUND
  1573. EQ MGO GOOD MATCH IF NOT PART OF PHRASE
  1574. *
  1575. * /--- BLOCK MATCH 00 000 77/11/24 11.08
  1576. * NOW SEE IF A COMPLETE, PERFECT PHRASE
  1577. MPHRASE PL X5,MALOOP MUST BE START OF A PHRASE
  1578. SX6 A1 SAVE CURRENT -A1-
  1579. SA6 MA1
  1580. SX6 A2 AND -A2-
  1581. SA6 MA2
  1582. SX6 B1 AND -B1-
  1583. SA6 MB1
  1584. *
  1585. MPLOOP GE B1,B2,MNOPH SEE IF CAN CONTINUE
  1586. SA1 JJSBUF+B1 GET NEXT STUDENT WORD
  1587. SA2 JJHBUF+B1
  1588. SB1 B1+1
  1589. LE B3,B0,MNOPH SEE IF CAN GET AUTHOR WORD
  1590. + RE 2
  1591. RJ ECSPRTY
  1592. SA3 A0 GET AUTHOR WORDS
  1593. SA4 A0+1
  1594. SX6 2
  1595. IX0 X0+X6
  1596. SB3 B3-2
  1597. RJ CKWORDX SEE IF WORDS MATCH
  1598. *
  1599. ZR X6,MPLOOP1 MATCH
  1600. NG X6,MNOPH NO MATCH SO GET OUT OF PHRASE CHECKING
  1601. *
  1602. MX7 1 SO A MISSPELLING, SET MARKER
  1603. SX6 X6-3 SEE IF CAPITALIZATION ERROR
  1604. NG X6,MPLLSC1
  1605. SA7 PSPELL SPELLING ERROR THIS TIME
  1606. SA7 MSPEVER AND FOR ALL TIME
  1607. EQ MPLLS
  1608. MPLLSC1 SA7 PSPELC SET CAP ERROR THIS TIME
  1609. SA7 MCEVER SET CAP ERROR EVER
  1610. SX6 X6+2 GET SPECS OKCAP FORM OF CAP ERROR
  1611. NZ X6,MPLLS
  1612. SA3 TSPECS SEE IF SPECS OKCAP
  1613. LX3 OKCAP
  1614. NG X3,MPLOOP1
  1615. MPLLS SA3 TSPECS SEE IF -SPECS OKSPELL-
  1616. LX3 OKSPELL
  1617. NG X3,MPLOOP1 CONTINUE ONLY IF -OKSPELL-
  1618. *
  1619. MNOPH SA1 MB1 NO PHRASE SO RESTORE REGISTERS
  1620. SB1 X1 DO NOT NEED -B3- RESTORED SINCE
  1621. SA1 MA1 THOSE WORDS WERE MIDDLE/END OF PHRASES
  1622. SA2 MA2 SO COULD NOT START ANYTHING
  1623. SA1 X1
  1624. SA2 X2
  1625. MX7 1 SET BAD PHRASE FLAG
  1626. SA7 MBADPH
  1627. EQ MALOOP
  1628. *
  1629. MPLOOP1 BX5 X4 SEE IF MIDDLE OF PHRASE
  1630. LX5 PSTART+1
  1631. NG X5,MPLOOP LOOP UNTIL FIND END
  1632. SX6 A1 NOW CALCULATE NUMBER OF WORDS IN PHRASE
  1633. SA1 MA1
  1634. IX0 X6-X1 X0 THUS HOLDS THE NUMBER OF WORDS
  1635. SA1 X1 -A1- NOW AT FIRST WORD
  1636. *
  1637. SA3 PSPELL GET ANY SPELL ERROR FLAGS
  1638. BX7 X3
  1639. LX7 60-JFSPELL
  1640. SA3 PSPELC GET CAP ERRORS
  1641. LX3 60-JFCAP
  1642. BX7 X3+X7
  1643. SA7 TJFLAGS SET ERROR FLAGS
  1644. * /--- BLOCK MATCH 00 000 75/10/01 21.11
  1645. *
  1646. *
  1647. MGO SA3 MLIST SEE IF MAIN LIST OR SUB-LIST
  1648. ZR X3,MGOT
  1649. SA4 MMAIN GET MAIN LIST INFO WORD
  1650. *
  1651. MGOT MX6 60-SYNBITS GET BASE AUTHOR WORD NUMBER
  1652. BX5 -X6*X4 TO BE STORED AS RESULT
  1653. SX5 X5-1 -MATCH- CONDITIONALS START AT ZERO
  1654. SX7 -1 SET TO -OK-
  1655. SA7 TJUDGED STORE JUDGEMENT
  1656. *
  1657. * NOW MUST BUMP OUT WORD/CHARACTERS FROM CONTENT/JUDGE BUFFERS
  1658. MBLOOP SB3 B2+JJSBUF-1 LAST WORD USED IN CONTENT BUFFER
  1659. SB2 A1 CURRENT WORD IN BUFFER
  1660. SA1 B2+JJSENB X1 = COUNT INFO WORD FOR WORD MATCHED
  1661. MX6 15
  1662. BX3 X6*X1
  1663. LX3 15 X3 = INDEX TO FIRST CHAR OF WORD
  1664. SB1 X0 NUMBER OF WORDS TO BUMP MINUS 1
  1665. SA1 A1+B1 THIS IS LAST COUNT INFO WORD INVOLVED
  1666. LX1 15
  1667. BX4 X6*X1
  1668. LX4 15 X4 = INDEX TO LAST CHAR
  1669. SB3 B3-B1 REDUCE END COUNT BY NUMBER BUMPED (-1)
  1670. SX0 X0+1 GET TRUE NUMBER BUMPED
  1671. SB1 X0
  1672. *
  1673. MBUMP GE B2,B3,MPDONE CLOSE UP HOLE
  1674. SA1 B2+B1 LOAD NEXT WORD -JJSBUF-
  1675. SA2 A1+JJSENB AND COUNT CO-ORDINATES -JJXY-
  1676. BX6 X1
  1677. BX7 X2
  1678. SA6 B2 STORE BACK ONE
  1679. SA7 A6+JJSENB
  1680. SA2 A2+JJSENB LOAD HASH WORD
  1681. BX6 X2
  1682. SA6 A7+JJSENB
  1683. *
  1684. SB2 B2+1
  1685. EQ MBUMP
  1686. MPDONE SX6 1R X6 = SPACE CODE
  1687. SB2 X3 B2 = STARTING CHAR INDEX
  1688. SB3 X4 B3 = ENDING CHAR INDEX
  1689. MPUT SA6 JUDGE+B2
  1690. SB2 B2+1
  1691. LE B2,B3,MPUT
  1692. *
  1693. SA1 TWCOUNT DECREMENT STUDENT WORD COUNT
  1694. IX6 X1-X0
  1695. SA6 A1
  1696. *
  1697. MX6 -1
  1698. SA6 JJSTORE FLAG RECOMPILE STUDENT RESPONSE
  1699. *
  1700. BX6 X5 RESTORE X6
  1701. SA5 A5 GET COMMAND WORD BACK
  1702. NPUTVAR STORES X6 IN USER VARIABLE
  1703. EQ PROCESS CONTINUE TO NEXT TUTOR COMMAND
  1704. *
  1705. *
  1706. * /--- BLOCK MATCH 00 000 76/03/30 16.47
  1707. MATDONE SA3 MSPEVER COMBINE ANY SPELL, CAP, OR BAD PHRASE FLAG
  1708. LX3 60-JFSPELL
  1709. SA4 MCEVER
  1710. LX4 60-JFCAP
  1711. BX7 X3+X4
  1712. SA3 MBADPH
  1713. LX3 60-JFPHRAS
  1714. BX7 X3+X7
  1715. SA7 TJFLAGS SET BAD FLAGS
  1716. *
  1717. SX7 1 SET JUDGMENT = UNIVERSAL NO
  1718. SX6 -1 SET TO -NO- FOR MATCH
  1719. SA7 TJUDGED STORE JUDGEMENT
  1720. SA5 A5 GET COMMAND WORD BACK
  1721. NPUTVAR STORES X6 IN USER VARIABLE
  1722. EQ PROCESS
  1723. *
  1724. *
  1725. MAINPT BSS 1 STARTING ECS ADDRESS OF AUTHOR WORDS
  1726. MAINCNT BSS 1 NUMBER OF AUTHOR WORDS
  1727. MLIST BSS 1 ZERO IF IN MAIN LIST OR LAST WORD OF MAIN
  1728. MLISTCT BSS 1 REMAINING COUNT OF MAIN
  1729. MMAIN BSS 1 HOLDS MAIN LIST INFO WORD WHILE IN SUB-LIST
  1730. MSPELL BSS 1 0=NO MISSPELLING, +N SPELLING ERROR/FITNESS
  1731. MSPELLI BSS 1 HOLDS AUTHOR INFO WORD AT MISSPELLING
  1732. MSPELLS BSS 1 HOLDS -A1- AT MISSPELLING TIME
  1733. MA1 BSS 1 HOLDS FIRST -A1- WHILE LOOKING AT PHRASE
  1734. MA2 BSS 1 DITTO -A2-
  1735. MB1 BSS 1 DITTO -B1-
  1736. PSPELL BSS 1 MISSPELLING IN THIS PHRASE
  1737. PSPELC BSS 1 CAPITALIZATION ERROR IN PHRASE
  1738. MSPEVER BSS 1 EVER A MISSPELLING
  1739. MCEVER BSS 1 EVER A CAPITALIZATION ERROR
  1740. MBADPH BSS 1 EVER A BAD PHRASE ERROR
  1741. *
  1742. MWORK BSS 2 TWO WORD ECS READ-IN BUFFER
  1743. *
  1744. *
  1745. ENDOV
  1746. * /--- BLOCK MARKUP 00 000 80/03/26 00.13
  1747. TITLE ANSWER MARKUP ROUTINES
  1748. MARKUP OVRLAY
  1749. *
  1750. * TBERRMK = 0 FOR INITIALIZING THE MARKUP
  1751. * = +N FOR ERASING THE MARKUP
  1752. * = -N FOR DELAYED DISPLAY OF THE MARKUP
  1753. *
  1754. *
  1755. SA1 TBERRMK BRANCH TO OPTION
  1756. NZ X1,MARKNZ
  1757. *
  1758. * -ONMARK-
  1759. *
  1760. * THE JUDGE BUFFER SHOULD CONTAIN THE FOLLOWING CODES
  1761. * 0 FOR GOOD WORD
  1762. * 1 FOR UNFOUND WORD (XXX-OUT)
  1763. * 2 FOR NOT IN VOCABULARY (UUU-OUT)
  1764. * 3 FOR MISSPELLED WORD (===-OUT)
  1765. * 4 FOR OUT OF ORDER (MOVE LEFT)
  1766. * 5 FOR MISSPELLED, OUT OF ORDER
  1767. * 6 FOR OUT OF SEQUENCE (INSERT BEFORE)
  1768. * 7 FOR MISPELLED, OUT OF SEQUENCE
  1769. * 8 FOR CAPITALIZATION ERROR
  1770. * 9 FOR BROKEN PHRASE
  1771. * 10 FOR BAD CAPITALIZATION, OUT OF ORDER
  1772. * 11 FOR BAD CAPITALIZATION, OUT OF SEQUENCE
  1773. * 12 FOR WORDS MISSING AT THE END OF ANSWER (SPECIAL CASE)
  1774. * 12 IS EXTRA WORD AT END OF BUFFER
  1775. *
  1776. *
  1777. * CAN USE B4,5,AND 6 SINCE WILL COMPLETELY EXIT NEXT
  1778. *
  1779. *
  1780. SA1 INHIBS CHECK FOR LEFTWARD
  1781. LX1 BCKSHIF
  1782. PL X1,ANNORM
  1783. *
  1784. SA1 ANPL1 MUST PLANT CHANGES FOR LEFTWARDS
  1785. BX6 X1
  1786. SA6 ANTAB+4 MARK 4...OUT OF ORDER
  1787. SA1 ANPL2
  1788. BX6 X1
  1789. SA6 ANTAB+5 MARK 5...OUT OF ORDER, MISSPELLED
  1790. SA1 ANPL3
  1791. BX6 X1
  1792. SA6 ANTAB+10 MARK 10..OUT OF ORDER, BAD CAP
  1793. *
  1794. ANNORM RJ FIRSTXY GET X,Y OF 1ST CHAR IN STU ANS
  1795. SA6 NXSAV SAVE
  1796. SX7 X7-8 SET MARKUP UNDER WORDS
  1797. *
  1798. * SA1 TMARKUY GET PREFERRED Y MARKUP BIAS
  1799. * LX1 48
  1800. *
  1801. SA1 TBWHERE (X1)=12/MARKUP Y BIAS,48/OTHER
  1802. AX1 48 JUST BOTTOM 12 BITS
  1803. IX7 X7+X1
  1804. SA7 NYSAV
  1805. *
  1806. SA1 TBMARG GET CURRENT MARGIN
  1807. BX7 X1
  1808. SA7 MARGSV SAVE FOR LATER RESTORAL
  1809. SA6 A1 AND SET SOFTWARE MARGIN FOR SIMPLOT
  1810. *
  1811. SB4 B0 INITIALIZE TO FIRST WORD
  1812. SA3 JJSBUFA+2 GET TOTAL NUMBER OF WORDS
  1813. SB5 X3
  1814. SB6 JJSBUFA+JJINF GET WORD-INFO LOCATION
  1815. *
  1816. NG X3,ANWBMB
  1817. SX3 X3-JJSENB-1 SEE IF TOO MANY WORDS
  1818. NG X3,ANWORD1 SOMETHING WENT WRONG
  1819. ANWBMB SA1 -1 BOMB OFF HERE
  1820. *
  1821. * /--- BLOCK MARKUP 00 000 76/08/28 05.49
  1822. *
  1823. ANWORD1 SA1 B4+B6 BRING UP NEXT WORD
  1824. ZR X1,ANWORDN SKIP IF NO ERROR
  1825. *
  1826. SA1 NXSAV GET STARTING X AND Y
  1827. SA2 NYSAV
  1828. BX6 X1
  1829. BX7 X2
  1830. SA6 NX
  1831. SA7 NY
  1832. *
  1833. SA2 JJXY+B4 GET ORIGINAL SCREEN POSITION
  1834. MX3 -15
  1835. BX6 -X3*X2 ENDING CHAR
  1836. AX2 15
  1837. BX7 -X3*X2 STARTING CHAR
  1838. SX7 X7-1
  1839. SA7 NCHAR SAVE CHAR BEFORE START
  1840. SA6 ANSSEX SAVE ENDING CHAR NUMBER
  1841. *
  1842. SA1 TBINPUT GET ADDRESS OF STUDENT ANSWER STRING
  1843. SB1 X1
  1844. SB2 NCHAR SET TO NUMBER OF 6 BIT CODES
  1845. RJ SIMPLOT GET NX AND NY TO WHERE THE MARK-UP OCCURS
  1846. *
  1847. SA1 NX
  1848. SA2 NY
  1849. BX6 X1
  1850. BX7 X2
  1851. SA6 NXBEGIN SAVE BEGINNING X
  1852. SA7 NYBEGIN AND Y
  1853. *
  1854. SA1 B4+B6 NOW SEE IF ERROR WITHIN BOUNDS
  1855. NG X1,ANBOMB OR HAS SPECIAL CHARACTER LENGTH
  1856. SB1 X1
  1857. SX1 X1-ANTOT-1
  1858. PL X1,ANBOMB
  1859. JP B1+ANTAB NOW JUMP INTO TABLE
  1860. ANBOMB SA1 -1 BOMB OFF
  1861. *
  1862. ANTAB EQ ANWORDN 0
  1863. + SX6 0
  1864. EQ ANWORD2 1
  1865. + SX6 0
  1866. EQ ANWORD2 2
  1867. + SX6 0
  1868. EQ ANWORD2 3
  1869. + SX6 1
  1870. EQ ANWORD4 4...OUT OF ORDER
  1871. + SX6 0
  1872. EQ ANWORD2 5...OUT OF ORDER AND MISSPELLED
  1873. + SX6 3
  1874. EQ ANWORD4 6...OUT OF SEQUENCE
  1875. + SX6 3
  1876. EQ ANWORD2 7
  1877. + SX6 3
  1878. EQ ANWORD4 8...CAPITALIZATION ERROR
  1879. + SX6 0
  1880. EQ ANWORD2 9
  1881. + SX6 4
  1882. EQ ANWORD4 10...CAP ERROR AND OUT OF ORDER
  1883. + SX6 6
  1884. EQ ANWORD4 11...CAP ERROR AND OUT OF SEQUENCE
  1885. + SX6 2
  1886. EQ ANWORD4 12...SPECIAL INCOMPLETE AT END CASE
  1887. *
  1888. * /--- BLOCK MARKUP 00 000 76/08/27 17.32
  1889. ANWORD2 SA6 EXTRAL STORE COUNT OF ANY EXTRA CHARACTERS
  1890. *
  1891. SA1 NXSAV GET STARTING X AND Y
  1892. SA2 NYSAV
  1893. BX6 X1
  1894. BX7 X2
  1895. SA6 NX
  1896. SA7 NY
  1897. *
  1898. SA6 NXINIT SAVE INITIAL X
  1899. SA1 TBINPUT
  1900. SB1 X1
  1901. SB2 ANSSEX
  1902. RJ SIMPLOT GET TO WHERE MARK-UP ENDS
  1903. SA1 NX
  1904. SA2 NXBEGIN
  1905. IX6 X1-X2
  1906. SA3 INHIBS CHECK FOR LEFTWARD
  1907. LX3 BCKSHIF
  1908. PL X3,ANWD2A
  1909. BX6 -X6
  1910. ANWD2A AX6 3 DIVIDE BY 8 TO GET CHAR COUNT
  1911. SX3 X6-1
  1912. PL X3,ANWORD3
  1913. AX2 3 BEGINNING X CHAR
  1914. SX7 64
  1915. IX7 X7-X2 CHARS TO EDGE
  1916. SA2 NYBEGIN
  1917. SA3 NY
  1918. SX6 1 PRESET TO 1 FOR STRANGE CASES
  1919. IX3 X3-X2
  1920. PL X3,ANWORD4 STRANGE IF SAME LINE OR ABOVE
  1921. BX6 X7 X6 = CHARS TO EDGE
  1922. SA3 NXINIT
  1923. IX7 X1-X3
  1924. AX7 3 CHAR COUNT ON NEXT LINE
  1925. NG X7,ANWORD3 SHOULD BE IMPOSSIBLE
  1926. IX6 X6+X7
  1927. ANWORD3 SA1 EXTRAL ADD ANY EXTRA CHARACTERS
  1928. IX6 X6+X1
  1929. SX1 X6-21 20 CHAR LIMIT
  1930. NG X1,ANWORD4
  1931. SX6 20
  1932. *
  1933. * /--- BLOCK MARKUP 00 000 76/11/01 02.16
  1934. ANWORD4 SX6 X6 CHECK CHAR COUNT REASONABLE
  1935. + PL X6,*+1
  1936. SX6 0
  1937. + SA6 ANSSEX SAVE CHAR COUNT
  1938. SA1 TBERRMK SAVE ERRORS FOR LATER ERASURE
  1939. SX2 X1-8 ONLY SAVE 8 FOR NOW
  1940. PL X2,ANWORDN
  1941. SA2 NXBEGIN GET SCREEN COORDINATES
  1942. SA3 NYBEGIN
  1943. MX6 -9
  1944. BX2 -X6*X2
  1945. BX3 -X6*X3 CHOP TO 9 BITS
  1946. **NXNY FIX HERE
  1947. LX2 9
  1948. BX6 X2+X3
  1949. LX6 6
  1950. SA2 ANSSEX GET LENGTH OF MARK-UP
  1951. BX6 X6+X2
  1952. LX6 6
  1953. SA3 B4+B6 GET TYPE OF MARK-UP
  1954. LX3 1
  1955. SX3 X3-2
  1956. BX6 X6+X3
  1957. LX6 30
  1958. SA6 TBMKBUF+X1
  1959. SX6 X1+1
  1960. SA6 A1 INCREMENT NUMBER OF MARK-UPS
  1961. *
  1962. *
  1963. ANWORDN SB4 B4+1
  1964. GE B5,B4,ANWORD1 THIS INCLUDES ONE EXTRA WORD TO HANDLE
  1965. * THE -MISSING AT END OF ANSWER- CASE
  1966. * WHICH HAS BEEN PROVIDED FOR
  1967. *
  1968. *
  1969. SA1 MARGSV RESTORE MARGIN AS AT START
  1970. BX6 X1
  1971. SA6 TBMARG
  1972. *
  1973. SA1 NXSAV GET X,Y AT STARTING CHARACTER
  1974. SA2 NYSAV
  1975. SA3 TBERRMK AND GET COUNT OF MARKUPS
  1976. ZR X3,ANSOUT JUST EXIT IF NO REAL MARK-UPS
  1977. LX1 39
  1978. LX2 30 NOW HAVE 18 BITS X,Y IN TOP HALF
  1979. BX6 X1+X2
  1980. BX6 X3+X6 COMBINE WITH COUNT IN BOTTOM HALF
  1981. SA1 TSPECS SEE IF -SPECS HOLDMARK-
  1982. LX1 HOLDMK
  1983. PL X1,MARKEM
  1984. BX6 -X6 NEGATE AS FLAG FOR DELAYED DISPLAY
  1985. SA6 A3
  1986. EQ ANSOUT NOW FINISH UP BACK IN FILE ANSWER
  1987. *
  1988. *
  1989. MARKEM SB3 ANSOUT SET TO EXIT TO ANSOUT
  1990. SX5 20000B+WRTCODE SET UP HEADER WORD TO WRITE
  1991. SA6 A3 AND STORE FOR LATER
  1992. EQ MARK5
  1993. *
  1994. ANSSEX BSS 1
  1995. NXINIT BSS 1
  1996. NXBEGIN BSS 1
  1997. NYBEGIN BSS 1
  1998. EXTRAL BSS 1
  1999. NXSAV BSS 1
  2000. NYSAV BSS 1
  2001. MARGSV BSS 1
  2002. * PLANTS FOR LEFTWARD WRITING
  2003. ANPL1 SX6 3 MARK 4...OUT OF ORDER
  2004. EQ ANWORD4
  2005. ANPL2 SX6 2 MARK 5...OUT OF ORDER, MISSPELLED
  2006. EQ ANWORD2
  2007. ANPL3 SX6 6 MARK 10..OUT OF ORDER, BAD CAP
  2008. EQ ANWORD4
  2009. *
  2010. * /--- BLOCK MARKUP 00 000 80/01/16 22.49
  2011. TITLE OFFMARK,MARKUP
  2012. * TAKE OFF OR PUT ON JUDGING MARKUPS
  2013. *
  2014. * TBERRMK IS EXPECTED TO HOLD';
  2015. * BOTTOM 30 BITS = COUNT OF MARKUPS
  2016. * TOP 30 BITS = X,Y OF STARTING CHAR IN STU ANSWER
  2017. *
  2018. * TBMKBUF(8) HOLDS';
  2019. * 18 BITS...X-Y COORDINATE OF START OF MARKUP
  2020. * 6 BITS...LENGTH OF MARKUP
  2021. * 6 BITS...TYPE OF MARKUP
  2022. *
  2023. MARKNZ SA1 TBERRMK GET NUMBER OF MARKUPS
  2024. NG X1,MARK2 SEE IF -MARKUP- COMMAND
  2025. *
  2026. * OFFMARK
  2027. SB3 OFFITR EXIT TO OFFITR
  2028. MX7 0 CLEAR MARKUP OFF SCREEN
  2029. SA7 A1 CLEAR TO ZERO TO FLAG DONE
  2030. BX6 X1
  2031. SX5 20000B+WERCODE SET UP HEADER WORD TO ERASE
  2032. EQ MARK5
  2033. *
  2034. * MARKUP
  2035. MARK2 SB3 PROCESS EXIT TO PROCESS
  2036. BX6 -X1 COMPLEMENT TO GET CORRECT NUMBER OF MARKS
  2037. SA6 A1 AND STORE FOR OFFMARK
  2038. SX5 20000B+WRTCODE SET UP HEADER WORD TO WRITE
  2039. *
  2040. MARK5 SB2 X6 END COUNT IN REG
  2041. SB1 B0 INITIALIZE START REG
  2042. BX0 X6 SAVE STARTING X,Y INFO
  2043. *
  2044. SA4 MOUTLOC DO OVERFLOW TEST OF MOUT BUFFER ONCE
  2045. * LX1 2 NUMBER OF MARKS TIMES 4
  2046. LX6 2 NUMBER OF MARKS TIMES 4
  2047. SX6 X6+B2 TIMES 5...MAXIMUM IN
  2048. * MRKML LOOP
  2049. * IX6 X4+X1
  2050. IX6 X4+X6 ADD TO MOUTLOC
  2051. *PT...THE FOLLOWING OVERFLOW TEST IS WRONG IN THAT IT DOES
  2052. *NOT TAKE INTO ACCOUNT THE OUTPUTW AND OUTP AFTER MARKON
  2053. *NOR THE OUTP AT MRKML.
  2054. * SX7 X6-MOUTLTH SEE IF OVERFLOW OF MOUT BUFFER
  2055. SX7 X6+5-MOUTLTH +5 TAKES CARE OF THE OUTPUTS
  2056. * BEFORE AND AFTER MRKML LOOP
  2057. PL X7,=XERROROF PERHAPS SHOULD PUT A5 BACK ONE
  2058. * AND INTERRUPT INSTEAD SOMEDAY
  2059. * /--- BLOCK MARKUP 00 000 80/01/16 21.13
  2060. *
  2061. * SET RIGHTWARD OR LEFTWARD MARKUPS
  2062. *
  2063. SX3 7040B SET RIGHTWARD...SHIFT-5
  2064. SA1 INHIBS GET LEFTWARD FLAG
  2065. LX1 BCKSHIF
  2066. PL X1,MARKON
  2067. SX3 7034B SET LEFTWARD...SHIFT-1
  2068. SA1 CHGMRK NOW PLANT DIFFERENT MARKS
  2069. BX6 X1
  2070. SA6 MRKXXO+6 MARK 4...OUT OF ORDER
  2071. SA1 A1+1
  2072. BX6 X1
  2073. SA6 MRKXXO+8 MARK 5...OUT OF ORDER, MISSPELL
  2074. SA1 A1+1
  2075. BX6 X1
  2076. SA6 MRKXXO+18 MARK 10..OUT OR ORDER, BAD CAP
  2077. *
  2078. MARKON LX3 48 SHIFT 2 CHARACTERS UP
  2079. SX2 2 2 CHARACTERS
  2080. OUTPUTW
  2081. *
  2082. BX1 X0 GET STARTING X,Y FOR MARGIN SETTING
  2083. AX1 30
  2084. OUTP WFMCODE SET MARGIN FOR FRAMAT
  2085. *
  2086. SX1 3 SET TO OVERSTRIKE WRITE MODE
  2087. OUTP WEFCODE
  2088. * /--- BLOCK MARKUP 00 000 80/01/16 21.14
  2089. *
  2090. MRKML SA3 TBMKBUF+B1 GET NEXT PACKAGE
  2091. LX3 18 GET X-Y COORDINATE
  2092. MX4 42
  2093. BX1 -X4*X3
  2094. OUTP WFCODE
  2095. *
  2096. LX3 6 NOW GET LENGTH OF MARKUP
  2097. MX4 54
  2098. BX2 -X4*X3
  2099. *
  2100. LX3 6 AND TYPE OF MARKUP
  2101. BX3 -X4*X3
  2102. SA3 X3+MRKXXO GET THE PARTICUALAR MARKUP INVOLVED
  2103. *
  2104. SX7 X2-11 SEE IF OVER 10 CHARACTERS
  2105. NG X7,MRKM2
  2106. SX2 10 THEN SET TO 10 CHARACTERS
  2107. *
  2108. SA4 MOUTLOC OUTPUT THE CHARACTERS
  2109. SX6 X4+2 INCREMENT OUTPUT POINTER
  2110. SA6 A4 NO OVERFLOW TESTS MADE
  2111. LX2 24 SHIFT COUNT UP
  2112. BX6 X2+X5 COMBINE WITH HEADER WORD
  2113. SA6 MOUT+X4
  2114. BX6 X3
  2115. SA6 A6+1
  2116. *
  2117. SX2 X7+1
  2118. SA3 A3+1
  2119. *
  2120. MRKM2 SA4 MOUTLOC OUTPUT THE OVER-TEN CHARACTERS
  2121. SX6 X4+2 INCREMENT OUTPUT POINTER
  2122. SA6 A4 NO OVERFLOW TESTS MADE
  2123. LX2 24 SHIFT COUNT UP
  2124. BX6 X2+X5 COMBINE WITH HEADER
  2125. SA6 MOUT+X4
  2126. BX6 X3
  2127. SA6 A6+1
  2128. *
  2129. SB1 B1+1 INCREMENT
  2130. LT B1,B2,MRKML LOOP UNTIL DONE
  2131. *
  2132. *PT...ACTUALLY, THE BELOW SHOULD NOT BE NEEDED WHEN THE
  2133. * SYSTEM HANDLES THE SCREEN MODE AT AN ARROW PROPERLY
  2134. *THE BELOW DOES NOT NECESSARILY SET BACK TO THE ARROW MODE
  2135. *BUT TO THE LAST MODE THE USER SELECTED...PERHAPS IN
  2136. *THE ANSWER OR SPECS CONTINGENCY.
  2137. SA1 TBNARGS SET BACK TO USERS MODE
  2138. AX1 6 EXTRACT THE MODE BITS
  2139. MX0 -3
  2140. BX1 -X0*X1
  2141. OUTP WEFCODE
  2142. *
  2143. JP B3 EXIT
  2144. *
  2145. * /--- BLOCK MARKUP 00 000 76/08/28 08.08
  2146. *
  2147. *
  2148. ANTOT EQU 12 NUMBER OF MARKUPS POSSIBLE
  2149. *
  2150. *1
  2151. MRKXXO VFD 60/10LXXXXXXXXXX EXTRA WORD MARK-UP
  2152. VFD 60/10LXXXXXXXXXX
  2153. *2
  2154. VFD 60/10LUUUUUUUUUU UNRECOGNIZED WORD MARK-UP
  2155. VFD 60/10LUUUUUUUUUU
  2156. *3
  2157. VFD 60/10L========== MISSPELLED WORD MARK-UP
  2158. VFD 60/10L==========
  2159. *4
  2160. VFD 6/KASSIGN,54/0 OUT OF ORDER (LEFT ARROW)
  2161. DATA 0
  2162. *5
  2163. VFD 6/KASSIGN,54/9R========= OUT OF ORDER, MISSPELLED
  2164. VFD 60/10L==========
  2165. *6
  2166. VFD 6/KBKSP,6/KUP,6/1R-,42/0 OUT OF SEQUENCE (DELTA)
  2167. DATA 0
  2168. *7
  2169. VFD 6/KBKSP,6/KUP,6/1R-,42/7R======= OUT OF SEQUENCE, MI
  2170. VFD 60/10L==========
  2171. *8
  2172. VFD 6/ACCESS,6/KUP,6/1RW,42/0 CAPITALIZATION ERR (UP ERR)
  2173. DATA 0
  2174. *9
  2175. VFD 60/10L********** BROKEN PHRASE ERROR
  2176. VFD 60/10L**********
  2177. *10
  2178. VFD 6/ACCESS,6/KUP,6/1RW,6/KASSIGN,36/0 BAD CAP AND ORDER
  2179. DATA 0
  2180. *11
  2181. VFD 6/KBKSP,6/KUP,6/1R-,6/ACCESS,6/KUP,6/1RW,24/0
  2182. DATA 0 OUT OF SEQUENCE AND BAD CAPITALIZATION
  2183. *12
  2184. VFD 6/KUP,6/1R-,48/0 SPECIAL CASE FOR WORDS
  2185. DATA 0 MISSING AT END
  2186. *
  2187. * MARK-UPS TO BE PLANTED FOR -FORCE LEFT- ARROW
  2188. CHGMRK DATA 76700400000000000000B MARK 4...OUT OF ORDER
  2189. DATA 76700454545454545454B MARK 5...OUT OF ORDER, MISSPELL
  2190. DATA 76702776700400000000B MARK 10..OUT OF ORDER,BAD CAP
  2191. *
  2192. ENDOV
  2193. * /--- BLOCK COMPARE 00 000 78/12/19 17.10
  2194. *78/12/19...PT...SOON TO REPLACE THE PREVIOUS TWO BLOCKS
  2195. TITLE COMPARE
  2196. * COMPARE ONE WORD WITH ANOTHER
  2197. * ARG1= FIRST WORD
  2198. * ARG2= SECOND WORD
  2199. * ARG3= RETURN TO USER (-1=NO MATCH,0=PERFECT,
  2200. * +N=SPELLING CRITERION
  2201. *
  2202. * A WORD STOPS CONTENTING UPON REACHING FIRST PUNCTUATION CODE
  2203. *
  2204. COMPOV OVRLAY
  2205. SX6 3 ALWAYS THREE ARGS
  2206. RJ GETCODX GET GETVAR CODES
  2207. SA1 VARBUF
  2208. BX5 X1
  2209. NGETVAR GET FIRST WORD ADDRESS
  2210. SX6 A1
  2211. SA6 VARBUF
  2212. SA1 VARBUF+1
  2213. BX5 X1
  2214. NGETVAR
  2215. SX6 A1 GET SECOND WORD ADDRESS
  2216. SA6 VARBUF+1
  2217. *
  2218. SA1 TJSYM GET NAME OF USERS JUDGING SYMBOL SET
  2219. SA2 CONTAB GET NAME OF SET IN CM
  2220. BX2 X1-X2
  2221. ZR X2,COMPA IF SAME, THE GO ON
  2222. RJ GETJSYM ELSE, READ IN PROPER SET
  2223. *
  2224. COMPA SA1 PRECBUF POINTER TO START OF SPREAD WORD STRING -1
  2225. MX6 0 A1 USED IN CONTENT
  2226. SA6 A1
  2227. MX0 54
  2228. SB1 1
  2229. SB2 10
  2230. SB3 41
  2231. SA2 VARBUF GET FIRST WORD
  2232. SA2 X2 GET STARTING ADDRESS OF CHARACTERS
  2233. COMPL LX2 6 UNPACK
  2234. BX6 -X0*X2
  2235. ZR X6,COMPD SEE IF DONE
  2236. SB3 B3-B1
  2237. ZR B3,COMPERR DO NOT OVERFLOW CHARACTER BUFFER
  2238. SA6 A6+B1
  2239. SB2 B2-B1
  2240. NZ B2,COMPL
  2241. *
  2242. SX7 B3 SAVE END TEST
  2243. SA0 A2 DO BOUNDS TEST ON NEXT WORD
  2244. SX1 2
  2245. RJ BOUNDS
  2246. *
  2247. SB3 X7 RESTORE END TEST
  2248. SB1 1 BOUNDS DESTROYED B1
  2249. SB2 10
  2250. SA2 A2+B1
  2251. EQ COMPL LOOP THROUGH ALL WORDS
  2252. *
  2253. COMPD MX6 0 CLEAR ONE EXTRA WORD IN CHARACTER BUFFER
  2254. SA6 A6+B1
  2255. SA6 FONTFLG CLEAR CONTENT FONT
  2256. SA6 CSSPERM CLEAR CONTENT SUP/SUB
  2257. RJ CONTENT CONTENT THE WORD
  2258. ZR X7,COMPERR TEST FOR SOMETHING THERE
  2259. SA6 CWD1A SAVE
  2260. SA7 CWD1B
  2261. *
  2262. SA1 PRECBUF POINTER TO START OF SPREAD WORD STRING -1
  2263. MX6 0 A1 USED IN CONTENT
  2264. SA6 A1
  2265. MX0 54
  2266. SB1 1
  2267. SB2 10
  2268. SB3 41
  2269. SA2 VARBUF+1 GET SECOND WORD
  2270. SA2 X2 GET STARTING ADDRESS OF CHARACTERS
  2271. COMPL1 LX2 6 UNPACK
  2272. BX6 -X0*X2
  2273. ZR X6,COMPD1 SEE IF DONE
  2274. * /--- BLOCK COMPARE 00 000 78/12/19 17.10
  2275. SB3 B3-B1
  2276. * /--- BLOCK COMPARE 00 000 78/12/19 17.11
  2277. ZR B3,COMPERR DO NOT OVERFLOW CHARACTER BUFFER
  2278. SA6 A6+B1
  2279. SB2 B2-B1
  2280. NZ B2,COMPL1
  2281. *
  2282. SX7 B3 SAVE END TEST
  2283. SA0 A2 DO BOUNDS TEST ON NEXT WORD
  2284. SX1 2
  2285. RJ BOUNDS
  2286. *
  2287. SB3 X7 RESTORE END TEST
  2288. SB1 1 BOUNDS DESTROYED B1
  2289. SB2 10
  2290. SA2 A2+B1
  2291. EQ COMPL1 LOOP THROUGH ALL WORDS
  2292. *
  2293. COMPD1 MX6 0 CLEAR ONE EXTRA WORD IN CHARACTER BUFFER
  2294. SA6 A6+B1
  2295. SA6 FONTFLG CLEAR CONTENT FONT
  2296. SA6 CSSPERM CLEAR CONTENT SUP/SUB
  2297. RJ CONTENT CONTENT THE WORD
  2298. ZR X7,COMPERR TEST FOR SOMETHING THERE
  2299. SA6 CWD1C SAVE STUDENT WORD
  2300. SA7 CWD1D AND HASH
  2301. *
  2302. SA1 TSPECS MUST CLEAR (AND RESTORE) ALL
  2303. BX6 X1 SPECS FLAGS SINCE CKWORDX USES
  2304. SA6 COMPSS IT...BUT BITS ARE NOT APPROPRIATE FOR
  2305. MX6 0 NOW MAKE SURE ALL SPECS FLAGS = 0
  2306. SA6 A1
  2307. * FOR -COMPARE-
  2308. *
  2309. SA1 CWD1C GET INFO ON STUDENT WORD
  2310. SA2 CWD1D
  2311. * NEED -CWD1C,D- SINCE CONTENT MAY
  2312. * SAVE AND RESTORE -A-REGISTERS
  2313. SA3 CWD1A GET INFO ON AUTHOR WORD
  2314. SA4 CWD1B AND HASH
  2315. *
  2316. RJ CKWORDX NOW COMPARE THE TWO WORDS
  2317. *
  2318. SA1 COMPSS NOW RESTORE -SPECS- FLAGS
  2319. BX7 X1
  2320. SA7 TSPECS
  2321. *
  2322. COMPDN MX7 0 CLEAR ALL JUDGING FLAGS
  2323. NG X6,COMPDZ SEE IF NO MATCH
  2324. ZR X6,COMPDZ SEE IF PERFECT MATCH
  2325. *
  2326. MX7 1
  2327. SX1 X6-3 SEPARATE CAPITAL ERROR FROM SPELLING ERROR
  2328. NG X1,COMPDCP
  2329. LX7 60-JFSPELL SET SPELL BIT
  2330. EQ COMPDZ
  2331. *
  2332. COMPDCP LX7 60-JFCAP SET CAP BIT
  2333. *
  2334. COMPDZ SA7 TJFLAGS SET JUDGING FLAGS WORD
  2335. *
  2336. SA1 VARBUF+2
  2337. BX5 X1
  2338. NPUTVAR STORE X6 RESULT IN USER VAR
  2339. EQ PROCESS
  2340. *
  2341. COMPERR SX6 -1
  2342. EQ COMPDN
  2343. *
  2344. PRECBUF BSS 42 THE SPREAD CHARACTER STRINGS
  2345. CWD1A BSS 1 CONTENT PART OF STUDENT WORD
  2346. CWD1B BSS 1 HASH PART
  2347. CWD1C BSS 1 CONTENT PART OF STUDENT WORD
  2348. CWD1D BSS 1 HASH PART
  2349. COMPSS BSS 1 SAVE SPECS OVER CALL TO CKWORDX
  2350. *
  2351. ENDOV
  2352. * /--- BLOCK ENDOV 00 000 76/05/17 12.53
  2353. *
  2354. *
  2355. OVTABLE
  2356. *
  2357. *
  2358. END ANSW1$
plato/source/plaopl/answ1.txt ยท Last modified: 2023/08/05 18:54 by Site Administrator