User Tools

Site Tools


plato:source:plaopl:conten

CONTEN

Table Of Contents

  • [00028] CONTENT
  • [00552] NUMBERS
  • [00635] NUMBER BUILDER
  • [00826] EXPONENTIATION ROUTINE
  • [01070] CHARACTER DEFINITION TABLE

Source Code

CONTEN.txt
  1. CONTEN
  2. * /--- FILE TYPE = E
  3. * /--- BLOCK BLANK 00 000 76/05/11 23.52
  4. *
  5. * LONG-RANGE PROBLEMS ******************************************
  6. *
  7. * WORD(FONT)SP/ SHOULD BE ALLOWED...IT SOLVES THE
  8. * INFORMATIONAL PROBLEM O HAVING FONT AS LAST CHAR
  9. * OF BASE WORD
  10. *
  11. *
  12. * THE EXPONENT ROUTINE DOES NOT HANDLE PARENTHESES
  13. * SO -2.3**3.5 IS -(2.3**3.5)
  14. *
  15. * LOCKING SUP IN NUMBERS PROBABLY NOT RIGHT IN ALTERNATE FONT
  16. *
  17. *
  18. * MAYBE PROBLEM WITH SPECS ALPHXNUM IN WORDS IF NUMBER
  19. * IS PRECEEDED BY SUP/SUB
  20. *
  21. *
  22. ************************************************************************
  23. * /--- BLOCK INFO 00 000 77/12/17 14.18
  24. IDENT CONTENT
  25. *
  26. CST
  27. *
  28. TITLE CONTENT
  29. *
  30. * THIS ROUTINE IS USED BY BOTH THE CONDENSER AND
  31. * THE EXECUTER...SO BE DOUBLY CAREFUL...
  32. *
  33. *
  34. *
  35. ENTRY CONTENT
  36. *
  37. * ON ENTRY...A1 SHOULD BE INITIALIZED TO ADDRESS OF PREVIOUS
  38. * CHARACTER (I.E., +1 WILL BE CURRENT CHARACTER TO LOOK AT)
  39. *
  40. *
  41. * THE NEXT WORD OR NUMBER IS FOUND IN A CHARACTER
  42. * STRING AND FORMED INTO A CHARACTER STRING CONTENT WORD
  43. * USED FOR CHECKING IF TWO WORDS/NUMBERS ARE THE SAME OR
  44. * SLIGHTLY DIFFERENT FROM ONE ANOTHER.
  45. *
  46. *
  47. * ON EXIT...
  48. *
  49. **********
  50. * X1 HOLDS STOPPING OPERATION CODE
  51. * A1 HOLDS ADDRESS OF LAST 6-BIT CHARACTER CODE
  52. * PRODUCING STOPPING OPERATION
  53. *
  54. **********
  55. * X6 IS THE CONTENT WORD
  56. *
  57. * 0...UNUSED (FOR HASH SEARCHES)
  58. * 1-3...NUMBER OF VOWELS
  59. * 4-7...NUMBER OF CONSONANTS
  60. * 8-59...CONTENT BITS
  61. *
  62. **********
  63. * X7 IS HASH (=0 IF NOTHING CONTENTED)
  64. *
  65. * 0...UNUSED (FOR HASH SEARCHES)
  66. * 1...0=WORD, 1=NUMBER
  67. * 2-16...WORD HASH, OR 2=SIGN BIT OF NUMBER
  68. * 17-22...FIRST LETTER
  69. * 23-25...NUMBER OF CONSONANT/VOWEL PAIRS
  70. * 26...CAPITALIZATION BIT
  71. * 27-59...ZERO
  72. *
  73. * /--- BLOCK FIRST 00 000 78/01/07 18.46
  74. SPACE 6
  75. CONTENT EQ *
  76. *
  77. *
  78. SX6 B5 SAVE B5
  79. MX7 0
  80. SA6 CBSAVE
  81. SA7 CSSTEMP CLEAR TEMPORARY SUP/SUB BIAS
  82. *
  83. *
  84. FIRST RJ GETOP GET NEXT OPERATION CODE
  85. JP B2+FIRTAB
  86. FIRTAB EQ CONOUT 0.END OF LINE
  87. EQ CL1 1.LETTERS (CONSONANTS)
  88. EQ CL1 2.LETTERS (VOWELS)
  89. EQ CL1 3.DIACRITIC...HANDLE AS LETTER HERE
  90. EQ CLN 4.NUMBERS (0-9)
  91. + SX4 1
  92. EQ FIRSS 5.SUPERSCRIPT
  93. + SX4 -1
  94. EQ FIRSS 6.SUBSCRIPT
  95. EQ CL1 7.BACKSPACE
  96. EQ CONOUT 8.CARRIAGE RETURN
  97. MX0 0 SET UNARY SIGN TO PLUS
  98. EQ SIGNPM 9.+
  99. MX0 -0 SET UNARY SIGN TO MINUS
  100. EQ SIGNPM 10.-
  101. EQ CONOUT 11.*
  102. EQ CONOUT 12./
  103. EQ FIRST 13. SPACE...JUST INCREMENT OVER IT
  104. EQ CONOUT 14.,
  105. EQ FIRPER 15..PERIOD
  106. EQ CONOUT 16.;
  107. EQ CONOUT 17.(
  108. EQ CONOUT 18.)
  109. EQ CONOUT 19.<
  110. EQ CONOUT 20.>
  111. EQ CONOUT 21.=
  112. EQ CONOUT 22. START EMBED
  113. EQ CONOUT 23. END EMBED
  114. EQ CONOUT 24. MISC PUNCTUATIONS
  115. EQ CL1 25. PUNC AND WORD
  116. *
  117. *
  118. * STARTING WITH A NUMBER
  119. CLN SA3 TSPECS
  120. LX3 ALLWDS SEE IF SPECS ALLWORDS
  121. MX0 0 CLEAR UNARY MINUS FLAG
  122. NG X3,CL1 GO TO WORD CONTENTER
  123. EQ CNUM ELSE, GO TO NUMBER CONTENTER
  124. *
  125. *
  126. * SEE IF DECIMAL POINT OR PERIOD
  127. FIRPER SA3 TSPECS
  128. LX3 ALLWDS SEE IF SPECS ALLWORDS
  129. MX0 0 CLEAR UNARY SIGN TO PLUS
  130. NG X3,CONOUT
  131. RJ GETOPN GET THE NEXT OPERATION CODE
  132. SX7 B3-COPNUM
  133. ZR X7,CNUM SEE IF NUMBER
  134. EQ CONOUT ELSE A PERIOD
  135. *
  136. * /--- BLOCK FIRST 00 000 77/12/08 15.19
  137. *
  138. *
  139. FIRSS LX2 7 SEE IF LOCKING SUP/SUB
  140. NG X2,FIRSS1
  141. SA3 CSSTEMP LOAD TEMPORARY
  142. EQ FIRSS2
  143. FIRSS1 SA3 CSSPERM LOAD PERMANANT
  144. FIRSS2 IX6 X3+X4 ADD NEW TO ON-GOING
  145. SA6 A3
  146. EQ FIRST AND ONTO NEXT LETTER
  147. *
  148. * SEE IF + - PART OF A NUMBER
  149. SIGNPM SA3 TSPECS
  150. LX3 ALLWDS SEE IF SPECS ALLWORDS
  151. NG X3,CL1
  152. RJ GETOPN GET THE NEXT OPERATION CODE
  153. SX7 B3-COPNUM
  154. ZR X7,SIGNPM1 SEE IF NUMBER
  155. SX7 B3-COPPER
  156. NZ X7,CONOUT ELSE EXIT
  157. SX6 A1 SAVE A1
  158. SA1 A3 SET BY LAST GETOPN
  159. RJ GETOPN GET NEXT OPERATION CODE
  160. SA1 X6 RESTORE
  161. SX7 B3-COPNUM
  162. NZ X7,CONOUT EXIT IF NOT NUMBER
  163. SIGNPM1 SX6 A0+1 SAVE STARTING CHARACTER ADDRESS
  164. SA6 CFIRST
  165. RJ GETOP NOW MOVE TO THE NEXT OPERATION
  166. EQ CNUM1
  167. *
  168. *
  169. * /--- BLOCK LETTERS 00 000 78/01/04 00.48
  170. *
  171. * CONTENT A WORD...FIRST LETTER ENTERS HERE
  172. CL1 SX6 A0+1 SAVE STARTING CHARACTER ADDRESS
  173. SA6 CFIRST
  174. *
  175. * IFEQ *F,2 ONLY FOR CONDENSOR
  176. CONDEN
  177. SA3 FONTFLG GET CURRENT FONT FLAG
  178. BX7 X3 SAVE STARTING FONT FLAG FOR USE IN ENDINGS
  179. SA7 EFSTART
  180. ENDIF
  181. *
  182. SA3 CBITHF GET CONTENT BITS FLIP/FLOP WORD
  183. BX5 X3 **** X5 SET UNTIL DONE PROCESSING WORD
  184. *
  185. MX0 0 CLEAR FIRST LETTER,CAP BIT,ETC
  186. MX6 0 CLEAR ALL CONTENT BITS
  187. *
  188. SA3 CSSPERM GET SUP/SUB BIAS
  189. SA4 CSSTEMP
  190. IX7 X3+X4 AND INITIALIZE HASH
  191. NG X7,CL1A POS MUST DIFFER FROM NEG SO THAT 60 TO 15
  192. LX7 7 BIT HASH SMASH RETAINS DIFFERENCE
  193. CL1A SA6 A4 AND CLEAR TEMP
  194. *
  195. LX2 8 SET CAP BIT
  196. MX3 59
  197. BX0 -X3*X2
  198. BX2 X3*X2 AND CLEAR IT OUT
  199. *
  200. LX2 7 GET CHARACTER BITS
  201. MX3 51 AND FONT AND ACCESS
  202. BX2 -X3*X2 MASK OFF ALL OTHER BITS
  203. BX1 X2 SAVE IN X1 FOR POSSIBLE USE AT CC1
  204. LX2 4 SAVE THE FIRST LETTER AND FONT AND ACCESS
  205. BX0 X2+X0
  206. * AND OTHER 4 BITS ARE -DIFF- INTO HASH LATER
  207. SB1 B0 INITIALIZE CONSONANT COUNTER
  208. SB4 B0 INITIALIZE VOWEL COUNTER
  209. *
  210. SX2 B2-COPPUWD SEE IF PUNCTUATION AND WORD
  211. NZ X2,CL2
  212. SB2 COPLET SET TO LETTER OPERATION FOR OTHERS
  213. SB5 A1 SAVE AS ENDING ADDRESS
  214. SB6 X1 SAVE AS LAST CHARACTER
  215. RJ GETOPN GET NEXT SYMBOL
  216. SX2 B3-COPASTR SEE IF PHRASE MARKER
  217. NZ X2,CLOOPX EXIT IF NOT
  218. RJ GETOP MOVE AHEAD TO POINT AT PHRASE
  219. EQ CLOOPX
  220. *
  221. CL2 SX2 B2-COPVOWL
  222. NZ X2,CC1 SEPARATE CON/VOW
  223. * /--- BLOCK LETTERS 00 000 78/01/04 01.09
  224. *
  225. * START WITH A VOWEL
  226. CV1 SB4 B4+1 INCREMENT VOWEL COUNT
  227. *
  228. RJ CRJ GET NEXT CHARACTER
  229. *
  230. SX2 B2-COPVOWL
  231. ZR X2,CV1 SEPARATE CON/VOW
  232. *
  233. * SET A BIT FOR FIRST CONSONANT IN WORD STARTING WITH VOWELS
  234. MX3 58
  235. BX2 -X3*X1 GET BYTE INDEX
  236. LX2 3 TIMES 8
  237. SB3 X2
  238. BX2 X1
  239. AX2 2 GET WORD INDEX
  240. MX3 57
  241. BX2 -X3*X2 MASK TO 8 POSSIBILITIES
  242. SA2 CVBITS2+X2 GET WORD WITH 4 ENTRIES
  243. LX2 X2,B3
  244. AX2 52 GET ENTRY DESIRED
  245. SB3 X2
  246. MX2 1
  247. LX2 X2,B3 GET BIT INTO POSITION
  248. BX6 X6+X2 ADD BIT TO CONTENT BITS
  249. *
  250. *
  251. CC1 SB1 B1+1 INCREMENT CONSONANT COUNT
  252. SB3 X1 SAVE FOR POSSIBLE C/V CASE
  253. *
  254. RJ CRJ GET NEXT CHARACTER
  255. *
  256. SX2 B2-COPVOWL
  257. NZ X2,CC1 SEPARATE CON/VOW
  258. *
  259. *
  260. *
  261. SX0 X0+10000B INCREMENT COUNT OF C/V PAIRS
  262. *
  263. * SET CONSONANT/VOWEL BIT HERE
  264. MX3 58
  265. SX4 B3 GET PREVIOUS CONSONANT
  266. BX2 -X3*X4 GET BYTE INDEX
  267. LX2 3 TIMES 8
  268. SB3 X2
  269. AX4 2 GET WORD INDEX
  270. MX3 57
  271. BX2 -X3*X4 MASK TO 8 POSSIBILITIES
  272. SA2 CVBITS+X2 GET WORD WITH 4 ENTRIES
  273. LX2 X2,B3
  274. AX2 52 GET ENTRY DESIRED
  275. SB3 X2
  276. MX2 1
  277. LX2 X2,B3 GET BIT INTO POSITION
  278. BX6 X6+X2 ADD BIT TO CONTENT BITS
  279. *
  280. CVV1 SB4 B4+1 INCREMENT VOWEL COUNT
  281. *
  282. RJ CRJ GET NEXT CHARACTER
  283. *
  284. SX2 B2-COPVOWL
  285. NZ X2,CC1 SEPARATE CON/VOW
  286. EQ CVV1 ELSE TO VOWEL AGAIN
  287. *
  288. *
  289. CRJF SA3 CSSPERM GET PERMANANT SUP/SUB BIAS
  290. SA4 CSSTEMP GET TEMPORARY SUP/SUB BIAS
  291. IX3 X3+X4 ADD TOGETHER TO GET TOTAL BIAS
  292. NG X3,CRJF0A POS MUST DIFFER FROM NEG SO THAT 60 TO 15
  293. LX3 7 BIT HASH SMASH RETAINS DIFFERENCE
  294. CRJF0A BX7 X7-X3 ADD THIS NUMBER TO HASH
  295. BX3 X6 SAVE X6
  296. MX6 0 CLEAR TEMPORARY SUP/SUB BIAS
  297. SA6 A4
  298. BX6 X3
  299. * /--- BLOCK CRJ 00 000 77/12/08 15.42
  300. *
  301. LX2 15 GET CHARACTER BITS LOWER
  302. MX3 51 FONT-SHIFT-ACCESS-6 BIT CHAR CODE
  303. BX1 -X3*X2
  304. LX7 11 JIGGLE HASH
  305. BX7 X7-X1 ADD NEW CHARACTER TO HASH
  306. MX3 1 NOW SET CONTENT BIT FOR THIS CHAR
  307. NG X5,CRJF1 GET LEFT-RIGHT TOGGLE
  308. LX3 26
  309. CRJF1 SB5 X1
  310. LX4 X3,B5 SHIFT CONTENT BIT TO UNIQUE SPOT
  311. BX6 X6+X4 ADD NEW CONTENT BIT
  312. LX5 1 MOVE LEFT-RIGHT TOGGLE DOWN ONE
  313. * EXIT
  314. *
  315. CRJ EQ * GET NEXT CHARACTER FOR WORD CONTENTING
  316. SB5 A1 SAVE THIS ADDRESS AS POSSIBLE ENDING ADDRS
  317. SB6 X1 SAVE LAST CHARACTER FOR END
  318. CRJJP RJ GETOP GET NEXT OPERATION CODE
  319. JP B2+CRJT JUMP INTO SYMBOL ACTION TABLE
  320. *
  321. CRJT EQ CLOOPX 0.END OF LINE
  322. EQ CRJF 1.LETTERS (CONSONANT)
  323. EQ CRJF 2.LETTERS (VOWEL)
  324. EQ CNOVAL 3.DIACRITIC...OF LITTLE SPELLING VALUE
  325. EQ CRJNUM 4.NUMBERS (0-9)
  326. + SX4 1 SUP IS INCREMENT
  327. EQ CRJSS 5.SUPERSCRIPT
  328. + SX4 -1 SUB IS DECREMENT
  329. EQ CRJSS 6.SUBSCRIPT
  330. EQ CRJF 7.BACKSPACE
  331. EQ CLOOPX 8.CARRIAGE RETURN
  332. EQ CRJPM 9.+
  333. EQ CRJPM 10.-
  334. EQ CLOOPX 11.* (COULD BE PHRASE SYMBOL)
  335. EQ CLOOPX 12./
  336. EQ CLOOPX 13. SPACE
  337. EQ CLOOPX 14.,
  338. EQ CLOOPX 15..PERIOD
  339. EQ CLOOPX 16.;
  340. EQ CLOOPX 17.(
  341. EQ CLOOPX 18.)
  342. EQ CLOOPX 19.<
  343. EQ CLOOPX 20.>
  344. EQ CLOOPX 21.=
  345. EQ CLOOPX 22. START EMBED
  346. EQ CLOOPX 23. END EMBED
  347. EQ CLOOPX 24. MISC. PUNCT MARKS
  348. EQ CRJPUWD 25. PUNC AND WORD
  349. *
  350. *
  351. * /--- BLOCK NEXTCHAR 00 000 77/12/08 15.20
  352. *
  353. CRJPUWD SB2 COPLET PUNC AND WORD...SET TO LETTER FOR OTHERS
  354. SA1 A0 RESET TO DO THIS AGAIN
  355. EQ CLOOPX EXIT
  356. *
  357. *
  358. CRJNUM SA3 TSPECS SEE IF LETTER/NUMBER BOUNDARY
  359. LX3 ALNUM ACTS AS A PUNCTUATION
  360. PL X3,CRJF BRANCH IF LETTER/NUMBER NOT A PUNCTUATION
  361. *
  362. SA1 A0 REFIX A1 TO POINT JUST BEFORE LAST SYMBOL
  363. EQ CLOOPX AND EXIT WORD BUILDING LOOP
  364. *
  365. *
  366. *
  367. CRJSS LX2 7 SEE IF LOCKING SUP/SUB
  368. NG X2,CRJSS1
  369. SA3 CSSTEMP LOAD TEMPORARY
  370. EQ CRJSS2
  371. CRJSS1 SA3 CSSPERM LOAD PERMANANT
  372. CRJSS2 BX2 X6 SAVE X6
  373. IX6 X3+X4 ADD IN NEW CHANGE
  374. SA6 A3
  375. BX6 X2
  376. * SPECIAL SINCE THIS MIGHT BE END OF WORD
  377. * IN WHICH CASE, JUST IGNORE
  378. EQ CRJJP THEN BACK INTO TABLE
  379. *
  380. * /--- BLOCK NEXTCHAR 00 000 78/01/04 01.09
  381. *
  382. * DIACRITIC...CHARACTERS OF LITTLE SPELLING
  383. * VALUE...JUST ADD TO HASH.
  384. CNOVAL SA3 CSSPERM GET PERMANANT SUP/SUB BIAS
  385. SA4 CSSTEMP GET TEMPORARY SUP/SUB BIAS
  386. IX3 X3+X4 ADD TOGETHER TO GET TOTAL BIAS
  387. NG X3,CNOVAL1 POS MUST DIFFER FROM NEG SO THAT 60 TO 15
  388. LX3 7 BIT HASH SMASH RETAINS DIFFERENCE
  389. CNOVAL1 BX7 X7-X3 ADD THIS NUMBER TO HASH
  390. BX3 X6 SAVE X6
  391. MX6 0 CLEAR TEMPORARY SUP/SUB BIAS
  392. SA6 A4
  393. BX6 X3
  394. *
  395. LX2 15 GET CHARACTER BITS LOWER
  396. MX3 51 FONT-SHIFT-ACCESS-6 BIT CHAR CODE
  397. BX1 -X3*X2
  398. LX7 11 JIGGLE HASH
  399. BX7 X7-X1 ADD NEW CHARACTER TO HASH
  400. *
  401. SB5 A1 SAVE THIS ADDRESS AS POSSIBLE END
  402. EQ CRJJP ON TO NEXT SYMBOL
  403. *
  404. *
  405. CRJPM SA0 B3 SAVE B3...SEE IF + - AT END LETTERS
  406. RJ GETOPN
  407. SX3 B3
  408. SB3 A0 RESTORE
  409. ZR X3,CRJF
  410. SX4 X3-COPNUM EXIT IF LETTER FOLLOWS
  411. PL X4,CRJF IF NOT, THEN CONTINUE
  412. ** EQ CLOOPX ELSE STOP WORD BUILDING
  413. *
  414. *
  415. CLOOPX SA0 B5 PUT END ADDRESS OF LAST SYMBOL INTO A0
  416. * SINCE THAT IS WHERE THE FOLLOWING
  417. * EXPECTS IT AND THE FOLLOWING WILL BE
  418. * RE-WRITTEN SHORTLY ANYWAY...
  419. MX3 58 NOW ADD SPECIAL BIT FOR LAST LETTER
  420. SX4 B6 GET LAST CHARACTER AGAIN
  421. BX2 -X3*X4 GET BYTE INDEX
  422. LX2 3 TIMES 8
  423. SB3 X2
  424. AX4 2 GET WORD INDEX
  425. MX3 57
  426. BX2 -X3*X4 MASK TO 8 POSSIBILITIES
  427. SA2 CVBITS2+X2 GET WORD WITH 4 ENTIRES
  428. LX2 X2,B3
  429. AX2 52 GET ENTRY DESIRED
  430. SB3 X2
  431. MX2 1
  432. LX2 X2,B3 GET BIT INTO POSITION
  433. BX6 X6+X2 ADD BIT TO CONTENT BITS
  434. *
  435. SX2 B4 NOW SAVE VOWEL COUNT
  436. SB4 B4-8 SEE IF OVERFLOW FIELD
  437. NG B4,VOK
  438. SX2 7
  439. * /--- BLOCK LETEND 00 000 78/01/07 18.47
  440. VOK LX2 56 POSITION
  441. BX0 X0+X2
  442. *
  443. SX2 B1 SAVE CONSONENT COUNT
  444. SB1 B1-16 SEE IF OVERFLOW FIELD
  445. NG B1,COK
  446. SX2 15
  447. COK LX2 52
  448. BX0 X0+X2
  449. *
  450. *
  451. *
  452. MX3 8 NOW SHAPE UP FINAL X6
  453. BX2 X3*X6
  454. BX6 -X3*X6
  455. LX2 8
  456. BX6 X6-X2
  457. BX2 X3*X0 GET VOWEL AND CONSONENT COUNTS
  458. BX6 X6+X2 X6 NOW READY
  459. BX0 -X3*X0 CLEAR C AND V COUNTS FROM X0
  460. *
  461. *
  462. * TURN HASH INTO A 15 BIT ENTITY
  463. BX3 X7 GET 30 BIT HASH
  464. LX7 30
  465. BX3 X3-X7
  466. BX7 X3 GET 15 BIT HASH
  467. LX7 15
  468. BX3 X3-X7
  469. MX4 45
  470. BX3 -X4*X3 NOW HAVE 15 BITS OF HASH
  471. *
  472. MX4 48 GET C/V COUNT
  473. BX2 X4*X0
  474. BX0 -X4*X0 CLEAR OUT
  475. AX2 11 POSITION
  476. MX4 56
  477. BX4 X4*X2
  478. ZR X4,CXAV MUST FIT IN 3 BITS
  479. SX2 16B
  480. CXAV BX0 X0+X2
  481. *
  482. LX3 10
  483. BX7 X3-X0 DIFF SINCE FIRST LETTER MIGHT
  484. * CONTAIN FONT AND ACCESS BITS
  485. LX7 33 X7 NOW HAS HASH-INFO WORD
  486. *
  487. *
  488. CDONE2 SX1 B2 PUT LAST OPERATION CODE INTO X1
  489. * A1 HOLDS ADDRESS OF LAST CHARACTER
  490. SA2 CBSAVE RESTORE B5
  491. SB5 X2
  492. *
  493. EQ CONTENT
  494. *
  495. *
  496. CONOUT MX7 0 SET TO NOTHING CONTENTED
  497. EQ CDONE2
  498. * /--- BLOCK TABLES 00 000 78/08/16 16.03
  499. *
  500. *
  501. *
  502. ENTRY CFIRST
  503. CFIRST BSS 1 ADDRESS OF FIRST REAL CHARACTER
  504. *
  505. *
  506. ENTRY FONTFLG
  507. FONTFLG BSS 1 BIT 100B TOGGLED TO KEEP TRACK OF FONT
  508. * INITIALIZED TO ZERO AT WORDGET IN PLATO
  509. * AT GETLINE IN CONDENSOR
  510. * AT COMPARE IN ANSW1
  511. *
  512. * IFEQ *F,2
  513. CONDEN
  514. ENTRY EFSTART FLAG USED FOR FONT OF BASE WORD IN ENDINGS
  515. EFSTART BSS 1
  516. ENDIF
  517. *
  518. *
  519. *
  520. * CONSONANT/VOWEL BITS
  521. CVBITS VFD 8/0,8/0,8/49,8/43,28/0 -ABC
  522. VFD 8/17,8/0,8/37,8/39,28/0 DEFG
  523. VFD 8/52,8/0,8/38,8/29,28/0 HIJK
  524. VFD 8/50,8/7,8/24,8/0,28/0 LMNO
  525. VFD 8/11,8/33,8/10,8/43,28/0 PQRS
  526. VFD 8/26,8/0,8/32,8/22,28/0 TUVW
  527. VFD 8/30,8/0,8/36,8/0,28/0 XYZ0
  528. VFD 8/0,8/0,8/0,8/0,28/0
  529. *
  530. * MISCELLANEOUS BITS
  531. CVBITS2 VFD 8/0,8/11,8/23,8/22,28/0 -ABC
  532. VFD 8/36,8/25,8/43,8/49,28/0 DEFG
  533. VFD 8/7,8/37,8/6,8/33,28/0 HIJK
  534. VFD 8/30,8/2,8/42,8/29,28/0 LMNO
  535. VFD 8/17,8/29,8/47,8/51,28/0 PQRS
  536. VFD 8/21,8/48,8/27,8/30,28/0 TUVW
  537. VFD 8/37,8/16,8/2,8/0,28/0 XYZ0
  538. VFD 8/0,8/0,8/0,8/0,28/0
  539. *
  540. *
  541. * CONTENT BIT TOGGLE...TELLS WHICH SIDE
  542. * OF CONTENT WORD BITS ARE BEING ADDED
  543. CBITHF DATA 70176007770007770000B 3-5-6-7-9-9...
  544. *
  545. CSSTEMP BSS 1 TEMPORARY SUP/SUB BIAS
  546. ENTRY CSSPERM INITIALIZED BY GETLINE AND WORDGET
  547. * AT COMPARE IN ANSW1
  548. CSSPERM BSS 1 PERMANANT SUP/SUB BIAS
  549. *
  550. * /--- BLOCK NUMBER 00 000 76/07/23 01.22
  551. *
  552. TITLE NUMBERS
  553. *
  554. CNUM SX6 A0+1 SAVE FIRST CHARACTER
  555. SA6 CFIRST
  556. CNUM1 MX6 0 CLEAR NUMBER A-BUILDING
  557. RJ CNUMR GET FIRST ARGUMENT
  558. *
  559. * NOW SEE WHAT NEXT OPERATION IS
  560. SX7 B2-COPPLUS CHECK FOR +-*/
  561. NG X7,CNUMEND JUMP IF NOT +-*/
  562. SA7 CNUMOP SAVE OPCODE
  563. AX7 2 +-*/ GIVES 0,1,2,3 IN X7
  564. NZ X7,CNUMEND JUMP IF NOT +-*/
  565. *
  566. RJ GETOPN GET NEXT OPERATION .. NOT ADVANCING
  567. *
  568. SX7 B3-COPPER CHECK FOR DECIMAL POINT
  569. NZ X7,CNUM2 IF NOT CHECK FOR NUMBER
  570. SX0 A1 SAVE A1
  571. SA1 A3 SET A1 TO LAST CHAR OF LAST GETOPN
  572. RJ GETOPN GET ANOTHER OPERATION .. NOT ADVANCING
  573. SA1 X0 RESTORE A1
  574. *
  575. CNUM2 SX7 B3-COPNUM SEE IF NUMBER
  576. NZ X7,CNUMEND IF NOT NUMBER THEN FINISHED
  577. SA6 FSTARG SAVE FIRST NUMBER
  578. MX6 0 CLEAR NUMBER A-BUILDING
  579. MX0 0 NO FURTHER UNARY MINUS
  580. RJ GETOP REALLY GET NEXT OPERATION
  581. RJ CNUMR GET SECOND ARGUMENT
  582. *
  583. + SA3 CNUMOP PICK UP OPERATION CODE
  584. SB4 X3 STORE IT IN B4
  585. SA3 FSTARG PICK UP FIRST ARGUMENT
  586. JP PERFORM+B4 JUMP TO APROPOS ARITHMETIC
  587. *
  588. *
  589. PERFORM FX6 X3+X6 PLUS
  590. NX6 X6 NORMALIZE ADDITION
  591. EQ LSTCHEK
  592. + FX6 X3-X6 MINUS
  593. NX6 X6 NORMALIZE SUBTRACTION
  594. EQ LSTCHEK
  595. + FX6 X3*X6 MULTIPLY
  596. EQ LSTCHEK
  597. + FX6 X3/X6 DIVIDE
  598. EQ LSTCHEK
  599. *
  600. * MAKE LAST CHECK THAT THERE IS NO 3RD NUMERICAL ARG.
  601. LSTCHEK SX7 B2-COPPLUS SEE IF ANOTHER NUMERICAL OPERATION
  602. NG X7,CNUMEND
  603. AX7 2
  604. NZ X7,CNUMEND JUMP IF NOT +-*/
  605. *
  606. RJ GETOPN GET NEXT OPERATION .. NOT ADVANCING
  607. *
  608. *
  609. * IFEQ *F,2 SPECIAL FOR CONDENSE ERROR TO AUTHOR
  610. CONDEN
  611. SX7 B2-COPNUM
  612. NZ X2,CNUMEND JUMP IF NOT NUMERICAL
  613. EXT ERRORC
  614. EQ ERRORC ERROR IN READIN
  615. ENDIF
  616. *
  617. * /--- BLOCK NUM BUILD 00 000 77/11/30 20.38
  618. CNUMEND MX7 1
  619. BX3 X6*X7 GET SIGN BIT
  620. BX6 -X7*X6 KILL ANY SIGN BIT IN -CONTENT- WORD
  621. AX3 1
  622. BX7 X3+X7 AND SET TOP BIT IN -HASH- WORD
  623. LX7 59 LEAVE TOP BIT ZERO FOR BINARY CHOP TO WORK
  624. SX2 B2-COPPUWD SEE IF RAN INTO PUNCWORD
  625. NZ X2,CNUMED2
  626. SB2 COPLET MAKE LIKE LETTER FOR OTHERS
  627. SA1 A0 RESET A1 SO REDO THIS ONE AGAIN
  628. EQ CDONE2
  629. CNUMED2 SX2 B2-COPCR SEE IF RAN INTO A WORD
  630. PL X2,CDONE2
  631. SA1 A0 THEN MUST RESET A1 BACK CHAR
  632. EQ CDONE2 FINISH UP
  633. *
  634. *
  635. TITLE NUMBER BUILDER
  636. * NUMBER BUILDING LOOP
  637. CNUMR EQ *
  638. SX7 B2-COPPER CHECK FOR INITIAL DECIMAL PT.
  639. ZR X7,CNUMF JUMP IF FRACTION
  640. SA3 =10.0
  641. BX7 X3
  642. CNUMR1 AX2 45 GET INTEGER VALUE
  643. SX2 X2-1R0 REDUCE FROM DISPLAY CODE
  644. PX2 X2
  645. NX2 X2
  646. FX6 X7*X6 10X6
  647. FX6 X2+X6 ADD IN NEW DIGIT
  648. NX6 X6
  649. RJ GETOP GET NEXT OPERATION
  650. SX3 B2-COPNUM SEE IF NUMBER
  651. ZR X3,CNUMR1
  652. SX3 B2-COPPER SEE IF DECIMAL POINT
  653. NZ X3,CNUMSUP
  654. *
  655. CNUMF SA4 =1.0 SET X4 TO 1.0
  656. MX7 0 COLLECT FRACTION IN X7
  657. CNUMF1 RJ GETOP GET NEXT OPERATION
  658. SX3 B2-COPNUM SEE IF A NUMBER
  659. NZ X3,CNUMDUN
  660. AX2 45 GET THE INTEGER VALUE
  661. SX2 X2-1R0 REDUCE FROM DISPLAY CODE
  662. PX2 X2 FLOAT NEW DIGIT
  663. NX2 X2
  664. SA3 =10.0
  665. FX7 X3*X7 10X7
  666. FX7 X7+X2 ADD IN NEW DIGIT
  667. NX7 X7
  668. FX4 X3*X4 10X4
  669. EQ CNUMF1
  670. *
  671. CNUMDUN FX7 X7/X4 DIVIDE BY TENS
  672. FX6 X6+X7 ADD INTEGER AND DECIMAL PARTS TOGETHER
  673. NX6 X6 NORMALIZE RESULT
  674. *
  675. * CHECK FOR SUPERSCRIPT';
  676. *
  677. CNUMSUP SX7 B2-COPSUP SEE IF LAST CHARACTER A SUPERSCRIPT
  678. ZR X7,CSUPER
  679. *
  680. *
  681. BX6 X6-X0 X0=0 NORMALLY, BUT X0=-0 FOR UNARY MINUS
  682. EQ CNUMR EXIT
  683. * /--- BLOCK EXPONENTS 00 000 76/02/05 15.20
  684. *
  685. *
  686. *
  687. * CONSTRUCT EXPONENT
  688. *
  689. *
  690. CSUPER AX2 60-8 GET SHIFT-SUPER BIT TO BOTTOM
  691. SB4 X2 STORE IN B4 AS FLAG
  692. SA6 BASEN STORE BASE NUMBER
  693. BX6 X0 STORE SIGN OF BASE NUMBER
  694. SA6 BASSGN
  695. MX6 0 CLEAR EXPONENT
  696. MX0 0 CLEAR SIGN
  697. EQ CSUP0
  698. *
  699. CSUP00 NZ B4,CSUP0 JUMP IF LOCKING SUP
  700. RJ GETOP GET NEXT OPERATION
  701. SX7 B2-COPSUP IS IT A SUPERSCRIPT
  702. NZ X7,CXEXIT IF NOT DONT DO EXPONENTIATION
  703. CSUP0 RJ GETOP GET NEXT OPERATION
  704. SX7 B2-COPNEG IS IT A UNARY MINUS
  705. NZ X7,CSUP1
  706. BX0 -X0 TOGGLE UNARY MINUS SWITCH
  707. EQ CSUP00
  708. CSUP1 SX7 B2-COPPLUS IS IT A UNARY PLUS
  709. ZR X7,CSUP00 ARE THERE MORE + OR -
  710. *
  711. SX7 B2-COPPER CHECK FOR INITIAL DECIMAL POINT
  712. ZR X7,CEXPF JUMP IF FRACTION
  713. SX7 B2-COPNUM
  714. NZ X7,CXEXIT IF NOT NUMBER DONT DO EXPONENTIATION
  715. *
  716. CSUP2 AX2 45 GET INTEGER VALUE
  717. SX2 X2-1R0 REDUCE FROM DISPLAY CODE
  718. LX6 1 MULTIPLY BY 2
  719. BX3 X6
  720. LX6 2 MULTIPLY BY 8
  721. IX6 X6+X3 ADD UP PARTS
  722. IX6 X6+X2 ADD IN THIS DIGIT
  723. RJ GETOP GET NEXT OPERATION
  724. NZ B4,CSUP3 JUMP IF LOCKING EXPONENT
  725. SX7 B2-COPSUP IS IT A SUPERSCRIPT
  726. NZ X7,CEXPACK IF NOT GO PACK UP EXPONENT
  727. RJ GETOP GET NEXT OPERATION
  728. CSUP3 SX7 B2-COPNUM SEE IF A NUMBER
  729. ZR X7,CSUP2 IF A NUMBER, LOOP
  730. CEXPACK PX6 X6 PACK I TO F
  731. NX6 X6 NORMALIZE
  732. SX7 B2-COPPER SEE IF DECIMAL POINT
  733. NZ X7,CDOEXP IF NOT GO DO THE EXPONENTIATION
  734. * /--- BLOCK EXPONTS2 00 000 76/02/05 15.21
  735. *
  736. * FRACTIONAL PART OF EXPONENT
  737. *
  738. CEXPF SX4 1 SET X4 TO 1 (FRAC PLACE COUNT)
  739. MX7 0 CLEAR FRAC PART OF EXPONENT
  740. CEXPF1 RJ GETOP GET NEXT OPERATION
  741. NZ B4,CEXPF2 JUMP IF LOCKING SUPERSCRIPT
  742. SX3 B2-COPSUP IS IT A SUPERSCRIPT
  743. NZ X3,CEXFDON IF NOT GO PACK UP EXPONENT
  744. RJ GETOP GET NEXT CHARACTER
  745. CEXPF2 SX3 B2-COPNUM SEE IF A NUMBER
  746. NZ X3,CEXFDON IF NOT A NUMBER, EXIT
  747. AX2 45 GET INTEGER VALUE
  748. SX2 X2-1R0 REDUCE FROM DISPLAY CODE
  749. LX7 1 MULTIPLY OLD BY 10
  750. BX3 X7
  751. LX7 2
  752. IX7 X7+X3
  753. IX7 X7+X2 ADD IN THIS DIGIT
  754. *
  755. LX4 1 MULTIPLY X4 BY 10
  756. BX3 X4
  757. LX4 2
  758. IX4 X4+X3
  759. EQ CEXPF1
  760. *
  761. CEXFDON PX7 X7 PACK I TO F
  762. NX7 X7 NORMALIZE
  763. PX4 X4 PACK A TO F
  764. NX4 X4 NORMALIZE
  765. FX7 X7/X4 DIVIDE BY TENS
  766. FX6 X6+X7 ADD INTEGER AND DECIMAL PARTS TOGETHER
  767. NX6 X6 NORMALIZE RESULT
  768. * /--- BLOCK EXPONTS3 00 000 75/11/25 00.48
  769. *
  770. * NOTE'; EXPONENTIATION ROUTINE WILL SAVE
  771. * X7,X6,X5,X4,X3,X0
  772. * CLOBBERS B1,A6,A7
  773. * TEXPX USES A1-A4,X0-X7,B1-B3; SAVES X7-X3,X0,B3
  774. *
  775. CDOEXP BX6 X6-X0 GET SIGN OF EXPONENT RIGHT
  776. SX7 A1 SAVE LAST CHAR POSITION
  777. LX7 40
  778. SX3 B2 SAVE LAST OPERATION
  779. LX3 20
  780. BX7 X3+X7
  781. SX3 B4 SAVE LOCKING SUP FLAG
  782. BX7 X3+X7
  783. SA1 BASEN PUT BASE NUMBER IN X1
  784. BX2 X6 PUT EXPONENT IN X2
  785. CALL EXPON GO AND DO EXPONENTIATION
  786. *
  787. + BX6 X1 PUT RESULT IN X6
  788. SB4 X7 RESTORE LOCKING-SUP FLAG
  789. AX7 20
  790. SB2 X7 RESTORE LAST OPERATION
  791. AX7 20
  792. SA1 X7 RESTORE CHARACTER STRING ADDRESS
  793. SA2 BASSGN PICK UP SIGN OF BASE NUMBER
  794. BX6 X6-X2 GET SIGN OF NUMBER RIGHT
  795. ZR B4,CNUMR IF NOT SUP1, DONT BUMP SUB1
  796. *
  797. * GET RID OF TRAILING SUB1
  798. *
  799. SX7 B2-COPSUB SEE IF LAST OP A SUBSCRIPT
  800. NZ X7,CNUMR EXIT IF NOT
  801. RJ GETOP ADVANCE OVER THIS OPERATION
  802. EQ CNUMR EXIT
  803. *
  804. * EXIT WITHOUT DOING EXPONENTIATION IF
  805. * EXPONENT IS NOT A NUMBER
  806. *
  807. CXEXIT SA2 BASEN PICK UP BASE NUMBER
  808. SA3 BASSGN PICK UP ITS SIGN
  809. BX6 X2-X3 GET NUMBER INTO X6
  810. EQ CNUMR
  811. *
  812. * NOTE'; IF EXPONENT TURNS OUT NOT TO BE A
  813. * NUMBER SHOULD ONE BACK UP OVER SUPERSCRIPT
  814. * BEFORE RETURNING NUMBER...
  815. *
  816. *
  817. *
  818. CNUMOP BSS 1 OPCODE +-*/ 0,1,2,3
  819. FSTARG BSS 1 FIRST ARGUMENT IN A+B
  820. BASEN BSS 1 BASE NUMBER FOR EXPONENTIATION
  821. BASSGN BSS 1 SIGN OF BASE NUMBER
  822. CBSAVE BSS 1 SAVE B4 AND B5
  823. *
  824. * /--- BLOCK EXPON 00 000 76/07/23 01.40
  825. *
  826. TITLE EXPONENTIATION ROUTINE
  827. *
  828. XP CONDEN
  829. *
  830. EXPON EQ *
  831. SA7 SVBUF SAVE X7
  832. BX7 X2 B IN X2, A IN X1 FOR A**B
  833. BX0 X2
  834. SA7 EXPONT SAVE THE EXPONENT
  835. SX7 B0
  836. SA7 SIGN CLEAR THE SIGN
  837. ZR X1,OK 0**B=0
  838. PL X1,POSITIV BASE IS POSITIVE
  839. BX1 -X1 USE ABS VALUE OF BASE
  840. UX2 B1,X0 FIX THE EXPONENT, (-F1)**N OK FOR N INTEGER
  841. LX3 B1,X2
  842. PX2 X3
  843. NX2 X2
  844. BX2 X2-X0 COMPARE TRUNCATED WITH ORIGINAL EXPONENT
  845. NZ X2,EXPERR MUST BE THE SAME
  846. PL X3,ODDEVEN
  847. BX3 -X3 LOOK AT ABS VALUE OF EXPONENT
  848. ODDEVEN MX0 59 CHECK FOR PARITY O EXPONENT
  849. BX7 -X0*X3
  850. SA7 SIGN IF ODD, NEGATIVE RESULT
  851. POSITIV RJ TLNX CALL NATURAL LOG ROUTINE
  852. SA2 EXPONT RECALL EXPONENT
  853. RX1 X1*X2 LN(A**B)=B*LN(A)
  854. RJ TEXPX CALL EXPONENT ROUTINE
  855. OK SA2 SVBUF RESTORE X7
  856. BX7 X2
  857. SA2 SIGN ATTACH APPROPRIATE SIGN
  858. ZR X2,EXPON
  859. BX1 -X1 ELSE MAKE NEGATIVE
  860. EQ EXPON
  861. *
  862. *
  863. EXPONT BSS 1 SAVE THE EXPONENT
  864. SIGN BSS 1 0 FOR POS, 1 FOR NEG BASE
  865. SVBUF BSS 1 SAVE X7
  866. *
  867. *
  868. EXPERR SA1 =10LEXPONENT
  869. EQ ERRORC
  870. * /--- BLOCK TEXP 00 000 75/11/21 21.36
  871. *
  872. *
  873. *USES REGISTERS X0-X7,A1-A4,B1-B3
  874. *
  875. *TEXP TUTOR VERSION OF EXP FUNCTION.
  876. *JP TO TEXP WITH VALUE IN X1.
  877. *RETURN WITH RESULT IN X1.
  878. *
  879. TEXPX EQ *
  880. *
  881. * TOOK OUT SAVE HERE
  882. *
  883. BX0 X1 WORK ON IT IN X0
  884. OR X0,HUGEX
  885. ID X0,TEXPX EXP(0/0) IS 0/0
  886. SA1 XMAX GET XMAX
  887. MX5 0
  888. SB1 1
  889. SA3 A1+B1 GET XMIN
  890. FX7 X1-X0 XMAX-X
  891. SA2 A3+B1 GET LOG2(E)
  892. FX1 X0-X3 X-XMIN
  893. PX4 X5
  894. BX7 X7-X1 SIGN OF (XMAX-X)*(X-XMIN)
  895. FX6 X2*X0 X*LOG2(E)
  896. NG X7,HUGEX TEST FOR ARG OUT OF (XMIN,XMAX) RANGE
  897. FX7 X4+X6
  898. DX6 X4+X6
  899. RX7 X7+X6 N IS NOW AN INTEGER WITH A 2000 EXPONENT
  900. NX6 B0,X7 NORMALIZE N FOR RANGE REDUCTION
  901. SA4 A2+B1 LOG(2) UPPER
  902. SA3 A4+B1 LOG(2) LOWER
  903. FX5 X6*X4 N*LOG(2) UPPER
  904. FX1 X6*X3 N*LOG(2) LOWER
  905. FX6 X0-X5
  906. NX2 B0,X6
  907. DX0 X0-X5
  908. FX1 X0-X1
  909. FX0 X2+X1
  910. NX5 B0,X0 FINAL VALUE OF X
  911. SB4 X7 PICK UP N
  912. RX7 X5*X5
  913. SA1 A3+B1 C1=420.0
  914. SA2 A1+B1 C0=15120.0
  915. FX6 X1*X7 CC1*Z
  916. FX3 X7*X7 Z**2
  917. RX0 X6+X2 C1*Z+C0
  918. SA1 A2+B1 C3=28.0
  919. FX6 X1*X7 C3*Z
  920. RX0 X0+X3 C1*Z+C0+Z*Z=B
  921. SA2 A1+B1 C4=2520.0
  922. FX3 X5*X0 X*B
  923. RX2 X6+X2 C4+C3*Z
  924. FX4 X7*X2 Z*T
  925. FX1 X0+X0 2*B
  926. RX6 X1-X3 2*B-X*B
  927. RX1 X6+X4 Z*T+2*B-X*B=DENOM
  928. NX1 B0,X1
  929. RX7 X5/X1 TERM1=X/DENOM
  930. RX4 X3-X4 X*B-Z*T=TERM2
  931. RX3 X7*X4 Q=TERM1*TERM2
  932. SA1 A2+B1 LOAD 1.0
  933. FX2 X1+X5
  934. DX0 X1+X5
  935. NX2 B0,X2
  936. FX4 X2+X3
  937. DX7 X2+X3
  938. RX7 X0+X7
  939. RX6 X4+X7
  940. * /--- BLOCK TEXP 00 000 75/12/11 16.00
  941. UX7 B1,X6
  942. SB4 B4+B1
  943. PX1 B4,X6 RETURN RESULT IN X1
  944. NX1 X1
  945. EQ TEXPX
  946. * TOOK OUT RESTORE HERE
  947. HUGEX MX1 11 CREATE 3777......
  948. LX1 59
  949. PL X0,TEXPX EXP(1/0) IS 1/0
  950. MX1 0 BUT EXP(-1/0) IS 0
  951. EQ TEXPX
  952. * TOOK OUT RESTORE
  953. ERR EQ ERRORC
  954. *
  955. * DANGER...THE FOLLOWING OFTEN ARE USED WITHOUT DIRECT REFERENCE
  956. *
  957. XMAX DATA 741.67
  958. XMIN DATA -675.82
  959. LOG2E DATA 17205612507312256030B
  960. LOG2U DATA 17175427102775750000B
  961. LOG2L DATA 16530717363257117073B
  962. C1 DATA 420.0
  963. C0 DATA 15120.0
  964. C3 DATA 28.0
  965. C4 DATA 2520.0
  966. ONE DATA 1.0
  967. * /--- BLOCK TLNLOG 00 000 75/11/21 21.36
  968. *
  969. *
  970. *USES REGISTERS X0-X7,A1-A4,B1-B3
  971. *
  972. *TUTOR LN AND LOG FUNCTIONS.
  973. *JP TO TLN OR TLOG WITH ARGUMENT
  974. *IN X1. RETURN WITH
  975. *RESULT IN X1.
  976. *
  977. * TOOK OUT TLOGX
  978. *
  979. TLNX EQ *
  980. * TOOK OUT SAVE
  981. MX6 -1 FLAG BASE E LN
  982. RJ LNLOG
  983. EQ TLNX
  984. *
  985. LNLOG EQ *
  986. SA6 FLAG SAVE LOG TYPE
  987. ZR X1,ERR1 ARGUMENT IN X1
  988. NG X1,ERR2
  989. ID X1,LNLOG LOG(0/0) IS 0/0
  990. OR X1,LNLOG LOG(1/0) IS 1/0
  991. SA2 SQ2 1.414...*2.47
  992. UX7 B4,X1
  993. SB3 -47 TRY K=-47
  994. SB1 1
  995. IX6 X7-X2
  996. NG X6,GL
  997. SB3 B3-B1 NEED K=-48
  998. GL PX7 B3,X7 FORM W=2.K*C
  999. SA4 A2+B1 LOAD 1.0
  1000. FX0 X7-X4 (W-1.0)
  1001. NX2 B0,X0
  1002. DX0 X7-X4
  1003. RX0 X2+X0
  1004. RX2 X7+X4
  1005. RX0 X0/X2
  1006. FX7 X0*X0 Z=T*T
  1007. SA1 A4+B1 D0
  1008. SA2 A1+B1 D1
  1009. SA3 A2+B1 D2
  1010. FX6 X7*X2 Z*D1
  1011. FX4 X7*X7 Z*Z
  1012. FX1 X1+X6 D0+Z*D1
  1013. FX6 X4*X3 D2*Z*Z
  1014. FX5 X4*X7 Z**3
  1015. SA2 A3+B1 D3
  1016. FX1 X1+X6 D0+D1*Z+D2*Z*Z
  1017. FX3 X5*X2 D3*Z**3
  1018. FX1 X1+X3 TOTAL DENOMINATOR
  1019. NX5 B0,X1
  1020. FX6 X0/X5
  1021. SA2 A2+B1 C1
  1022. SA1 A2+B1 C2
  1023. FX7 X7*X2 C1*Z
  1024. FX4 X1*X4 C2*Z**2
  1025. FX3 X3+X3 2*C3*Z**3
  1026. FX0 X0+X0 2*T
  1027. FX5 X7+X3 ADD C1*Z
  1028. * /--- BLOCK TLNLOG 00 000 76/07/23 01.40
  1029. SX3 B4-B3
  1030. FX5 X5+X4 ADD C2*Z**2
  1031. PX1 X3
  1032. FX7 X6*X5 FINAL TERM OF Q
  1033. NX4 B0,X1
  1034. SA3 A1+B1 LOG(2.0)
  1035. SA2 A3+B1
  1036. FX6 X4*X3
  1037. FX5 X0-X7
  1038. FX1 X4*X2
  1039. DX4 X0-X7
  1040. NX5 B0,X5
  1041. RX4 X5+X4
  1042. RX4 X4+X1
  1043. RX4 X4+X6
  1044. NX1 B0,X4 RETURN RESULT IN X1
  1045. SA3 FLAG GET LOG TYPE
  1046. NZ X3,LNLOG
  1047. SA2 A2+B1 LOAD LOG10(E)
  1048. RX1 X1*X2 RETURN RESULT IN X1
  1049. NX1 X1
  1050. * TOOK OUT RESTORE
  1051. EQ LNLOG
  1052. ERR1 EQ ERR
  1053. ERR2 EQ ERR
  1054. *
  1055. SQ2 DATA 5520236314774736B
  1056. DATA 1.0 USED IN SEQUENCE WITH SQ2, ETC.
  1057. D0 DATA 10395.0
  1058. D1 DATA 60421030456556304033B
  1059. D2 DATA 17344525326347004201B
  1060. D3 DATA -230.419130393980937
  1061. C11 DATA 60431166777777776772B
  1062. C2 DATA 17345152701555267627B
  1063. LOGE2 DATA 17175427102775750000B
  1064. DATA 16530717363257110000B
  1065. LOG10 DATA 17166745573052233450B
  1066. FLAG DATA 0 LN/LOG10 FLAG
  1067. *
  1068. XP ENDIF
  1069. * /--- BLOCK CTABLE 00 000 77/12/08 17.05
  1070. TITLE CHARACTER DEFINITION TABLE
  1071. *
  1072. * CHARACTER DEFINITION TABLE...
  1073. *
  1074. * TABLE CONSISTS OF 4 15-BIT PARTS
  1075. * PART 1...NORMAL 6-BIT CODES
  1076. * PART 2...SHIFT CODES (12-BIT)
  1077. * PART 3...ACCESS CODES (12-BIT)
  1078. * PART 3...ACCESS-SHIFT CODES (18 BIT)
  1079. *
  1080. * THE 15 BITS ARE THE SAME FOR EACH PART...
  1081. * FIRST A 6 BIT OPERATION CODE
  1082. * THEN A FONT BIT
  1083. * THEN A SHIFT BIT
  1084. * THEN AN ACCESS BIT
  1085. * FOLLOWED BY A 6 BIT FIELD USED BY LETTERS TO
  1086. * CONTAIN THE 6 BIT LETTER CODE OR
  1087. * USED BY NUMBERS TO CONTAIN THEIR INTEGER VALUE
  1088. *
  1089. * THE OPERATION CODES ARE...
  1090. * 0=END OF LINE
  1091. * 1=LETTERS (CONSONANTS) THEN FONT,SHIFT,ACCESS,CHAR BITS
  1092. * 2=LETTERS (VOWELS) (DITTO)
  1093. * 3=DIACRITIC...LETTER OF LITTLE VALUE IN SPELLING
  1094. * 4=NUMBERS (BOTTOM BITS CONTAIN DISPLAY CODE VALUE)
  1095. * 5=SUPERSCRIPT, 6=SUBSCRIPT, 7=BACKSPACE, 8=CR
  1096. * 9=+, 10=-, 11=* AND MULTIPLY, 12=/ AND DIVIDE
  1097. * 13=SPACE, 14=,(COMMA)
  1098. * 15=. (PERIOD), 16=; AND UNI-DELIMITER, 17=(, 18=), 19=<, 20=>
  1099. * 21==(EQUAL)
  1100. * 22=START EMBED, 23=END EMBED
  1101. * 24=MISC PUNCTS
  1102. * 25=PUNCWORD
  1103. *
  1104. * THE FOLLOWING OPERATIONS ARE INVISIBLE OUTSIDE -GETOP-
  1105. * 40=FONT TOGGLE
  1106. * 41=SHIFT CODE
  1107. * 42=ACCESS CODE
  1108. * 43=ACCESS-SHIFT CODE
  1109. * 44=NULL OPS
  1110. * 45=CR (MUST SET TO BASE FONT, THEN VALUE TO COPCR)
  1111. * 46=UNI-DELIM (SET TO BASE FONT, THEN VALUE TO COPSEMI)
  1112. *
  1113. *
  1114. * FOR A TEMPORARY FIX, THE ACCESS-CONSONANT CODES HAVE
  1115. * BEEN SET UP AS VOWELS...SO THAT THEY CAN BE DISTINGUISHED
  1116. * FROM THE NORMAL LETTERS WHEN IN FIRST CHARACTER POSITION.
  1117. * ONE SHOULD BE ABLE TO UNDO THIS FIX WHEN THE HASH LOOP
  1118. * IS REMOVED/CHANGED AT -LL-
  1119. *
  1120. *
  1121. * /--- BLOCK CTABLE 00 000 78/01/17 14.51
  1122. ENTRY CONTEST
  1123. CONTEST DATA 6RSYSTEM NAME OF SYSTEM CTABLE
  1124. *
  1125. ***NOTE***
  1126. * THE FOLLOWING 129 WORDS MAY BE OVERWRITTEN BY
  1127. * SOME PARTICULAR USERS CHOICE OF DEFINITIONS.
  1128. * SEE THE ECS COPY -XCONTAB- FOR THE UNALTERED
  1129. * SYSTEM COPY
  1130. *
  1131. ENTRY CONTAB
  1132. CONTAB DATA 6RSYSTEM NAME OF TABLE CURRENTLY IN CTABLE
  1133. *
  1134. * STANDARD SHIFT ACCESS SHIFT-ACCESS
  1135. *
  1136. CTABLE VFD 15/00000B,15/00000B,15/00000B,15/00000B END OF LINE
  1137. VFD 15/02001B,15/02201B,15/01101B,15/01301B A
  1138. VFD 15/01002B,15/01202B,15/01102B,15/01302B B
  1139. VFD 15/01003B,15/01203B,15/03103B,15/01303B C
  1140. VFD 15/01004B,15/01204B,15/01104B,15/01304B D
  1141. VFD 15/02005B,15/02205B,15/03105B,15/01305B E
  1142. VFD 15/01006B,15/01206B,15/01106B,15/01306B F
  1143. VFD 15/01007B,15/01207B,15/02107B,15/02307B G
  1144. VFD 15/01010B,15/01210B,15/02110B,15/02310B H
  1145. VFD 15/02011B,15/02211B,15/01111B,15/01311B I
  1146. VFD 15/01012B,15/01212B,15/02112B,15/02312B J
  1147. VFD 15/01013B,15/01213B,15/02113B,15/02313B K
  1148. VFD 15/01014B,15/01214B,15/01114B,15/01314B L
  1149. VFD 15/01015B,15/01215B,15/01115B,15/01315B M
  1150. VFD 15/01016B,15/01216B,15/03116B,15/01316B N
  1151. VFD 15/02017B,15/02217B,15/01117B,15/01317B O
  1152. VFD 15/01020B,15/01220B,15/01120B,15/01320B P
  1153. VFD 15/01021B,15/01221B,15/03121B,15/01321B Q
  1154. VFD 15/01022B,15/01222B,15/01122B,15/01322B R
  1155. VFD 15/01023B,15/01223B,15/01123B,15/01323B S
  1156. VFD 15/01024B,15/01224B,15/01124B,15/01324B T
  1157. VFD 15/02025B,15/02225B,15/03125B,15/01325B U
  1158. VFD 15/01026B,15/01226B,15/03126B,15/01326B V
  1159. VFD 15/01027B,15/01227B,15/01127B,15/01327B W
  1160. VFD 15/01030B,15/01230B,15/03130B,15/01330B X
  1161. VFD 15/02031B,15/02231B,15/02131B,15/02331B Y
  1162. VFD 15/01032B,15/01232B,15/01132B,15/01332B Z
  1163.  
  1164. * /--- BLOCK CTABLE 00 000 80/08/06 19.48
  1165. * SHIFT-0, SHIFT-1, SHIFT-5 ARE FOR LEFTWARD WRITING --
  1166. * MADE NULL CHARS FOR ANSWER JUDGING.
  1167. * THE SAME GOES FOR ACCESS,SHIFT-0 THROUGH 7...THE COLORS
  1168. * STANDARD SHIFT ACCESS SHIFT-ACCESS
  1169. VFD 15/04033B,15/54233B,15/26133B,15/54333B 0,NULL,EMBED
  1170. VFD 15/04034B,15/54234B,15/27134B,15/54334B 1,NULL,EMBED
  1171. VFD 15/04035B,15/01235B,15/01135B,15/54335B 2,,,NULL
  1172. VFD 15/04036B,15/01236B,15/01136B,15/54336B 3,,,NULL
  1173. VFD 15/04037B,15/01237B,15/01137B,15/54337B 4,,,NULL
  1174. VFD 15/04040B,15/54240B,15/01140B,15/54340B 5,NULL,,NULL
  1175. VFD 15/04041B,15/01241B,15/01141B,15/54341B 6,,,NULL
  1176. VFD 15/04042B,15/03242B,15/01142B,15/54342B 7,,,NULL
  1177. VFD 15/04043B,15/54243B,15/01143B,15/01343B 8
  1178. VFD 15/04044B,15/54244B,15/01144B,15/01344B 9
  1179. VFD 15/11045B,15/01245B,15/01145B,15/01345B +
  1180. VFD 15/12046B,15/01246B,15/01146B,15/01346B -
  1181. VFD 15/13047B,15/54247B,15/01147B,15/01347B * FONT TAB
  1182. VFD 15/14050B,15/30250B,15/01150B,15/01350B /,QUEST,
  1183. VFD 15/21051B,15/54251B,15/01151B,15/01351B ( ALL CAPS
  1184. VFD 15/22052B,15/01252B,15/01152B,15/01352B )
  1185. VFD 15/30053B,15/01253B,15/01153B,15/01353B $
  1186. VFD 15/25054B,15/01254B,15/01154B,15/01354B =
  1187. VFD 15/15055B,15/01255B,15/01155B,15/01355B SP
  1188. VFD 15/16056B,15/01256B,15/56156B,15/01356B , ,UNI-DELM,
  1189. VFD 15/17057B,15/30257B,15/01157B,15/01357B PERIOD,EXCLM
  1190. VFD 15/14060B,15/01260B,15/01160B,15/01360B DIVIDE
  1191. VFD 15/30061B,15/54261B,15/30161B,15/01361B [ ORIENT
  1192. VFD 15/30062B,15/54262B,15/30162B,15/01362B ] ORIENT
  1193. VFD 15/01063B,15/54263B,15/01163B,15/01363B % ORIENT
  1194. VFD 15/13064B,15/01264B,15/01164B,15/01364B MULTIPLY
  1195. VFD 15/30065B,15/01265B,15/01165B,15/01365B ASSIGN
  1196. VFD 15/06066B,15/06266B,15/06166B,15/06366B SUB
  1197. VFD 15/05067B,15/05267B,15/05167B,15/05367B SUP
  1198. VFD 15/51070B,15/54270B,15/53170B,15/54370B SHIFT
  1199. VFD 15/55071B,15/55271B,15/55171B,15/55371B CR
  1200. VFD 15/23072B,15/54272B,15/01172B,15/01372B &lt; ORIENT
  1201. VFD 15/24073B,15/54273B,15/01173B,15/01373B > ORIENT
  1202. VFD 15/07074B,15/07274B,15/07174B,15/07374B BKSP
  1203. VFD 15/50075B,15/50275B,15/50175B,15/50375B FONT
  1204. VFD 15/52076B,15/54276B,15/54176B,15/54376B ACCESS
  1205. VFD 15/20077B,15/30277B,15/01177B,15/01377B SEMIC, COLN
  1206. *
  1207. *
  1208. * /--- BLOCK CTABLEF 00 000 78/01/17 14.52
  1209. *
  1210. * STANDARD SHIFT ACCESS SHIFT-ACCESS
  1211. *
  1212. CTABLEF VFD 15/00000B,15/00000B,15/00000B,15/00000B END OF LINE
  1213. VFD 15/02401B,15/02601B,15/01501B,15/01701B A
  1214. VFD 15/01402B,15/01602B,15/01502B,15/01702B B
  1215. VFD 15/01403B,15/01603B,15/01503B,15/01703B C
  1216. VFD 15/01404B,15/01604B,15/01504B,15/01704B D
  1217. VFD 15/02405B,15/02605B,15/01505B,15/01705B E
  1218. VFD 15/01406B,15/01606B,15/01506B,15/01706B F
  1219. VFD 15/01407B,15/01607B,15/02507B,15/02707B G
  1220. VFD 15/01410B,15/01610B,15/02510B,15/02710B H
  1221. VFD 15/02411B,15/02611B,15/01511B,15/01711B I
  1222. VFD 15/01412B,15/01612B,15/02512B,15/02712B J
  1223. VFD 15/01413B,15/01613B,15/02513B,15/02713B K
  1224. VFD 15/01414B,15/01614B,15/01514B,15/01714B L
  1225. VFD 15/01415B,15/01615B,15/01515B,15/01715B M
  1226. VFD 15/01416B,15/01616B,15/01516B,15/01716B N
  1227. VFD 15/02417B,15/02617B,15/01517B,15/01717B O
  1228. VFD 15/01420B,15/01620B,15/01520B,15/01720B P
  1229. VFD 15/01421B,15/01621B,15/01521B,15/01721B Q
  1230. VFD 15/01422B,15/01622B,15/01522B,15/01722B R
  1231. VFD 15/01423B,15/01623B,15/01523B,15/01723B S
  1232. VFD 15/01424B,15/01624B,15/01524B,15/01724B T
  1233. VFD 15/02425B,15/02625B,15/01525B,15/01725B U
  1234. VFD 15/01426B,15/01626B,15/01526B,15/01726B V
  1235. VFD 15/01427B,15/01627B,15/01527B,15/01727B W
  1236. VFD 15/01430B,15/01630B,15/01530B,15/01730B X
  1237. VFD 15/02431B,15/02631B,15/02531B,15/02731B Y
  1238. VFD 15/01432B,15/01632B,15/01532B,15/01732B Z
  1239. * /--- BLOCK CTABLEF 00 000 78/02/11 13.15
  1240. * SHIFT-0, SHIFT-1, SHIFT-5 ARE FOR LEFTWARD WRITING --
  1241. * MADE NULL CHARS FOR ANSWER JUDGING.
  1242. *
  1243. * STANDARD SHIFT ACCESS SHIFT-ACCESS
  1244. *
  1245. VFD 15/01433B,15/54633B,15/03533B,15/01733B 0
  1246. VFD 15/01434B,15/54634B,15/03534B,15/01734B 1
  1247. VFD 15/01435B,15/01635B,15/03535B,15/01735B 2
  1248. VFD 15/01436B,15/01636B,15/03536B,15/01736B 3
  1249. VFD 15/01437B,15/01637B,15/03537B,15/01737B 4
  1250. VFD 15/01440B,15/54640B,15/03540B,15/01740B
  1251. VFD 15/01441B,15/01641B,15/03541B,15/01741B
  1252. VFD 15/01442B,15/01642B,15/03542B,15/01742B
  1253. VFD 15/01443B,15/01643B,15/03543B,15/01743B
  1254. VFD 15/01444B,15/01644B,15/03544B,15/01744B 9
  1255. VFD 15/30445B,15/01645B,15/01545B,15/01745B +
  1256. VFD 15/30446B,15/01646B,15/01546B,15/01746B -
  1257. VFD 15/13447B,15/01647B,15/01547B,15/01747B *
  1258. VFD 15/14450B,15/30650B,15/01550B,15/01750B / QUEST
  1259. VFD 15/21451B,15/01651B,15/01551B,15/01751B (
  1260. VFD 15/22452B,15/01652B,15/01552B,15/01752B )
  1261. VFD 15/30453B,15/01653B,15/01553B,15/01753B $
  1262. VFD 15/30454B,15/01654B,15/01554B,15/01754B =
  1263. VFD 15/15455B,15/01655B,15/01555B,15/01755B SP
  1264. VFD 15/16456B,15/01656B,15/56556B,15/01756B ,,UNI-DELM
  1265. VFD 15/17457B,15/30657B,15/01557B,15/01757B PERIOD,EXCLM
  1266. VFD 15/30460B,15/01660B,15/01560B,15/01760B DIVIDE
  1267. VFD 15/30461B,15/01661B,15/01561B,15/01761B [
  1268. VFD 15/30462B,15/01662B,15/01562B,15/01762B ]
  1269. VFD 15/01463B,15/01663B,15/01563B,15/01763B PERCENT
  1270. VFD 15/30464B,15/01664B,15/01564B,15/01764B MULTIPLY
  1271. VFD 15/30465B,15/01665B,15/01565B,15/01765B ASSIGN
  1272. VFD 15/06466B,15/06666B,15/06566B,15/06766B SUB
  1273. VFD 15/05467B,15/05667B,15/05567B,15/05767B SUP
  1274. VFD 15/51470B,15/54670B,15/53570B,15/54770B SHIFT
  1275. VFD 15/55471B,15/55671B,15/55571B,15/55771B CR
  1276. VFD 15/23472B,15/01672B,15/01572B,15/01772B &lt;
  1277. VFD 15/24473B,15/01673B,15/01573B,15/01773B >
  1278. VFD 15/07474B,15/07674B,15/07574B,15/07774B BKSP
  1279. VFD 15/50475B,15/50675B,15/50575B,15/50775B FONT
  1280. VFD 15/52476B,15/54676B,15/54576B,15/54776B ACCESS
  1281. VFD 15/20477B,15/30677B,15/01577B,15/01777B ; COLON
  1282. *
  1283. * /--- BLOCK GETOP 00 000 77/12/07 16.03
  1284. * GETOP PICKS UP A 6-BIT CHAR FROM A1, UPDATES A1, DELIVERS
  1285. * 6-BIT OPCODE IN B2 LOWER, 9-BIT CHAR IN X2 UPPER. 'VARIOUS
  1286. * FONT/ACC FLAGS GET UPDATED.
  1287. *
  1288. *
  1289. ENTRY GETOP
  1290. GETOP EQ * GET NEXT OPERATION CODE
  1291. SB2 0
  1292. SA0 A1 SAVE ADDRESS OF END OF LAST CHARACTER
  1293. GETOP1 SA1 A1+1 GET NEXT CHARACTER
  1294. SA2 FONTFLG GET NORMAL OR FONT TABLE
  1295. IX2 X1+X2
  1296. SA2 CTABLE+X2 GET TABLE ENTRY
  1297. LX2 B2,X2 GET PROPER CODE FIELD
  1298. MX1 6 MAKE MASK FOR OPERATION CODE
  1299. BX1 X1*X2 GET OPERATION CODE
  1300. BX2 X1-X2 CLEAR OP CODE FROM X2
  1301. LX1 6
  1302. SB2 X1 GET OPERATION CODE INTO B2
  1303. SX1 X1-50B SEE IF SPECIAL GETOP FUNCTION
  1304. NG X1,GETOP
  1305. SB2 X1
  1306. *
  1307. JP B2+GETOPFT DO SPECIAL FUNCTION
  1308. GETOPFT SB2 0 FONT
  1309. EQ GETOPF
  1310. + SB2 15 SHIFT
  1311. EQ GETOP1
  1312. + SB2 30 ACCESS
  1313. EQ GETOP1
  1314. + SB2 45 ACCESS-SHIFT
  1315. EQ GETOP1
  1316. + SB2 0 NULL OPERATION
  1317. EQ GETOP1
  1318. + SB2 COPCR SET TO CARRIAGE RETURN
  1319. EQ GETOPCR
  1320. + SB2 COPSEMI SET TO SEMICOLON RETURN
  1321. EQ GETOPNI
  1322. *
  1323. GETOPF SA2 FONTFLG FONT...TOGGLE BIT
  1324. BX1 X7 SAVE CONTENTS OF X7
  1325. SX7 100B
  1326. BX7 X2-X7
  1327. SA7 A2
  1328. BX7 X1 RESTORE X7
  1329. SA0 A1 AND UPDATE LAST CHARACTER ADDRESS
  1330. EQ GETOP1
  1331. *
  1332. GETOPCR BX1 X7 SAVE X7
  1333. MX7 0 CLEAR TO BASE FONT
  1334. SA7 FONTFLG
  1335. BX7 X1 RESTORE
  1336. EQ GETOP
  1337. *
  1338. GETOPNI BX1 X7 SAVE X7 UNI-DELIMETER
  1339. MX7 0 CLEAR TO BASE FONT
  1340. SA7 FONTFLG
  1341. BX7 X1 RESTORE
  1342. EQ GETOP
  1343. * /--- BLOCK GETOP 00 000 76/10/19 12.28
  1344. * GETOPN IS LIKE GETOP, BUT A1 IS NOT ADVANCED, AND
  1345. * FONT/ACC FLAGS ARE NOT UPDATED. GETOPN IS USED TO LOOK
  1346. * AHEAD ONE CHAR WHEN NECESSARY.
  1347. *
  1348. *
  1349. CONDEN
  1350. ENTRY GETOPN
  1351. ENDIF
  1352. GETOPN EQ * GET NEXT OPERATION CODE
  1353. SA3 A1 GET ADDRESS OF LAST CHARACTER
  1354. SB3 0
  1355. GETOPN1 SA3 A3+1 GET NEXT CHARACTER
  1356. SA4 FONTFLG GET NORMAL OR FONT TABLE
  1357. IX4 X3+X4
  1358. SA4 CTABLE+X4 GET TABLE ENTRY
  1359. LX4 B3,X4 GET PROPER CODE FIELD-- NORMAL,SHIFT,ACCESS
  1360. MX3 6 MAKE MASK FOR OPERATION CODE
  1361. BX3 X3*X4 GET OPERATION CODE
  1362. BX4 X3-X4 CLEAR OP CODE FROM X2
  1363. LX3 6
  1364. SB3 X3 GET OPERATION CODE IN B3
  1365. SX3 X3-50B
  1366. NG X3,GETOPN
  1367. SB3 X3
  1368. *
  1369. JP B3+GETPNFT DO SPECIAL FUNCTION
  1370. GETPNFT SB3 0 FONT...DO NOT GO OVER AT THIS TIME
  1371. EQ GETOPN
  1372. + SB3 15 SHIFT
  1373. EQ GETOPN1
  1374. + SB3 30 ACCESS
  1375. EQ GETOPN1
  1376. + SB3 45 ACCESS-SHIFT
  1377. EQ GETOPN1
  1378. + SB3 0 NULL OPERATION...DO NOT GO OVER
  1379. EQ GETOPN
  1380. + SB3 0 DO NOT GO OVER CR AT THIS TIME
  1381. EQ GETOPN
  1382. + SB3 0 DO NOT GO OVER UNI-DELIM AT THIS TIME
  1383. EQ GETOPN
  1384. *
  1385. *
  1386. END
plato/source/plaopl/conten.txt ยท Last modified: 2023/08/05 18:54 by Site Administrator