Table of Contents

ANSWER

Table Of Contents

  • [00005] ANSWER ROUTINES
  • [00048] ANS-EXTERNALS
  • [00102] EXACT
  • [00206] EXACTV
  • [00245] ANSKEY MACHINERY
  • [00274] ANSV/WRONGV
  • [00297] OK (NO, IGNORE, REGSTATE)
  • [00340] WORDGET
  • [00435] GETJSYM
  • [00470] ANSEND
  • [00547] ANSMARK
  • [00643] AEND
  • [00775] WORD-CHECK
  • [01050] OVERLAYS

Source Code

ANSWER.txt
  1. ANSWER
  2. * /--- FILE TYPE = E
  3. * /--- BLOCK ANSWER 00 000 76/06/17 02.37
  4. IDENT ANSWER
  5. TITLE ANSWER ROUTINES
  6. *
  7. * GET COMMON SYMBOL TABLE
  8. *
  9. CST
  10. *
  11. * /--- BLOCK NOTES 00 000 75/10/14 00.26
  12. * JJSBUF A CONTAINS...
  13. *
  14. * O=STUDENT CRITERION
  15. * 4 FOR EACH KEYWORD SPELLED CORRECTLY IN ORDER
  16. * 3 FOR EACH KEYWORD SPELLED CORRECTLY OUT OF ORDER
  17. * 2 FOR EACH KEYWORD MISSPELLED BUT IN ORDER
  18. * 1 FOR EACH KEYWORD MISSPELLED AND OUT OF ORDER
  19. *
  20. * 1=NUMBER OF AUTHOR KEYWORDS
  21. *
  22. * 2=NUMBER OF STUDENT WORDS (CONTENT MAY EXCEED CONCEPT)
  23. *
  24. * 3=BAD BITS
  25. * 1 SET FOR MISSPELLED WORDS
  26. * 2 SET FOR WORDS OUT OF ORDER
  27. * 3 SET FOR EXTRA WORDS
  28. * 4 SET FOR INCOMPLETE ANS
  29. * 5 SET FOR NOT-IN-VOCABULARY
  30. *
  31. * 5=BITS SET BY SPECS COMMAND (WHICH SEE)
  32. *
  33. * 11+ = JUDGEMENT ON EACH OF THE STUDENT WORDS
  34. * DIVIDED INTO BITS AS FOLLOWS...
  35. * TOP BIT SET FOR MISSPELLING
  36. * NEXT 29 BITS HOLD AUTHOR KEYWORD COUNT
  37. * BOTTOM 30 BITS HOLD AUTHOR WORD TYPE
  38. * 1=SINGLE KEYWORD
  39. * 2=FIRST OF SYNONYMOUS KEYWORD
  40. * 3=REST OF SYNONYMOUS KEYWORDS
  41. * 4=KEYWORD LIST
  42. * 5=KEYWORD LIST
  43. * 6=EXTRA WORD
  44. * 7=EXTRA LIST
  45. *
  46. *
  47. * /--- BLOCK EXTERNALS 00 000 77/07/20 15.15
  48. TITLE ANS-EXTERNALS
  49. *
  50. EXT CONTENT,CFIRST,FONTFLG,CONTAB,CONTEST IN -CONTEN-
  51. EXT CSSPERM IN -CONTEN-
  52. EXT PROCESS
  53. EXT EXIT (FILE LOGICX)
  54. EXT EXECUTX (FILE LOGICX)
  55. EXT OKNOOUT
  56. EXT UNJOIN1,UNJOIN,GOTOX
  57. EXT NGETVAR -GETVAR- CODE INTERPRETER (FILE GETVAR)
  58. EXT ECSPRTY
  59. EXT WORDS CALLED WITH CHAR COUNT (EXEC1)
  60. EXT BOUNDS CALLED WITH WORD COUNT (EXEC1)
  61. EXT ERXBADL (EXEC2)
  62. EXT EQTOLER (FILE GETVAR)
  63. EXT JOINX (FILE EXEC3)
  64. EXT JEXITX (FILE EXEC1)
  65. EXT FFERA (FILE LOGICX)
  66. * /--- BLOCK NEXACTC 00 000 76/08/13 04.58
  67. NEXACTC TITLE NEW EXACTC WITH UNIVERSAL SEPARATOR
  68. *** NEW EXACTC WITH UNIVERSAL TERMINATOR
  69. *
  70. *
  71. ENTRY NEXACTX
  72. NEXACTX NGETVAR ROUNDS TO INTEGER IN X1
  73. PL X1,NEXC1
  74. ZR X1,NEXC1 TREAT -0 AS 0
  75. SX1 -1 IF NEGATIVE, MAKE -1
  76. NEXC1 SX0 1
  77. IX1 X1+X0 ADJUST VALUE TO RANGE FROM 0 TO N-1
  78. SA5 A5 RETRIEVE COMMAND WORD
  79. MX0 48 X0 = MASK TO LIMIT INFO TO 12 BITS
  80. AX5 XCMNDL
  81. BX2 -X0*X5 X2 = NUMBER OF ENTRIES IN TABLE
  82. AX5 12
  83. BX3 -X0*X5 X3 = RELATIVE START OF TABLE
  84. SB2 B5+X3 B2 = ABSOLUTE START OF TABLE
  85. IX3 X1-X2 SEE IF NUMBER IN BOUNDS
  86. NG X3,NEXC2 IF OK
  87. SX1 X2-1 ELSE SET FOR LAST ENTRY
  88. NEXC2 LX1 59 TOP BIT 0/1 FOR UPPER/LOWER
  89. SB3 X1
  90. SA3 B2+B3 X2 = TABLE WORD
  91. MX0 30
  92. PL X1,NEXC3 UPPER OR LOWER
  93. LX3 30
  94. NEXC3 BX3 X0*X3 CLEAR BOTTOM OF WORD
  95. LX3 12 GET RELATIVE START OF TEXT
  96. SA2 B5+X3 X2 = 1ST CHARACTERS OF AUTHORS ANSWER
  97. BX3 X0*X3 CLEAR LOWER PORTION OF WORD
  98. LX3 12
  99. SX1 X3 NUMBER OF AUTHOR CHARACTERS
  100. EQ EXACTER GO TO COMMON PROCESS
  101. * /--- BLOCK EXACT 00 000 74/10/21 21.31
  102. TITLE EXACT
  103. * EXACT STRING MATCH JUDGING ROUTINE.
  104. *
  105. *
  106. ENTRY EXACTCX THE CONDITIONAL EXACT COMMAND
  107. *
  108. EXACTCX NGETVAR ROUNDS TO INTEGER IN X1
  109. PL X1,EXC1
  110. ZR X1,EXC1 TREAT -0 AS 0
  111. SX1 -1 IF NEGATIVE, MAKE -1
  112. EXC1 SX0 1
  113. IX1 X1+X0 ADJUST VALUE TO RANGE FROM 0 TO N-1
  114. SA5 A5 RETRIEVE COMMAND WORD
  115. MX0 48 X0 = MASK TO LIMIT INFO TO 12 BITS
  116. AX5 XCMNDL
  117. BX2 -X0*X5 X2 = NUMBER OF ENTRIES IN TABLE
  118. AX5 12
  119. BX3 -X0*X5 X3 = RELATIVE START OF TABLE
  120. SB2 B5+X3 B2 = ABSOLUTE START OF TABLE
  121. IX3 X1-X2 SEE IF NUMBER IN BOUNDS
  122. NG X3,EXC2 JUMP IF OK
  123. SX1 X2-1 ELSE SET FOR LAST ENTRY
  124. EXC2 LX1 59 TOP BIT 0/1 FOR UPPER/LOWER
  125. SB3 X1
  126. SA3 B2-B3 X2 = TABLE WORD
  127. MX0 30
  128. PL X1,EXC3 UPPER OR LOWER
  129. LX3 30
  130. EXC3 BX3 X0*X3 CLEAR BOTTOM OF WORD
  131. LX3 12 GET RELATIVE START OF TEXT
  132. SA2 B5+X3 X2 = 1ST CHARACTERS OF AUTHORS ANSWER
  133. BX3 X0*X3
  134. LX3 6 GET SHIFT TO FIRST CHARACTERS
  135. SB2 X3
  136. LX2 X2,B2 SHIFT TO THE FIRST CHARACTER
  137. BX3 X0*X3
  138. LX3 4 GET CHARACTERS IN REMAINING WORDS
  139. SB2 X3 GET CHARACTERS IN FIRST WORD
  140. BX3 X0*X3
  141. LX3 8 GET COUNT IN REMAINING WORDS
  142. SX1 X3+B2 GET TOTAL AMOUNT OF CHARACTERS
  143. EQ EXACT0
  144. *
  145. *
  146. ENTRY EXACTX
  147. *
  148. EXACTX MX0 18 X0 = MASK TO EXTRACT 18 BITS
  149. LX5 18
  150. BX1 X0*X5
  151. LX1 18 X1 = AUTHOR CHARACTER COUNT
  152. LX0 18
  153. BX2 X0*X5 X2 = INDEX TO START OF INFO
  154. SA2 B5+X2 A2 = AUTHOR WORD INDEX
  155. * /--- BLOCK EXACTER 00 000 76/10/01 03.59
  156. *
  157. *
  158. * -EXACTV- ENTRY POINT
  159. *
  160. EXACTER SB2 10 B2 = CHARS LEFT IN WORD
  161. *
  162. * AT -EXACT0- THE FOLLOWING REGISTERS SHOULD HOLD
  163. *
  164. * X1 = TOTAL AUTHOR CHARACTER COUNT
  165. * A2 = ADDRESS OF AUTHOR CHARACTERS
  166. * X2 = FIRST AUTHOR CHARACTERS (LEFT JUSTIFIED)
  167. * B2 = COUNT OF CHARACTERS IN FIRST AUTHOR WORD
  168. *
  169. EXACT0 SA3 TANSCNT INCREMENT ANSCNT
  170. SX7 X3+1
  171. SA7 A3
  172. MX0 -6 X0 = MASK TO EXTRACT 6 BITS
  173. SA3 TJCOUNT X3 = STUDENT CHARACTER COUNT
  174. SB3 X3 B3 = CHAR END TEST
  175. IX6 X1-X3 X6 = DIFFERENCE IN COUNTS
  176. NG X6,PROCESS --- EXIT IF MORE STUDENT CHARS
  177. ZR X3,EXACT2 JUMP IF NO STUDENT CHARS
  178. SB1 1
  179. SA1 JUDGE-1 A1 = STUDENT CHAR INDEX
  180. *
  181. EXACT1 LX2 6
  182. BX3 -X0*X2
  183. SA1 A1+B1 X1 = NEXT STUDENT CHAR
  184. BX4 X1-X3
  185. NZ X4,PROCESS --- EXIT IF NO MATCH
  186. SB2 B2-B1 DECREMENT CHARS/WORD SWITCH
  187. SB3 B3-B1 DECREMENT CHAR END TEST
  188. ZR B3,EXACT2 JUMP IF ALL ACCOUNTED FOR
  189. NZ B2,EXACT1
  190. SA2 A2+1 X2 = NEXT AUTHOR WORD
  191. SB2 10
  192. EQ EXACT1
  193. *
  194. EXACT2 ZR X6,EXACTOK OK IF COUNTS ARE EQUAL
  195. NZ B2,EXACT3
  196. SA2 A2+1 LOAD NEXT AUTHOR WORD
  197. EXACT3 LX2 6 GET NEXT AUTHOR CHAR
  198. BX3 -X0*X2
  199. NZ X3,PROCESS --- EXIT IF NOT A ZERO CHAR
  200. *
  201. EXACTOK SB7 XANSC SET TO ANS-C
  202. SX6 -1
  203. SA6 TJUDGED SET JUDGMENT=OK
  204. EQ PROCESS --- EXIT TO DO ANS-C
  205. * /--- BLOCK EXACTV 00 000 78/12/31 02.43
  206. TITLE EXACTV
  207. * -EXACTV- (CODE=136)
  208. *
  209. * EXACT MATCH AGAINST CHARACTER STRING STORED
  210. * IN TUTOR VARIABLES. 1ST TAG ENTRY SPECIFIES
  211. * THE STARTING VARIABLE AND THE 2ND THE NUMBER
  212. * OF CHARACTERS.
  213. *
  214. *
  215. ENTRY EXACTVX
  216. *
  217. EXACTVX NGETVAR A1 = STARTING ADDRESS
  218. SX6 A1 SAVE ADDRESS
  219. SA6 EXVSAVE
  220. BX6 X1
  221. SA6 EXVVAL SAVE VALUE IN CASE LITERAL
  222. SA5 A5 RETRIEVE ORIGINAL COMMAND WORD
  223. LX5 XCODEL
  224. NGETVAR X1 = NUMBER OF CHARACTERS
  225. SX1 X1+0 TO CATCH SOME WEIRD BIG NUMBERS
  226. NG X1,ERXBADL --- ERROR EXIT IF NEGATIVE
  227. * EXECERR USES X1
  228. SX2 X1-11 SEE IF ONLY 1 WORD (10 CHARS)
  229. PL X2,EXVX1
  230. SA0 EXVVAL SET ADDRESS
  231. EQ EXVX2
  232. *
  233. EXVX1 SA2 EXVSAVE GET ADDRESS FOR BOUNDS CHECK
  234. SA0 X2
  235. RJ WORDS BOUNDS CHECK--ERRORS DO NOT RETURN
  236. *
  237. EXVX2 SA2 A0 A2 = STARTING ADDRESS
  238. EQ EXACTER --- NOW TREAT LIKE EXACT
  239. *
  240. *
  241. ENTRY EXVSAVE
  242. EXVSAVE BSS 1
  243. EXVVAL BSS 1 VALUE SAVED FOR LITERALS
  244. * /--- BLOCK ANSKEY 00 000 76/04/18 04.44
  245. TITLE ANSKEY MACHINERY
  246. * FOR NOW, ONLY BLANK -ANS- COMMAND. MUST BE FIRST
  247. * JUDGING COMMAND AFTER ARROW, AT WHICH POINT IT SETS
  248. * THE -ANS- KEY BIT IN NEXTKEYS, SIMILAR TO -JKEY ANS-.
  249. * AT JUDGING TIME IT TERMINATES JUDGING IF THE KEY IS ANS.
  250. *
  251. EXT UNITAX1
  252. ENTRY PANSKEY
  253. ENTRY ANSKEYX
  254. *
  255. PANSKEY SX7 1
  256. LX7 59-ANS+FUNKEY
  257. SA1 TJKEYS
  258. BX7 X1+X7 MERGE ANS BIT INTO NXTKEYS
  259. SA7 A1
  260. EQ UNITAX1
  261. *
  262. ANSKEYX SA1 TANSCNT INCREMENT ANSCNT
  263. SX7 X1+1
  264. SA7 A1
  265. SA1 KEY CHECK FOR ANS KEY
  266. SX1 X1-ANS
  267. NZ X1,PROCESS SKIP IF NOT ANS KEY
  268. SB7 XANSC IF ANS KEY, END JUDGING
  269. MX7 59
  270. SA7 TJUDGED SET TO OK JUDGEMENT
  271. EQ PROCESS
  272. *
  273. * /--- BLOCK ANSV/WRNGV 00 000 74/07/09 11.17
  274. TITLE ANSV/WRONGV
  275. *
  276. * NUMERICAL ANSWER IS SPECIFIED BY VARIABLE
  277. * (EXPRESSION) AND TOLERANCE (ABSOLUTE OR PERCENT)
  278. *
  279. *
  280. ENTRY WRONGVX
  281. *
  282. WRONGVX SX7 0
  283. SA7 ANSVJ SET FOR NO (SPECIFIC)
  284. EQ ANSVX1
  285. *
  286. *
  287. ENTRY ANSVX
  288. *
  289. ANSVX SX7 -1
  290. SA7 ANSVJ SET FOR OK
  291. ANSVX1 EXEC ANS1,ANSVOV
  292. *
  293. ENTRY ANSVJ
  294. ANSVJ BSS 1
  295. *
  296. *
  297. TITLE OK (NO, IGNORE, REGSTATE)
  298. * OK/NO/IGNORE/REGSTATE (CODE=127)
  299. *
  300. EXT JIGNRX
  301. ENTRY OKX
  302. OKX SB7 XANSC SET TO ANS-CONTINGENCY
  303.  
  304. * CHECK FOR -REGSTATE- COMMAND.
  305.  
  306. AX5 XCMNDL SHIFT OUT COMMAND
  307. SX6 X5-4 4 = -REGSTATE- CODE
  308. ZR X6,PROCESS IF -REGSTATE- COMMAND
  309.  
  310. * INCREMENT *ANSCNT* FOR -OK-, -NO-, AND -IGNORE-.
  311.  
  312. SA1 TANSCNT
  313. SX7 X1+1
  314. SA7 A1
  315.  
  316. * CHECK FOR -NO- AND -IGNORE- COMMANDS.
  317.  
  318. SX6 X5-2
  319. ZR X6,NOX IF -NO- COMMAND
  320. PL X6,JIGNRX IF -IGNORE- COMMAND
  321.  
  322. * PROCESS -OK- COMMAND.
  323.  
  324. SA6 TJUDGED SET JUDGMENT=OK
  325. EQ NOXC
  326.  
  327. * PROCESS -NO- COMMAND - JUDGEMENT = NO.
  328.  
  329. NOX SX6 1
  330. SA6 TJUDGED SET JUDGMENT=NO (UNIVERSAL)
  331.  
  332. NOXC RJ CRISET SET ALL TRUTH FLAGS
  333. SA1 A0 SEE IF CRITERION ZERO (NOTHING MATCHED)
  334. NZ X1,PROCESS THEN LEAVE FLAG IN ERROR
  335. SX6 -1 ELSE SET FLAG TO NO ERROR
  336. SA6 TANSOK THUS AUTHOR CAN CHECK FOR A PARTIAL
  337. EQ PROCESS MATCH TO A PREVIOUS ANSWER
  338. *
  339. * /--- BLOCK WORDGET 00 000 76/06/29 01.51
  340. TITLE WORDGET
  341. *
  342. * WORDGET CONVERTS THE STUDENT ANSWER INTO A LIST
  343. * OF CONTENT WORDS STORED IN JJSBUF.
  344. *
  345. * JJXY HOLDS CHAR COUNT INFO AS FOLLOWS--
  346. * 15 BITS...STARTING INDEX IN JUDGE BUFFER
  347. * 15 BITS...ENDING INDEX IN JUDGE BUFFER
  348. * 15 BITS...STARTING COUNT IN ORIGINAL INPUT BUFFER
  349. * 15 BITS...ENDING COUNT IN ORIGINAL INPUT BUFFER
  350. *
  351. *
  352. ENTRY WORDGET
  353. *
  354. WORDGET EQ *
  355. *
  356. SA3 TANSCNT INCREMENT ANSWER COUNTER
  357. SX7 X3+1
  358. SA7 A3
  359. *
  360. SA1 JJFBUF SEE IF ALREADY -CONTENTED-
  361. NZ X1,WORDGET
  362. MX6 1 SET FLAG
  363. SA6 A1
  364. *
  365. BX6 X5 SAVE X5 (CANNOT JUST SA5 A5...ANSWERC)
  366. SA6 WGSAVE
  367. *
  368. SA1 TJSYM GET NAME OF USERS JUDGING SYMBOLS
  369. SA2 CONTAB GET NAME OF CURRENT SET IN CM
  370. BX3 X1-X2
  371. ZR X3,WDGT3 SKIP LOADING IF SET ALREADY IN
  372. RJ GETJSYM LOAD USERS (OR SYSTEM) JUDGING SYMBOLS
  373. *
  374. WDGT3 MX6 0
  375. SA6 TWCOUNT INITIALIZE TO ZERO WORDS
  376. SA6 JJXCON SET TO NOT CONCEPTED
  377. SA6 FONTFLG SET TO NO FONT YET
  378. SA6 CSSPERM SET TO STANDARD LEVEL (NO SUP/SUB)
  379. SA1 JJPREJ INITIALIZE A1 TO CHARACTER STRING ADRESS-1
  380. *
  381. * /--- BLOCK WORDGET 00 000 76/03/03 11.38
  382. *
  383. *
  384. WDLOOP RJ CONTENT GET NEXT WORD
  385. ZR X7,WDDN SEE IF ANYTHING THERE
  386. *
  387. SA2 TWCOUNT GET NUMBER OF WORDS
  388. SX3 X2-JJSENB+1 TEST FOR BUFFER OVERFLOW
  389. * THE +1 THEN ALLOWS FOR THE SPECIAL CASE OF
  390. * HAVING TO GIVE ONE EXTRA MARK-UP FOR
  391. * A MISSING WORD AT END OF ANSWER
  392. *
  393. PL X3,AWWERR
  394. SA6 JJSBUF+X2 STORE CONTENT PART OF WORD
  395. SA7 JJHBUF+X2 STORE HASH PART OF WORD
  396. *
  397. SA3 CFIRST GET ADDRESS OF FIRST CHARACTER IN WORD
  398. SB1 JUDGE
  399. SB2 X3
  400. SB2 B2-B1 GET RELATIVE ADDRESS OF FIRST CHAR
  401. SA3 JJCHAR+B2 GET COUNT IN ORIGINAL BUFFER
  402. SX6 B2
  403. LX6 45
  404. LX3 15
  405. BX6 X6+X3 NOW HAVE FIRST CHAR TAKEN CARE OF
  406. *
  407. SB2 A0-B1 GET RELATIVE ADDRESS OF CURRENT LAST CHARAC
  408. SA3 JJCHAR+B2 GET COUNT IN ORIGINAL CHAR STRING
  409. SX4 B2
  410. LX4 30
  411. BX6 X6+X4
  412. BX6 X6+X3
  413. SA6 JJXY+X2 STORE AWAY PACKED INFO
  414. *
  415. SX7 X2+1 INCREMENT WORD COUNT
  416. SA7 A2 STORE INTO -TWCOUNT-
  417. *
  418. WDDN NZ X1,WDLOOP LOOP UNTIL DONE
  419. SA3 WGSAVE RESTORE X5
  420. BX5 X3
  421. EQ WORDGET
  422. *
  423. WGSAVE BSS 1 SAVE X5 OVER CALLS TO CONTENT
  424. *
  425. *
  426. *
  427. * IF STUDENT TYPES IN OVER JJSENB-1 ENTITIES...GIVE -NO- EXIT
  428. AWWERR SB7 XANSC SET TO ANSWER-CONTINGENCY
  429. SX6 -2
  430. SA6 TANSCNT COUNT OF ANSWER COMMANDS TO -1 (ONLY PLACE)
  431. SX6 1
  432. SA6 TJUDGED SET TO UNIVERSAL -NO-
  433. EQ ANSMARK AND STOP JUDGING
  434. * /--- BLOCK GETJSYM 00 000 78/02/13 17.27
  435. TITLE GETJSYM
  436. *
  437. * GET THE USERS (OR SYSTEMS) JUDGING SYMBOL SET IN CM
  438. *
  439. ENTRY GETJSYM USED BY -WORDGET,COMPARE-
  440. GETJSYM EQ *
  441. SA1 TJSYM GET NAME OF USERS SET
  442. SA2 CONTEST GET NAME OF SYSTEM SET
  443. BX3 X1-X2
  444. ZR X3,GETSYM5 SPECIAL IF SYSTEM SET
  445. *
  446. SX2 JSYMNUM SEE IF USER HAS OWN JUDGING SYMBOL TABLE
  447. SA3 ECSULOC GET ECS ADDRESS OF -ULOC- TABLE
  448. IX0 X2+X3 ADD DUMMY UNIT NUMBER PLUS BIAS
  449. SA0 TJSYM WORK BUFFER
  450. + RE 1 READ IN
  451. RJ ECSPRTY
  452. SA1 A0 READ UP
  453. ZR X1,GETSYM5 IF ZERO, SET UP FOR SYSTEM TABLE
  454. AX1 60-ULOC1 CLEAR OFF ALL BUT ECS BIAS BITS
  455. SA4 ECSLES GET ECS ADDRESS OF LESSON
  456. IX0 X4+X1 GET ABSOLUTE ADDRESS OF USER TABLES
  457. EQ GETSYM7
  458. *
  459. GETSYM5 SA1 ACONTAB GET ECS ADDRESS OF SYSTEM SET
  460. BX0 X1
  461. *
  462. GETSYM7 SA0 CONTAB GET CM ADDRESS OF SET
  463. + RE 129 READ SET IN
  464. RJ ECSPRTY
  465. SA1 A0 MAKE SURE USERS FLAG HAS PROPER NAME
  466. BX6 X1
  467. SA6 TJSYM
  468. EQ GETJSYM
  469. * /--- BLOCK ANSEND 00 000 80/08/04 20.52
  470. TITLE ANSEND
  471. *
  472. * 'THIS IS THE ENTRY POINT FOR -UNIT- OR -ARROW-
  473. * COMMANDS THAT ARE ENCOUNTERED IN JUDGE-C.
  474. * 'SWITCH TO ANS-C AND DO ANY SPECS CONTINGENCY.
  475. *
  476. *
  477. ENTRY ANSEND
  478. *
  479. ANSEND CALL ARESET RESTORE SIZE,ROTATE,COLOR
  480. SA1 TBITS SEE IF -ERASEU- BIT SET
  481. LX1 ERSUBIT
  482. NG X1,AERSU
  483. *
  484. SA2 TSPECS GET LAST SPECS
  485. BX0 X2 INTO X0 (FOR ATT1)
  486. *
  487. SX6 1
  488. SA6 TJUDGED SET JUDGMENT=NO (UNIVERSAL)
  489. SB7 XANSC SET TO ANS-C
  490. SX6 -1
  491. SA6 TANSCNT SET ANSCNT TO -1
  492. RJ CRISET
  493. SA4 TSPLOC SEE IF SPECS COMMAND
  494. ZR X4,ANSM1 IF NONE, ON TO MARKUP
  495. ATSPEC MX7 0
  496. SA7 JOIN CLEAR JOIN LIST
  497. SA7 A4 CLEAR SPECS POINTER
  498. SA1 TLVLESS X1 = LV STACK POINTER
  499. ZR X1,UNJOIN1 IF NO LVARS, NO PROBLEM
  500. *
  501. CALL LVLOAD,-1 UNLOAD LOCAL VARIABLES
  502. SA1 TLVLESS RESTORE ARROW LVAR STACK PTR
  503. AX1 18
  504. LX1 18
  505. SA2 AJOIN
  506. AX2 18
  507. BX6 X1+X2
  508. SA6 A1
  509. EQ UNJOIN1 UNJOIN TO SPECS
  510. *
  511. * /--- BLOCK ANSEND 00 000 80/08/04 22.57
  512. *
  513. CRISET EQ * SET ALL TRUTH FLAGS FOR ANSWER
  514. MX6 0 SET -ANSOK- TRUTH FLAG TO FALSE(BAD)
  515. SA6 TANSOK
  516. *
  517. SA0 JJSBUFA SET TO JUDGING BUFFER
  518. *
  519. SA1 A0 SEE IF CRITERION ZERO
  520. ZR X1,AT1
  521. SA1 A0+3 SET CALC TRUTH FLAGS DEPENDENT ON BAD BITS
  522. BX6 X1
  523. SA6 TJFLAGS SET USER FLAG WORD
  524. EQ CRISET
  525. *
  526. AT1 MX6 0 BE SURE ALL FLAGS UNSET
  527. SA6 TJFLAGS
  528. EQ CRISET
  529. *
  530. *
  531. * 'ROUTINE TO RESTORE ARROW ASSOCIATED PARAMETERS
  532. * (ALSO USED BY JUDGE IGNORE AND JUDGE EXIT IN
  533. * FILE EXEC1).
  534. *
  535. *
  536. ENTRY ARESET
  537. *
  538. ARESET EQ *
  539. SA1 TBSIZE RESTORE ARROW SIZE AND ROTATE
  540. SA2 TBROTATE
  541. BX6 X1
  542. BX7 X2
  543. SA6 RSIZE
  544. SA7 ROTATE
  545. EQ ARESET --- EXIT
  546. * /--- BLOCK ANSMARK 00 000 80/08/04 20.53
  547. TITLE ANSMARK
  548. *
  549. * 'THIS IS THE ENTRY POINT FOR ALL JUDGING
  550. * COMMANDS WHEN ENCOUNTERED IN ANS-C.
  551. *
  552. ENTRY ANSMARK
  553. *
  554. *
  555. ANSMARK CALL ARESET RESTORE SIZE,ROTATE,COLOR
  556. SA1 TBITS SEE IF -ERASEU- BIT SET
  557. LX1 ERSUBIT
  558. NG X1,AERSU
  559. SA4 TSPLOC CHECK WHETHER THERE ARE SPECS TO DO
  560. NZ X4,ATSPEC JUMP TO DO SPECS COMMANDS
  561. *
  562. *
  563. ANSM1 SA1 TLVLESS RESTORE LV STACK POINTER
  564. ZR X1,ANSM2
  565. *
  566. SB1 -1 UNLOAD LOCAL VARS
  567. RJ =XLVLOAD
  568. ANSM2 SA1 TBITS
  569. LX1 JUDGBIT
  570. NG X1,JOVER --- JUMP IF JARROW TYPE JUDGING
  571. *
  572. SA1 TJUDGED
  573. ZR X1,ANSOUT EXIT IF -NO- JUDGEMENT (MATCH A WRONG ANS)
  574. NG X1,ATT2 TEST FOR PERFECT ANSWER
  575. *
  576. * NO MARKUP IF A FORMAT ERROR WAS DETECTED BY
  577. * -ANSWERA-/-WRONGA-.
  578. *
  579. SX1 X1-3 ANSWERA ERRORS START AT 3
  580. PL X1,ATT2 --- TERMINATE RIGHT NOW WITH A '7NO'7
  581. *
  582. SA3 TSPECS GET LAST SPECS BITS
  583. LX3 NOMARK SEE IF NO MARKUP BIT SET
  584. NG X3,ANSOUT IF SET, JUST EXIT
  585. *
  586. SA1 JJSBUFA GET CRITERION
  587. ZR X1,ANSOUT IF NONE, NO APPARENT MATCH
  588. *
  589. MX6 0
  590. SA6 TBERRMK
  591. EXEC ANSW1,MARKUP ELSE, BAD ANSWER...GO AND MARK-UP
  592. * OVERLAY DOES NOT RETURN HERE
  593. *
  594. ATT2 SA3 TSPECS GET SPECS BITS
  595. LX3 NOOKNO SEE IF WANT -OK- OUTPUT
  596. NG X3,AOKK
  597. RJ OKNOOUT
  598. AOKK SB1 XNEXTLK CHECK FOR -NEXTNOW- CONTINGENCY
  599. EQ B1,B7,AEXIT JUMP IF NEXTNOW CONTINGENCY
  600. SB5 2 SET TO LEGAL CM ADDRESS
  601. SA5 B5-1 FAKE UP A5/B5 FOR *ANSDAT*
  602. CALL ANSDAT OUTPUT STUDENT DATA
  603. SB7 XSEARCHC SET TO SEARCH-C
  604. SB1 1 B1 = CONSTANT 1
  605. SA0 AJOIN
  606. SB2 JOIN
  607. SB3 JOINLTH
  608. AJRSTR SA1 A0+B3 RESTORE ARROW JOIN STRUCTURE
  609. BX6 X1
  610. SA6 B2+B3
  611. SB3 B3-B1
  612. PL B3,AJRSTR
  613. SA2 TLVLESS RESTORE ARROW LVAR STACK PTR
  614. AX2 18
  615. LX2 18
  616. AX1 18 X1 = ARROW UNIT LVAR STACK PTR
  617. BX6 X1+X2
  618. SA6 A2
  619. AJR01 SA1 TEARROW SEE IF ANY END ARROW UNIT
  620. NZ X1,AEND --- SPECIAL EXIT IF THERE IS
  621. SA1 TIARROW CHECK IF ANY -IARROW- UNIT
  622. SA2 TBITS
  623. LX2 ARRTPBT CHECK ARROW/A
  624. PL X2,AJR1 IF ARROW
  625. * /--- BLOCK ANSMARK 00 000 80/08/04 20.53
  626. SA1 TIARROWA FOR ARROWA
  627. AJR1 ZR X1,AJR2 IF NO IARROW UNIT
  628. *
  629. BX5 X1
  630. LX5 60-12 POSITION UNIT NUMBER
  631. EQ GOTOX
  632. *
  633. AJR2 EQ UNJOIN SEARCH FROM ARROW
  634. *
  635. AERSU CALL NOJBUF DROP ANY JUDGE BUFFER
  636. SA2 TBITS
  637. LX2 FSTEBIT SEE IF FORCE FIRSTERASE IN OPERATION
  638. PL X2,JEXITX (IN FILE EXEC1)
  639. *
  640. CALL CSULOAD NOW START OVER WITH THIS KEY
  641. EQ FFERA (IN FILE LOGICX)
  642. * /--- BLOCK AEND 00 000 78/02/08 00.40
  643. TITLE AEND
  644. *
  645. * 'THIS IS THE PROCESSING WHICH IS DONE WHEN
  646. * THERE IS AN EARROW UNIT. 'IT CORRESPONDS TO HOW
  647. * THINGS WILL BE HANDLED WHEN THERE IS NO SEARCH-C.
  648. * *** NOTE *** THE CODE FOR UNJOINING HAS BASICALLY
  649. * BEEN COPIED FROM FILE EXEC1.--'R'W'B 4/6/76
  650. *
  651. *
  652. AEND SA1 INHIBS
  653. LX1 ADVSHIF
  654. PL X1,AENDX JUMP IF ADVANCE NOT INHIBITED
  655. SB7 XAOKC CHANGE TO ARROW OK-C
  656. EQ EXIT --- EXIT FROM PROCESSING
  657. *
  658. *
  659. * 'PROCESSING RESUMES HERE WHEN NEXT KEY PRESSED
  660. * IN ARROW OK-C IN FILE LOGICX.
  661. *
  662. *
  663. ENTRY AENDX
  664. *
  665. AENDX SA1 TBARROW CHECK IF AN ARROW TO ERASE
  666. ZR X1,AENDX1 JUMP IF NONE
  667. MX6 0
  668. SA6 A1 CLEAR OUT ARROW
  669. SA3 INHIBS READ INHIBIT FLAGS
  670. LX3 ARRSHIF SHIFT FOR TEST
  671. NG X3,AENDX1 JUMP IF NO ARROW TO ERASE
  672. OUTCODE WFCODE OUTPUT WHERE
  673. * SX1 1 ARROW
  674. * OUTPUT ERSCODE ERASE 1 CHARACTER
  675. OUTARR E ERASE THE ARROW
  676. *
  677. AENDX1 SA1 JOIN GET JOIN COUNT
  678. SX6 X1-1 SUBTRACT ONE
  679. SA6 A1 AND PUT BACK
  680. SA4 JOINL+X6 GET LIST WORD
  681. LX4 12 ELIMINATE RARGS CONDITION
  682. AX4 12
  683. *
  684. * UNJOIN USING CONTENTS OF X4
  685. *
  686. MX0 48
  687. BX6 -X0*X4
  688. SA6 CBIAS COMMAND BIAS
  689. AX4 12
  690. BX6 X4 LESSON AND UNIT NUMBERS
  691. SA1 ILESUN LOAD OLD POINTERS
  692. BX5 X6 PUT NEW POINTERS INTO X5 FOR GETUNIT CALL
  693. SA6 A1 STORE NEW ONES
  694. CALL GETUNIT GET UNIT
  695. CALL LVINCSP,-1 POP LOCAL VAR STACK
  696. CALL LVLOAD,1 LOAD LOCAL VARS
  697. SA4 CBIAS
  698. SB3 X4
  699. SA5 B5-B3 SET COMMAND POINTER
  700. *
  701. * X5 NOW HOLDS THE ARROW (OR JARROW) COMMAND
  702. *
  703. MX0 -XSPTRL
  704. AX5 XCMNDL
  705. BX1 -X0*X5 EXTRACT COMMAND BIAS
  706. SB2 X1 OFFSET TO ONE BEFORE DESIRED
  707. SA5 B5-B2 RESET COMMAND POINTER
  708. SB7 XUNITC SET TO UNIT-C
  709. SA1 TEARROW UNIT NUMBER FOR END OF ARROW
  710. ZR X1,PROCESS --- RESUME PROCESSING IF NONE
  711. BX5 X1 PUT INTO X5
  712. LX5 -12 POSITION AT TOP
  713. * /--- BLOCK AEND 00 000 78/02/08 00.40
  714. EQ JOINX --- PROCESS LIKE A JOIN
  715. *
  716. *
  717. CBIAS BSS 1
  718. * /--- BLOCK ANSOUT 00 000 78/01/07 18.55
  719. *
  720. *
  721. ENTRY ANSOUT FOR USE BY ANSW1,ONMARK
  722. *
  723. ANSOUT SA1 TSPECS GET SPECS BITS
  724. LX1 NOOKNO GET NO -OK- -NO- OUTPUT BIT
  725. NG X1,ANSOUT1
  726. RJ OKNOOUT PUT OUT THE -OK- OR -NO-
  727. *
  728. ANSOUT1 SA1 TBITS
  729. LX1 QUITBIT CHECK IF -JUDGE QUIT-
  730. PL X1,AEXIT
  731. MX6 1
  732. BX6 -X6*X1 CLEAR -QUIT- BIT
  733. LX6 -QUITBIT
  734. SA6 A1
  735. EQ AOKK GO TO INITIATE SEARCH-C
  736. *
  737. *
  738. * 'FINAL EXIT FOR NEXTNOW-C AND INCORRECT ANSWERS.
  739. *
  740. AEXIT SX6 B7 FINAL EXIT FROM JUDGING
  741. SA6 NCTYPE
  742. CALL NOJBUF NO JUDGE BUFFER
  743. CALL CSULOAD UNLOAD ANY COMMON AND STORAGE TO ECS
  744. SB7 -1 FLAG NOT EXECUTING LESSON
  745. CALL ANSDAT
  746. EQ EXECUTX EXIT
  747. *
  748. *
  749. * 'WHEN JUDGING IS OVER IN UNIT-C (NO ARROW) CASE,
  750. * GO BACK TO NORMAL PROCESSING.
  751. * 'THE JUDGE EXIT/IGNORE TYPE COMMANDS ALSO EXIT
  752. * HERE FROM FILE EXEC1.
  753. *
  754. *
  755. ENTRY JOVER
  756. *
  757. JOVER SA1 AJOIN RESTORE SAVED JOIN STRUCTURE
  758. SB2 X1 B2 = JOIN COUNT
  759. SX6 X1 BOTTOM 18 BITS OF AJOIN=JSP
  760. SA6 JOIN
  761. AX1 18 X1 = ARROW LVAR STACK POINTER
  762. SA2 TLVLESS RESET LVAR STACK POINTER
  763. AX2 18
  764. LX2 18
  765. BX7 X2+X1
  766. SA7 A2
  767. SB1 1 B1 = CONSTANT 1
  768. JRES SA1 A1+B1
  769. BX6 X1
  770. SA6 A6+B1
  771. SB2 B2-B1
  772. NZ B2,JRES
  773. EQ AENDX1 --- DO NON-SEARCH END-UP
  774. * /--- BLOCK CKWORD 00 000 78/09/10 23.33
  775. TITLE WORD-CHECK
  776. *
  777. * THIS ROUTINE MATCHES THE STUDENT WORD WITH THE AUTHOR
  778. * WORD. IT IS USED BY ANSWER/WRONG/ANSWERC/MATCH/
  779. * CONCEPT/MISCON/COMPARE.
  780. *
  781. * EXIT WITH X6=0....PERFECT MATCH
  782. * EXIT WITH X6=-1...NO MATCH
  783. * EXIT WITH X6=+N...SPELLING ERROR (THE SMALLER N THE BETTER)
  784. * SPECIAL VALUES... 1 = CAPITALIZATION ERROR
  785. * ... 2 = AUTHOR CAP, STUDENT SMALL
  786. * ... 3 = CLOSE NUMBERS
  787. * ... ALL OTHER NUMBERS START ABOUT 80+
  788. *
  789. * A0,X0,B1,B2,B3,A5,A1-X1,A2-X2,A3-X3,A4-X4 MUST
  790. * BE AT EXIT AS AT ENTRY
  791. * A1-X1,A2-X2 HOLDS STUDENT WORD
  792. * A3-X3,A4-X4 HOLDS AUTHOR WORD
  793. *
  794. *
  795. * ***NOTE*** THE FIRST 4 OR 5 LINES ALSO EXIST IN
  796. * THE CONCEPT JUDGING ROUTINE FOR REASONS OF SPEED.
  797. * IF THE FIRST LINES ARE CHANGED...THEY SHOULD ALSO
  798. * BE CHANGED THERE.
  799. * /--- BLOCK CKWORD 00 000 78/08/28 15.43
  800. *
  801. HASHBTS EQU 27 TOP 27 BITS CAN BE CONSIDERED A HASH
  802. SYNBITS EQU 11 BITS NEEDED FOR BASE SYNONYM NUMBER
  803. *
  804. DNO SX6 -1 SET TO NO MATCH
  805. *
  806. ENTRY CKWORDX
  807. CKWORDX EQ *
  808. BX5 X1-X3 SEE IF STUDENT AUTHOR WORDS AGREE
  809. NZ X5,DSP
  810. MX6 HASHBTS
  811. BX6 X6*X4
  812. BX6 X6-X2
  813. ZR X6,CKWORDX PERFECT MATCH, EXIT X6=0
  814. *
  815. MX7 HASHBTS-1 SEE IF ONLY CAPATILAZATION DIFFERENCE
  816. BX6 X7*X6
  817. NZ X6,DSP
  818. *
  819. BX5 X4 GET AUTHOR WORD
  820. LX5 HASHBTS-1 GET CAP BIT
  821. NG X5,CKWDC
  822. SX6 1 SET CAPITALIZATION ERROR
  823. EQ CKWORDX
  824. CKWDC SX6 2 SET AUTHOR CAP, STUDENT SMALL ERROR
  825. EQ CKWORDX
  826. *
  827. DSP BX6 X4 SEE IF THIS IS A NUMBER
  828. LX6 1
  829. NG X6,MCKNUM GO TO NUMBER CHECKER
  830. *
  831. MX6 8 SEE IF WITHIN RANGE OF AGREEMENT
  832. BX7 -X6*X5 GET DIFFERENCE BITS
  833. CX7 X7 COUNT THEM UP
  834. SX5 X7-6 ALLOW UP TO 5 BITS DIFFERENCE
  835. PL X5,DNO OVER THAT IS DIFFERENT WORD
  836. *
  837. BX5 X1 NOW GET DIFFERENCE IN VOWEL COUNT
  838. BX6 X3
  839. AX5 56
  840. AX6 56
  841. IX7 X5-X6
  842. PL X7,CND0 GUARANTEE POSITIVE
  843. BX7 -X7
  844. CND0 SX6 X7-2 ALLOW ONLY 1 OFF IN VOWELS
  845. PL X6,DNO
  846. *
  847. LX7 1 DOUBLE VOWEL DIFFERENCE FOR START OF -FIX-
  848. *
  849. MX6 4 NOW GET CONSONANT DIFFERENCE
  850. BX5 -X6*X1
  851. BX6 -X6*X3
  852. AX5 52
  853. AX6 52
  854. IX5 X5-X6
  855. PL X5,CND1 GUARANTEE POSITIVE
  856. BX5 -X5
  857. CND1 SX6 X5-3
  858. PL X6,DNO ALLOW ONLY 2 CONSONANTS OFF
  859. IX7 X7+X5 ADD CONSONANCE DIFFERENCE INTO -FIX-
  860. * /--- BLOCK CKWORD 00 000 78/08/25 16.26
  861. *
  862. BX6 X2-X4 GET FIRST CHARS OF STUDENT - AUTHOR
  863. LX6 17
  864. AX6 54
  865. NZ X6,CND2
  866. NG X6,CND2
  867. SX7 X7-4 SUB 4
  868. *
  869. *
  870. CND2 MX6 23 GET CONSONANT/VOWEL COUNT
  871. BX5 -X6*X2
  872. BX6 -X6*X4
  873. AX5 34
  874. AX6 34
  875. IX6 X5-X6
  876. PL X6,CND3
  877. BX6 -X6
  878. CND3 LX6 1 DOUBLE ANY DIFFERENCE IN C/V
  879. *
  880. IX7 X7+X6 AND ADD TO -FIX-
  881. *
  882. MX6 8 GET CONFLICT COUNT AGAIN
  883. BX5 X1-X3
  884. BX5 -X6*X5
  885. CX5 X5
  886. IX6 X5+X7 ADD -FIX- TO CONFLICT COUNT
  887. SX6 X6-6
  888. PL X6,DNO ALLOW ONLY OFF BY 5
  889. *
  890. LX5 1 DOUBLE NUMBER OF CONFLICT BITS
  891. IX7 X5+X7 ADD -FIX- TO 2 * CONFLICT
  892. *
  893. SX5 X7+4 SEE IF PERFECT UP TO HERE
  894. ZR X5,CND4 HENCE, ONLY SUP/SUB/DIACRIT ERROR
  895. *
  896. MX6 8
  897. BX5 -X6*X1 GET STUDENT BITS
  898. CX5 X5 GET COUNT
  899. SX6 X5-3
  900. NG X6,DNO MUST HAVE AT LEAST 3 BITS
  901. *
  902. IX6 X5-X7 STUDENT BITS>=(2CONFLICT+FIX)
  903. NG X6,DNO
  904. *
  905. MX6 8 GET NUMBER OF AUTHOR BITS
  906. BX5 -X6*X3
  907. CX5 X5
  908. SX6 X5-4
  909. NG X6,DNO MUST HAVE AT LEAST 4
  910. *
  911. IX6 X5-X7 AUTHOR BITS>=(2CONFLICT+FIX)
  912. NG X6,DNO
  913. *
  914. CND4 SX5 A1 SAVE A1
  915. SA1 TSPECS GET SPECS NOSPELL BIT
  916. BX6 X1
  917. SA1 X5 RESTORE A1-X1
  918. LX6 NOSPELL
  919. NG X6,DNO
  920. *
  921. * /--- BLOCK CKWORD 00 000 78/08/29 00.43
  922. *
  923. SX6 X7+100 KEEP THE LOW NUMBERS FOR
  924. * SPECIAL THINGS
  925. *
  926. * SEARCH THROUGH A LIST OF COMMON WORDS. IF A
  927. * PERFECT MATCH TO ANY OF THESE WORDS, THEN DO
  928. * NOT DO ANY SPELLING CHECKS BECAUSE THE WORD
  929. * IS A COMMON WORD SPELLED CORRECTLY.
  930. *
  931. * SAVE REGISTERS
  932. SX7 A0
  933. SA7 CKSAV
  934. BX7 X0
  935. SA7 CKSAV+1
  936. SX7 A1
  937. SA7 CKSAV+2
  938. SX7 A2
  939. SA7 CKSAV+3
  940. SX7 A3
  941. SA7 CKSAV+4
  942. *
  943. SA0 CKABUF SET A0 POINTER
  944. BX7 X1-X2 PREPARE ONE WORD CONCEPT WORD
  945. MX5 60-SYNBITS
  946. BX7 X5*X7
  947. SA2 XSIMP GET ECS ADDRESS OF COMMON WORD BUFFER
  948. BX0 X2 WORDS ARE IN LESSON -SYSLIB-
  949. + RE 9 READ IN HEADER AND VOWEL TABLE
  950. RJ ECSPRTY
  951. SA2 A0 BRING UP WORD
  952. ZR X2,VONWD IF ZERO, THEN NO WORDS THERE
  953. AX1 56 GET VOWEL COUNT FROM STUDENT WORD
  954. SA1 CKABUF+1+X1 GET PROPER TABLE ENTRY
  955. SX2 X1 GET RELATIVE START OF WORDS OF THIS VOWEL N
  956. IX3 X0+X2 MAKE ABSOLUTE
  957. AX1 30 GET NUMBER OF WORDS OF THIS VOWEL COUNT
  958. IX1 X3+X1 GET ABSOLUTE END OF SEARCH
  959. SX2 1
  960. IX1 X1+X2 ADD 1
  961. *
  962. IX0 X1-X3 GET COUNT OF WORDS
  963. *
  964. CKLWDS AX0 1 BINARY SEARCH
  965. ZR X0,VONWD SEE IF LIST EXHAUSTED
  966. IX0 X3+X0 GET WORD
  967. + RE 1
  968. RJ ECSPRTY
  969. SA2 A0 BRING WORD UP
  970. BX2 X2*X5 CLEAR OFF BOTTOM BITS
  971. IX2 X7-X2
  972. ZR X2,VDIFFW IF FIND, THEN NOT A MISSPELLING
  973. PL X2,CKLPL
  974. BX1 X0 RESET BOTTOM OF LIST
  975. IX0 X1-X3
  976. EQ CKLWDS
  977. CKLPL BX3 X0 RESET TOP
  978. IX0 X1-X3
  979. EQ CKLWDS
  980. *
  981. VDIFFW SX6 -1 SET TO DIFFERENT WORD
  982. VONWD SA3 CKSAV RESTORE DESTROYED REGISTERS
  983. SA0 X3
  984. SA3 CKSAV+1
  985. BX0 X3
  986. SA3 CKSAV+2
  987. SA1 X3
  988. SA3 CKSAV+3
  989. SA2 X3
  990. SA3 CKSAV+4
  991. SA3 X3
  992. EQ CKWORDX
  993. *
  994. CKSAV BSS 5 HOLDS SAVED REGISTERS
  995. CKABUF BSS 9 READIN BUF FOR VOCAB DIRECTORY
  996. * /--- BLOCK CKWORD 00 000 78/08/28 14.53
  997. *
  998. *
  999. MCKNUM LX6 1 ---NUMBER CHECKER---
  1000. MX7 1
  1001. BX6 X7*X6 GET SIGN BIT OF NUMBER
  1002. BX6 X3+X6 NOW HAVE AUTHOR NUMBER RESTORED
  1003. *
  1004. BX5 X2
  1005. LX5 1
  1006. PL X5,DNO NOT A NUMBER
  1007. LX5 1
  1008. BX5 X7*X5
  1009. BX5 X1+X5 NOW HAVE STUDENT NUMBER RESTORED
  1010. *
  1011. FX7 X5-X6 GET DIFFERENCE
  1012. PL X7,MCKN1 MAKE IT ABSOLUTE
  1013. BX7 -X7
  1014. MCKN1 SX5 A1 SAVE REGISTER -A1-
  1015. SA1 EQTOLER GET ABSOLUTE TOLERANCE
  1016. RX1 X7-X1 AND SEE IF DIFFERENCE AS SMALL
  1017. NG X1,MNUMOK
  1018. *
  1019. PL X6,MCKN2 MAKE AUTHOR NUMBER ABSOLUTE
  1020. BX6 -X6
  1021. MCKN2 SA1 TSPECS GET SPECS BITS
  1022. LX1 TOLER SEE IF AUTHOR WANTS ONE PERCENT TOLERANCE
  1023. PL X1,MCKDIF
  1024. SA1 MDHUN GET ONE PERCENT
  1025. FX1 X1*X6 ONE PERCENT OF AUTHOR NUMBER
  1026. FX1 X1-X7 SUBTRACT DIFFERENCE
  1027. PL X1,MNUMOK OK IF WITHIN ONE PERCENT
  1028. *
  1029. MCKDIF SA1 TSPECS GET SPECS BITS
  1030. LX1 NODIFF SEE IF AUTHOR DOES NOT WANT DIFFERENCE
  1031. NG X1,MNUMNO MARKED LIKE SPELLING ERROR
  1032. SA1 MDTEN GET TEN PERCENT
  1033. FX1 X1*X6 GET TEN PERCENT OF AUTHOR NUMBER
  1034. FX1 X1-X7 SUBTRACT DIFFERENCE
  1035. NG X1,MNUMNO
  1036. SX6 3 SET TO A LOW MISSPELLING
  1037. SA1 X5 RESTORE REGISTER -A1- -X1-
  1038. EQ CKWORDX
  1039. *
  1040. MNUMOK SA1 X5 RESTORE -A1- -X1-;
  1041. MX6 0 SET TO PERFECT MATCH
  1042. EQ CKWORDX
  1043. *
  1044. MNUMNO SA1 X5 RESTORE -A1- -X1-
  1045. EQ DNO SET TO NO MATCH AND EXIT
  1046. *
  1047. MDHUN DATA 0.01 ONE PERCENT
  1048. MDTEN DATA 0.1 TEN PERCENT
  1049. * /--- BLOCK OVERLAYS 00 000 76/05/04 01.35
  1050. TITLE OVERLAYS
  1051. *
  1052. * 'EXECUTE COMMANDS IN ANS1 OVERLAY.
  1053. *
  1054. *
  1055. ENTRY OPENX
  1056. OPENX EXEC ANS1,OPENOV -OPEN- COMMAND
  1057. *
  1058. *
  1059. ENTRY CNCEPTX
  1060. CNCEPTX EXEC ANS1,CONCPOV -CONCEPT- COMMAND
  1061. *
  1062. *
  1063. ENTRY CLOSEX
  1064. CLOSEX EXEC ANS1,CLOSEOV -CLOSE- COMMAND
  1065. *
  1066. *
  1067. ENTRY LOADAX
  1068. LOADAX EXEC ANS1,LOADAOV -LOADA- COMMAND
  1069. *
  1070. *
  1071. ENTRY STORENX
  1072. STORENX EXEC ANS1,STRNOV -STOREN- COMMAND
  1073. *
  1074. *
  1075. ENTRY SPECX
  1076. SPECX EXEC ANS1,SPECXOV -SPECS- COMMAND
  1077. *
  1078. *
  1079. ENTRY GETWDX
  1080. GETWDX EXEC ANS1,GETWDOV -GETWORD- COMMAND
  1081. *
  1082. *
  1083. ENTRY GETMKX
  1084. GETMKX EXEC ANS1,GETMKOV -GETMARK- COMMAND
  1085. *
  1086. *
  1087. ENTRY GETLOCX
  1088. GETLOCX EXEC ANS1,GETLCOV -GETLOC- COMMAND
  1089. *
  1090. *
  1091. ENTRY COMPX
  1092. COMPX EXEC ANSW1,COMPOV -COMPARE- COMMAND
  1093. *
  1094. *
  1095. END