User Tools

Site Tools


cdc:nos2.source:opl871:demux

Table of Contents

DEMUX

Table Of Contents

  • [00007] DEMUX - PROCESS STIMULATOR OUTPUT.
  • [00011] PROCESS STIMULATOR OUTPUT.
  • [00081] INTERNAL DOCUMENTATION.
  • [00148] MACRO DEFINITIONS AND ASSEMBLY CONSTANTS.
  • [00150] INPUT - INPUT NEXT DATA WORD.
  • [00164] OUTPUT - OUTPUT CHARACTER FROM (X6).
  • [00219] FETS AND WORKING STORAGE.
  • [00252] DEMUX MAIN LOOP.
  • [00254] STIMULA DATA PROCESSOR.
  • [00304] SUBROUTINES.
  • [00306] CEL - CHECK FOR END OF LINE.
  • [00328] FCD - FORMAT CHARACTER DATA.
  • [00384] FLB - FLUSH LINE BUFFERS.
  • [00439] FTD - FORMAT TRACE DATA.
  • [00550] FTS - FORMAT TIME STAMP.
  • [00635] GNW - GET NEXT WORD.
  • [00688] INP - INPUT NEXT DATA WORD.
  • [00727] IRR - INITIATE/RESUME *RPHRLS* REQUEST.
  • [00769] SPD - SORT PRU DIRECTORY.
  • [00795] SWB - STORE WRITE BUFFER DATA.
  • [00844] UPD - UPDATE PRU DIRECTORY AND POINTERS.
  • [00912] DEMUX CONVERSION TABLE.
  • [01200] PRESET PROGRAM.
  • [01202] PRS - PRESET PROGRAM.

Source Code

DEMUX.txt
  1. IDENT DEMUX,110B
  2. ABS
  3. SST FL,TR
  4. ENTRY DEMUX
  5. ENTRY RFL=
  6. SYSCOM B1
  7. TITLE DEMUX - PROCESS STIMULATOR OUTPUT.
  8. *COMMENT DEMUX - PROCESS STIMULATOR OUTPUT.
  9. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  10. SPACE 4,10
  11. *** DEMUX - PROCESS STIMULATOR OUTPUT.
  12. * JERRY BRANHAM. 74/05/07.
  13. * R. A. JAPS 78/05/25.
  14. * D. K. ELDRED. 82/01/18.
  15. SPACE 4,10
  16. *** DEMUX TRANSLATES THE OUTPUT FROM THE NOS STIMULATORS AND
  17. * OPTIONALLY PROCESSES TIME STAMP AND/OR TRACE DATA.
  18. SPACE 4,30
  19. *** CONTROL STATEMENT CALL.
  20. *
  21. * DEMUX(P1,P2,...,PN)
  22. *
  23. * PN DEFAULT MEANING
  24. *
  25. * I *STIMOUT* FILE CONTAINING STIMULATOR DATA.
  26. *
  27. * NR REWIND DO NOT REWIND STIMULATOR AND OUTPUT FILES
  28. * BEFORE EXECUTION. CANNOT BE EQUIVALENCED.
  29. *
  30. * NT 1 NUMBER OF TERMINALS TO PROCESS. RANGE IS
  31. * FROM 1 TO 512 DECIMAL. IF NO POST RADIX
  32. * IS SPECIFIED, OCTAL BASE IS ASSUMED.
  33. *
  34. * O *OUTPUT* FILE TO RECEIVE TRANSLATED SESSION OUTPUT.
  35. *
  36. * SL NONE SELECTED LINE TO BE PROCESSED. THIS MUST
  37. * BE WITHIN THE RANGE SPECIFIED BY *NT*. IF
  38. * NO POST RADIX IS SPECIFIED, OCTAL BASE IS
  39. * ASSUMED.
  40. *
  41. * T NONE PROCESS TIME STAMP DATA. CANNOT BE
  42. * EQUIVALENCED.
  43. *
  44. * TR NONE FILE TO RECEIVE TRACE OUTPUT. IF *TR* IS
  45. * OMITTED, TRACE DATA IS IGNORED. IF *TR*
  46. * IS UNEQUIVALENCED, THE FILE SPECIFIED BY
  47. * *O* WILL ALSO BE USED FOR TRACE OUTPUT.
  48. SPACE 4,15
  49. *** DAYFILE MESSAGES.
  50. *
  51. * * DEMUX ARGUMENT ERROR.* = AN ILLEGAL ARGUMENT WAS USED, OR
  52. * AN ARGUMENT WAS ILLEGALLY EQUIVALENCED.
  53. *
  54. * * DEMUX COMPLETE.* = NORMAL TERMINATION.
  55. *
  56. * * DEMUX MEMORY OVERFLOW.* = REQUIRED FL EXCEEDED MFL FOR JOB
  57. * STEP. POSSIBLE SOLUTIONS ARE TO DECREASE THE *NT*
  58. * VALUE, TO INCREASE THE JOB STEP MFL, OR TO REDUCE THE
  59. * MEMORY REQUIREMENTS BY ADJUSTING ONE OR MORE DEMUX
  60. * ASSEMBLY PARAMETERS - SEE *PROGRAMMING CONSIDERATIONS*.
  61. *
  62. * * DEMUX NUMERIC ARGUMENT CONVERSION ERROR.* = A NUMERIC
  63. * ARGUMENT WAS INVALID.
  64. *
  65. * * DEMUX NT VALUE TOO LARGE.* = *NT* VALUE EXCEEDS 512.
  66. *
  67. * * DEMUX SL VALUE TOO LARGE.* = *SL* VALUE EXCEEDS *NT* VALUE.
  68. SPACE 4,10
  69. *** OPERATOR MESSAGES.
  70. *
  71. * * COPYING SESSION DATA TO OUTPUT* = DATA FROM THE SCRATCH
  72. * FILE IS BEING COPIED TO THE OUTPUT FILE.
  73. *
  74. * * TRANSLATING STIMULATOR OUTPUT* = DATA IS BEING TRANSLATED
  75. * AND COPIED TO THE SCRATCH FILE.
  76. SPACE 4,10
  77. *** COMMON DECKS.
  78.  
  79.  
  80. *CALL COMCMAC
  81. TITLE INTERNAL DOCUMENTATION.
  82. SPACE 4,10
  83. ** STIMULATOR DATA FORMATS.
  84. *
  85. * TWO TYPES OF DATA ARE PRODUCED BY THE NOS STIMULATORS AND
  86. * PROCESSED BY DEMUX - CHARACTER DATA AND TRACE DATA.
  87. SPACE 4,20
  88. ** CHARACTER DATA FORMAT.
  89. *
  90. *T CHARDATA 1/0,11/ TERMINAL,12/ DATA,12/ DATA,12/ DATA,12/ DATA
  91. *
  92. * TERMINAL = TERMINAL NUMBER.
  93. *
  94. * EACH *DATA* BYTE HAS THREE POSSIBLE FORMATS -
  95. *
  96. *T NORMAL 1/0,3/,8/ ASCII
  97. *
  98. *T SECOND 1/1,1/1,10/ SECONDS
  99. *
  100. *T MILLI 1/1,1/0,10/ MILLISEC
  101. *
  102. * ASCII = NORMAL CHARACTER DATA.
  103. * SECONDS = SECONDS PORTION OF TIME STAMP DATA.
  104. * MILLISEC = MILLISECONDS PORTION OF TIME STAMP DATA.
  105. SPACE 4,20
  106. ** TRACE DATA FORMAT.
  107. *
  108. * TRACE DATA HAS THE FOLLOWING FORMAT -
  109. *
  110. *T TRACE1 1/1,11/ TERMINAL,24/ *1TE* STATUS,12/ SECONDS,12/ MILLISEC
  111. *T,TRACE2 1/1,11/ TERMINAL,12/ *1TE* ADDR,12/ INPCHR,12/ OUTCHR,12/ 0
  112. *
  113. * TERMINAL = TERMINAL NUMBER.
  114. * *1TE* STATUS = BYTES 0 AND 1 FROM *1TE* TERMINAL TABLE.
  115. * SECONDS = SECOND CLOCK.
  116. * MILLISEC = MILLISECOND CLOCK.
  117. * *1TE* ADDR = *1TE* ADDRESS FOR NEXT OUTPUT ROUTINE (*TOCA*
  118. * TABLE ENTRY FOR THE TERMINAL).
  119. * INPCHR = INPUT CHARACTER TO BE PROCESSED.
  120. * OUTCHR = OUTPUT CHARACTER SENT.
  121. SPACE 4,25
  122. ** PROGRAMMING CONSIDERATIONS.
  123. *
  124. * IN ORDER TO EFFICIENTLY PROCESS VARIABLE AMOUNTS OF SESSION
  125. * DATA FOR VARIABLE NUMBERS OF TERMINALS, DEMUX AUTOMATICALLY
  126. * ALLOCATES MEMORY FOR LINE TABLES (ONE PER TERMINAL AS SET
  127. * BY THE *NT* ARGUMENT).
  128. *
  129. * IN ORDER TO AVOID A TIME CONSUMING AND INEFFICIENT SORT OF
  130. * THE STIMULATOR DATA, WHILE STILL PROVIDING OUTPUT DATA IN
  131. * ASCENDING TERMINAL NUMBER ORDER, A *PRU DIRECTORY* IS KEPT
  132. * WHICH ASSOCIATES THE SCRATCH FILE PRUS WITH THE RESPECTIVE
  133. * TERMINALS. IN THIS MANNER, THE OUTPUT FILE IS SORTED AS
  134. * REQUIRED WITHOUT EVER ACTUALLY MOVING ANY DATA - THE SCRATCH
  135. * FILE IS SIMPLY READ IN RANDOM ORDER AND THE ONLY SORTING IS
  136. * DONE ON THE PRU DIRECTORY ITSELF.
  137. *
  138. * SINCE BOTH THE LINE TABLES AND PRU DIRECTORY ARE DYNAMICALLY
  139. * CREATED, AND SINCE ADDITIONAL MEMORY IS OBTAINED AS REQUIRED
  140. * FOR THE PRU DIRECTORY, IT IS POSSIBLE TO REQUIRE MORE MEMORY
  141. * THAN IS AVAILABLE. THIS IS MINIMIZED BY ENSURING THAT THE
  142. * LINE TABLES WILL NOT EXCEED 300000B. HOWEVER, EXTREMELY
  143. * LARGE SESSIONS AND EXTREMELY LARGE NUMBERS OF TERMINALS MAY
  144. * REQUIRE ADJUSTMENT OF SOME ASSEMBLY PARAMETERS. IF ONLY A
  145. * SMALL NUMBER OF TERMINALS WILL BE STIMULATED, DECREASING
  146. * *MTN* AND INCREASING *LBUFL* WILL INCREASE SPEED SLIGHTLY.
  147. EJECT
  148. TITLE MACRO DEFINITIONS AND ASSEMBLY CONSTANTS.
  149. INPUT SPACE 4,10
  150. ** INPUT - INPUT NEXT DATA WORD.
  151. *
  152. * INPUT
  153. *
  154. * EXIT (X6) = DATA WORD.
  155. *
  156. * CALLS INP.
  157.  
  158.  
  159. PURGMAC INPUT
  160. INPUT MACRO
  161. RJ INP
  162. ENDM
  163. OUTPUT SPACE 4,10
  164. ** OUTPUT - OUTPUT CHARACTER FROM (X6).
  165. *
  166. * OUTPUT
  167. *
  168. * (X6) WILL BE WRITTEN TO THE OUTPUT FILE.
  169. *
  170. * CALLS SWB.
  171.  
  172.  
  173. PURGMAC OUTPUT
  174. OUTPUT MACRO
  175. RJ SWB
  176. ENDM
  177. SPACE 4,10
  178. **** ASSEMBLY PARAMETERS.
  179.  
  180.  
  181. IBUFL EQU 3001B INPUT BUFFER LENGTH
  182. LBUFL EQU 300B LINE BUFFER LENGTH
  183. ERRNZ LBUFL-LBUFL/100B*100B MUST BE MULTIPLE OF PRU
  184. 7 ERRNG 300000B-MTN*LBUFL MAY EXCEED AVAILABLE FL
  185. OBUFL EQU 3001B OUTPUT BUFFER LENGTH
  186. SBUFL EQU 3001B SCRATCH BUFFER LENGTH
  187. WBUFL EQU 400B WORKING BUFFER LENGTH
  188. MEMI EQU 1000B INITIAL / INCREMENTAL PRU DIRECTORY SIZE
  189. MTN EQU 512D MAXIMUM NUMBER OF TERMINALS
  190. ****
  191. TABLE SPACE 4,30
  192. *** LINE TABLE STRUCTURE.
  193. *
  194. * FOR EACH TERMINAL BEING PROCESSED, A LINE TABLE EXISTS WITH
  195. * THE FOLLOWING FORMAT.
  196. *
  197. *T LASM 60/ TEXT ASSEMBLY BUFFER
  198. *T,LCNT 60/ WORD COUNT IN CURRENT LINE
  199. *T,LPTR 1/F,59/ OFFSET INTO *LBUF*
  200. *T,LSEC 60/ LAST SECONDS
  201. *T,LSHF 60/ SHIFT COUNT FOR NEXT CHARACTER
  202. *T,LTIM 60/ TIME ADDER
  203. *T,LBUF 60/ *LBUFL* WORD LINE BUFFER
  204. *
  205. * F = 0, IF SESSION DATA FOR THIS LINE HAS BEEN ENCOUNTERED.
  206. * = 1, IF NO SESSION DATA HAS BEEN ENCOUNTERED.
  207.  
  208.  
  209. BEGIN BSSN 0
  210. LASM BSSN 1 TEXT ASSEMBLY BUFFER
  211. LCNT BSSN 1 WORD COUNT
  212. LPTR BSSN 1 BUFFER POINTER
  213. LSEC BSSN 1 LAST SECONDS
  214. LSHF BSSN 1 SHIFT COUNT
  215. LTIM BSSN 1 TIME ADDER
  216. LBUF BSSN LBUFL LINE BUFFER
  217. LNLG BSSN 0 LINE TABLE LENGTH
  218. END BSSN
  219. TITLE FETS AND WORKING STORAGE.
  220. FETS SPACE 4,10
  221. * FETS AND CONSTANTS.
  222.  
  223.  
  224. ORG 110B
  225.  
  226.  
  227. I BSS 0
  228. STIMOUT FILEB IBUF,IBUFL
  229.  
  230. O BSS 0
  231. OUTPUT FILEB OBUF,OBUFL
  232.  
  233. R BSS 0
  234. TR BSS 0
  235. TRACE FILEB OBUF,OBUFL
  236.  
  237. S BSS 0
  238. SCR FILEB SBUF,SBUFL,(FET=6)
  239. SPACE 4,10
  240. * DIRECT CELLS.
  241.  
  242.  
  243. FL BSS 2 CURRENT FL / JOB STEP MFL
  244. LW BSS 1 LAST WORD STORED IN LINE BUFFER
  245. MR BSS 1 *MEM* REQUEST WORD
  246. NR BSS 1 NO REWIND FLAG
  247. NT CON 0L1 NUMBER OF TERMINALS TO PROCESS
  248. PD BSS 2 FWA / NEXT PRU DIRECTORY
  249. PN CON 1 NEXT PRU ON *SCR*
  250. SL BSS 1 SELECTED LINE TO PROCESS - 0 = ALL LINES
  251. T BSS 1 TIME STAMP FLAG
  252. TITLE DEMUX MAIN LOOP.
  253.  
  254. ** DEMUX - STIMULA DATA PROCESSOR.
  255.  
  256. DEMUX SB1 1
  257. RJ PRS PRESET PROGRAM
  258. READEI I INITIATE READ ON *STIMOUT* FILE
  259. MESSAGE (=C* TRANSLATING STIMULATOR OUTPUT*),1
  260. DEM1 RJ GNW GET NEXT WORD
  261. NZ X1,DEM5 IF EOI
  262. NZ B7,DEM3 IF NOT TRACE DATA
  263. RJ FTD FORMAT TRACE DATA
  264. EQ DEM1 PROCESS NEXT WORD
  265.  
  266. DEM2 SB7 B7-1 DECREMENT CHARACTER COUNT
  267. PL B7,DEM3 IF CHARACTERS REMAIN TO BE PROCESSED
  268. SA6 B6+LASM SAVE DATA WORD
  269. SX6 B3+ SAVE SHIFT COUNT
  270. SA6 B6+LSHF
  271. EQ DEM1 PROCESS NEXT WORD
  272.  
  273. DEM3 NG X5,DEM4 IF TIME STAMP DATA
  274. RJ FCD FORMAT CHARACTER DATA
  275. EQ DEM2 PROCESS NEXT CHARACTER
  276.  
  277. DEM4 RJ FTS FORMAT TIME STAMP
  278. EQ DEM2 PROCESS NEXT CHARACTER
  279.  
  280. * COPY SESSION DATA TO OUTPUT.
  281.  
  282. DEM5 RJ FLB FLUSH LINE BUFFERS
  283. MESSAGE (=C* COPYING SESSION DATA TO OUTPUT*),1
  284. REWIND S,R
  285. RJ SPD SORT PRU DIRECTORY
  286. WRITEW O,(=10H1 ),1 ISSUE PAGE EJECT
  287. DEM6 RJ IRR INITIATE/RESUME *RPHRLS* REQUEST
  288. READW S,WBUF,WBUFL
  289. NZ X1,DEM7 IF END OF DATA
  290. WRITEW O,WBUF,WBUFL
  291. EQ DEM6 LOOP
  292.  
  293. DEM7 SB7 B6-WBUF CHECK FOR DATA REMAINING IN *WBUF*
  294. ZR B7,DEM8 IF NO DATA LEFT IN BUFFER
  295. WRITEW O,WBUF,B7 WRITE FRAGMENT TO OUTPUT FILE
  296. DEM8 SA1 S+5 CHECK FOR END OF LIST
  297. SA1 X1+
  298. NZ X1,DEM6 IF NOT EOI
  299. WRITEW O,(=0),1 TERMINATE LAST LINE
  300. WRITER X2
  301. RETURN S
  302. MESSAGE (=C* DEMUX COMPLETE.*)
  303. ENDRUN
  304. TITLE SUBROUTINES.
  305. CEL SPACE 4,15
  306. ** CEL - CHECK FOR END OF LINE.
  307. *
  308. * ENTRY (B6) = LINE TABLE ADDRESS.
  309. * (LW) = LAST WORD STORED IN LINE BUFFER.
  310. *
  311. * EXIT END OF LINE ENSURED.
  312. *
  313. * USES X - 0, 1, 6.
  314. * A - 1.
  315. *
  316. * MACROS OUTPUT.
  317.  
  318.  
  319. CEL SUBR ENTRY/EXIT
  320. SA1 LW
  321. MX0 -12
  322. BX1 -X0*X1
  323. ZR X1,CELX IF END OF LINE
  324. SX6 B0+
  325. OUTPUT
  326. EQ CELX RETURN
  327. FCD SPACE 4,20
  328. ** FCD - FORMAT CHARACTER DATA.
  329. *
  330. * ENTRY (X5) = DATA WORD.
  331. * (X6) = ASSEMBLY WORD.
  332. * (B3) = SHIFT COUNT.
  333. * (B6) = LINE TABLE ADDRESS.
  334. *
  335. * EXIT CHARACTER ADDED TO LINE DATA.
  336. * (X5), (X6), (B3) UPDATED.
  337. *
  338. * USES X - 0, 1, 2, 4, 5, 6, 7.
  339. * A - 1, 2, 6.
  340. * B - 3.
  341. *
  342. * CALLS CEL.
  343. *
  344. * MACROS OUTPUT.
  345.  
  346.  
  347. FCD SUBR ENTRY/EXIT
  348. LX5 12 EXTRACT CHARACTER
  349. MX0 -8
  350. BX2 -X0*X5
  351. AX2 1
  352. SA1 ASCI+X2 TRANSLATE CHARACTER
  353. NG X1,FCDX IF UNPRINTABLE CHARACTER
  354. MX0 -6
  355. BX4 -X0*X1
  356. LX4 B3
  357. BX6 X6+X4
  358. SB3 B3-6 DECREMENT SHIFT COUNT
  359. SA6 LW
  360. NZ X1,FCD1 IF NOT CARRIAGE RETURN
  361. OUTPUT
  362. EQ FCD2 PROCESS END OF LINE
  363.  
  364. FCD1 PL B3,FCDX IF DATA WORD NOT FULL
  365. SA6 LW
  366. OUTPUT
  367. SA2 LW
  368. SA1 B6+LCNT CHECK LINE SIZE
  369. MX6 0
  370. ZR X2,FCD3 IF END OF LINE
  371. SX6 X1+B1
  372. SX7 X6-12
  373. NG X7,FCD3 IF LINE LIMIT NOT EXCEEDED
  374. FCD2 RJ CEL CHECK FOR END OF LINE
  375. SA1 =10H INDENT NEXT LINE
  376. BX6 X1
  377. OUTPUT
  378. BX6 X6-X6 SET END OF LINE
  379. FCD3 SA6 B6+LCNT UPDATE LINE WORD COUNT
  380. SB3 54 RESET SHIFT COUNT
  381. BX6 X6-X6 CLEAR ASSEMBLY REGISTER
  382. EQ FCDX RETURN
  383. FLB SPACE 4,15
  384. ** FLB - FLUSH LINE BUFFERS.
  385. *
  386. * EXIT ALL LINE BUFFERS FLUSHED TO *SCR*.
  387. * * END OF THE LINE * WRITTEN TO *SCR* FOR EACH LINE.
  388. * TRACE FILE FLUSHED IF USED.
  389. *
  390. * USES X - 0, 1, 3, 6, 7.
  391. * A - 1, 6, 7.
  392. * B - 5, 6.
  393. *
  394. * CALLS UPD.
  395. *
  396. * MACROS RECALL, WRITER, WRITEW.
  397.  
  398.  
  399. FLB SUBR ENTRY/EXIT
  400. SX0 B0+
  401. RECALL S
  402. FLB1 SX1 LNLG FLUSH OUTPUT IN BUFFER, IF ANY
  403. IX7 X0*X1
  404. SB6 X7+AMEM
  405. SA1 B6+LPTR
  406. SX6 X1+
  407. SA6 FLBA
  408. NG X1,FLB3 IF NO SESSION DATA
  409. ZR X1,FLB2 IF NO DATA IN BUFFER
  410. WRITEW S,B6+LBUF,X1 FLUSH DATA TO *SCR*
  411. FLB2 SX1 X0+1 CONVERT TERMINAL NUMBER TO DISPLAY
  412. RJ CDD
  413. MX6 48
  414. BX7 X6*X4
  415. SA7 FLBB+5 ADD TERMINAL NUMBER TO SESSION TERMINATOR
  416. WRITEW S,FLBB,FLBBL ISSUE SESSION TERMINATOR
  417. WRITER X2,R
  418. SA1 FLBA
  419. SX3 X1+FLBBL+100B CALCULATE NUMBER OF PRUS REQUIRED
  420. SB5 X0 SET TERMINAL NUMBER
  421. AX3 6
  422. RJ UPD UPDATE PRU DIRECTORY AND POINTERS
  423. FLB3 SX0 X0+B1
  424. SA1 NT
  425. IX1 X0-X1
  426. NG X1,FLB1 IF MORE TERMINALS TO PROCESS
  427. SA1 FTD CHECK FOR TRACE DATA
  428. ZR X1,FLBX IF NO TRACE DATA
  429. WRITER R,R FLUSH TRACE FILE
  430. EQ FLBX RETURN
  431.  
  432.  
  433. FLBA BSS 1 WORD COUNT IN BUFFER
  434. FLBB CON 0 END OF LINE
  435. DATA C* END OF THE LINE ------------------------------*
  436. DATA 10H1 PAGE EJECT FOR NEXT SESSION
  437. FLBBL EQU *-FLBB
  438. FTD SPACE 4,15
  439. ** FTD - FORMAT TRACE DATA.
  440. *
  441. * ENTRY (X6) = FIRST WORD OF TRACE DATA.
  442. * (TN) = TERMINAL NUMBER.
  443. *
  444. * EXIT TRACE DATA PROCESSED IF SELECTED.
  445. *
  446. * USES X - ALL.
  447. * A - 1, 3, 4, 5, 6, 7.
  448. * B - NONE.
  449. *
  450. * CALLS CFD, WOD.
  451. *
  452. * MACROS INPUT, WRITEW.
  453.  
  454.  
  455. FTD SUBR ENTRY/EXIT (ALSO USED AS FLAG)
  456. SA6 FTDA SAVE FIRST TRACE WORD
  457. INPUT
  458. SA6 FTDA+1 SAVE SECOND TRACE WORD
  459. SA1 TR
  460. ZR X1,FTDX IF TRACE NOT SELECTED
  461.  
  462. * TRANSLATE INPUT AND OUTPUT CHARACTERS.
  463.  
  464. MX0 -59
  465. BX1 -X0*X6
  466. MX0 -7
  467. AX6 12
  468. BX2 -X0*X6 EXTRACT OUTPUT CHARACTER
  469. AX6 12
  470. SA3 TASC+X2 TRANSLATE OUTPUT CHARACTER
  471. BX4 -X0*X6 EXTRACT INPUT CHARACTER
  472. LX7 X3
  473. SA5 TASC+X4 TRANSLATE INPUT CHARACTER
  474. SA7 FTDB+5
  475. BX7 X5
  476. SA7 FTDB+3
  477.  
  478. * PROCESS DATA IN SECOND TRACE WORD.
  479.  
  480. AX1 6 POSITION DATA WORD
  481. RJ WOD CONVERT SECOND TRACE WORD TO OCTAL
  482. BX1 X6 SAVE UPPER OCTAL TRANSLATION
  483. MX0 -24
  484. SA4 =6L GET SPACE FILL
  485. AX7 12
  486. BX6 -X0*X7
  487. BX6 X6+X4
  488. LX6 18
  489. SA6 A7+1 STORE OUTPUT CHARACTER OCTAL
  490. AX7 24
  491. BX6 -X0*X7
  492. BX7 X6+X4
  493. LX7 18
  494. SA7 A7-B1 STORE INPUT CHARACTER OCTAL
  495. BX6 -X0*X1
  496. AX1 24
  497. BX6 X6+X4
  498. LX6 18
  499. BX7 -X0*X1
  500. SA6 A6+2 STORE DRIVER ADDRESS
  501. BX7 X7+X4
  502. LX7 18
  503. SA7 A7-B1 STORE PORT NUMBER
  504.  
  505. * PROCESS DATA IN FIRST TRACE WORD.
  506.  
  507. SA1 FTDA
  508. AX1 24 IGNORE TIME STAMP DATA
  509. RJ WOD
  510. BX1 X6 SAVE UPPER OCTAL TRANSLATION
  511. MX0 -48
  512. BX6 -X0*X7
  513. LX6 12 POSITION DATA AND CREATE END OF LINE
  514. SA6 A6+1
  515.  
  516. * PROCESS TIME DATA.
  517.  
  518. SA1 FTDA CONVERT TIME
  519. MX0 -12
  520. BX2 -X0*X1 EXTRACT MILLISECONDS
  521. AX1 12
  522. BX1 -X0*X1 EXTRACT SECONDS
  523. SX6 1000
  524. IX1 X6*X1 MERGE SECONDS AND MILLISECONDS
  525. IX1 X1+X2
  526. RJ CFD CONVERT TO F10.3 FORMAT
  527. SA6 FTDB
  528.  
  529. * WRITE COMPLETED LINE TO TRACE FILE.
  530.  
  531. SA1 FTDC CHECK PAGE POSITION
  532. SX6 X1-1
  533. SA6 A1+
  534. PL X6,FTD1 IF NO PAGE HEADING REQUIRED
  535. SX6 LINP-1
  536. SA6 A6+
  537. WRITEW R,FTDD,FTDDL WRITE PAGE HEADING TO TRACE FILE
  538. FTD1 WRITEW R,FTDB,8
  539. EQ FTDX RETURN
  540.  
  541.  
  542. FTDA BSS 2
  543. FTDB BSS 8 TRACE LINE ASSEMBLY BUFFER
  544. FTDC CON 0 LINES REMAINING ON PAGE
  545. FTDD DATA C*1 TIME PORT --INPUT CHARACTER-- --OUTPUT CHA
  546. ,RACTER-- ADDR PARAMETERS*
  547. DATA C*0 *
  548. FTDDL EQU *-FTDD LENGTH OF PAGE HEADING
  549. FTS SPACE 4,15
  550. ** FTS - FORMAT TIME STAMP.
  551. *
  552. * ENTRY (X5) = DATA WORD.
  553. * (B3) = SHIFT COUNT.
  554. * (B6) = LINE TABLE ADDRESS.
  555. *
  556. * EXIT TIME STAMP DATA PROCESSED IF SELECTED.
  557. *
  558. * USES X - 1, 2, 3, 4, 5, 6, 7.
  559. * A - 0, 1, 2, 4, 6, 7.
  560. * B - 3.
  561. *
  562. * CALLS CDD.
  563. *
  564. * MACROS OUTPUT.
  565.  
  566.  
  567. FTS SUBR ENTRY/EXIT
  568. SX7 B0+
  569. SA7 B6+LCNT
  570. SA1 T CHECK TIME STAMP OPTION
  571. MX7 -10
  572. LX5 12
  573. ZR X1,FTSX IF TIME STAMP OPTION NOT SELECTED
  574. SA6 B6+LASM SAVE ASSEMBLY REGISTER
  575. SX6 B3 SAVE SHIFT COUNT
  576. SA6 B6+LSHF
  577. BX1 -X7*X5
  578. BX2 X5
  579. LX2 59-10
  580. PL X2,FTS2 IF MILLISECOND TIME STAMP
  581. SA2 B6+LSEC GET LAST SECONDS STAMP
  582. IX3 X1-X2
  583. PL X3,FTS1 IF CURRENT TIME .GE. PREVIOUS TIME
  584. SA4 B6+LTIM UPDATE TIME ADDER
  585. SX3 2000B
  586. IX6 X3+X4
  587. SA6 A4
  588. FTS1 BX6 X1
  589. SA2 B6+LTIM GET TIME ADDER
  590. IX1 X1+X2
  591. SA6 B6+LSEC SET LAST SECONDS = CURRENT TIME
  592. RJ CDD CONVERT SECONDS TO DISPLAY CODE
  593. SA2 FTSA
  594. BX6 X6-X2
  595. SA0 B0 CLEAR *INDENT* FLAG
  596. EQ FTS3 OUTPUT TIME STAMP
  597.  
  598. FTS2 RJ CDD CONVERT MILLISECONDS
  599. SA1 FTSB
  600. SA2 =1L.
  601. SB3 B2-B1 (B2) = 6*CHAR COUNT
  602. MX7 1
  603. AX7 B3 FORM MASK FOR MILLISECONDS
  604. LX7 B2 RIGHT JUSTIFY MASK
  605. BX1 -X7*X1
  606. BX6 X6-X1
  607. MX7 18 FORM MASK FOR MILLISECONDS
  608. LX7 54
  609. LX6 36 POSITION MASK
  610. BX6 X7*X6 ISOLATE 3-CHARACTERS OF MILLISECONDS
  611. BX6 X2+X6 SET DECIMAL POINT
  612. SA0 B1 SET *INDENT* FLAG
  613. FTS3 SA6 FTSC SAVE TIME STAMP
  614. SA2 B6+LASM
  615. ZR X2,FTS4 IF NO DATA IN DATA WORD
  616. BX6 X2
  617. OUTPUT WRITE LEFT OVER DATA
  618. FTS4 SA1 FTSC WRITE TIME STAMP
  619. BX6 X1
  620. OUTPUT
  621. SB3 A0+ CHECK FOR POSSIBLE INDENTATION
  622. ZR B3,FTS5 IF INDENTATION NOT REQUIRED
  623. SA1 =10H INDENT NEXT LINE
  624. BX6 X1
  625. OUTPUT
  626. FTS5 SB3 54 RESET SHIFT COUNT
  627. SX6 B0+ CLEAR ASSEMBLY REGISTER
  628. EQ FTSX RETURN
  629.  
  630.  
  631. FTSA CON 5L*****&5L
  632. FTSB CON 10H0000000000&10H
  633. FTSC BSS 1 TEMPORARY
  634. GNW SPACE 4,25
  635. ** GNW - GET NEXT WORD.
  636. *
  637. * EXIT (B5) = TERMINAL NUMBER.
  638. * (B6) = LINE TABLE ADDRESS.
  639. * (X1) .NE. 0 IF END OF RECORD.
  640. * (X5) = DATA WORD SHIFTED 12 BITS.
  641. *
  642. * IF TRACE DATA -
  643. * (B7) = 0.
  644. * (X6) = DATA WORD.
  645. *
  646. * IF NOT TRACE DATA -
  647. * (B3) = SHIFT COUNT.
  648. * (B7) = CHARACTER COUNT - 1 = 3.
  649. * (X3) = (X6) = ASSEMBLY WORD.
  650. *
  651. * USES X - 0, 1, 2, 3, 5, 6, 7.
  652. * A - 1, 2, 3.
  653. * B - 3, 6, 7.
  654. *
  655. * MACROS INPUT.
  656. *
  657. * NOTE DATA FOR AN INELIGIBLE TERMINAL IS DISCARDED.
  658.  
  659.  
  660. GNW SUBR ENTRY/EXIT
  661. GNW1 INPUT
  662. NZ X1,GNWX IF EOI
  663. BX5 X6
  664. MX0 -11 SET TERMINAL NUMBER
  665. LX5 12
  666. BX7 -X0*X5
  667. SA1 NT
  668. SA2 SL
  669. IX1 X7-X1
  670. BX3 X2-X7
  671. PL X1,GNW1 IF TERMINAL NUMBER .GT. *NT* VALUE
  672. ZR X2,GNW2 IF SELECTIVE LINE NOT SET
  673. NZ X3,GNW1 IF TERMINAL NOT SELECTED
  674. GNW2 SX1 LNLG SET LINE TABLE ADDRESS
  675. SB5 X7 SET TERMINAL NUMBER
  676. IX1 X1*X7
  677. SB7 B0+ PRESET *TRACE DATA* FLAG
  678. SB6 X1+AMEM
  679. SX1 B0+ CLEAR *EOI* FLAG
  680. NG X6,GNWX IF TRACE DATA
  681. SB7 4-1 SET CHARACTER COUNT - 1
  682. SA2 B6+LSHF SET SHIFT COUNT
  683. SA3 B6+LASM SET ASSEMBLY WORD
  684. BX6 X3
  685. SB3 X2
  686. EQ GNWX RETURN
  687. INP SPACE 4,15
  688. ** INP - INPUT NEXT DATA WORD.
  689. *
  690. * ENTRY (INPA) = LWA+1 OF DATA IN *WBUF*.
  691. * (INPB) = NEXT WORD IN *WBUF*.
  692. *
  693. * EXIT (X1) .EQ. 0 IF DATA TRANSFERED.
  694. * (X1) .NE. 0 IF EOF/EOI
  695. * (X6) = DATA WORD.
  696. *
  697. * USES X - 1, 3, 6.
  698. * A - 1, 3, 6.
  699. * B - 7.
  700. *
  701. * MACROS READW.
  702.  
  703.  
  704. INP SUBR ENTRY/EXIT
  705. SA1 INPA SET LWA+1 OF DATA
  706. SA3 A1+B1 SET CURRENT INDEX
  707. IX6 X1-X3
  708. NZ X6,INP2 IF DATA REMAINS IN *WBUF*
  709. READW I,WBUF,WBUFL
  710. PL X1,INP1 IF NOT EOI
  711. SB7 B6-WBUF
  712. ZR B7,INPX IF NO DATA TRANSFERRED
  713. INP1 SX3 WBUF
  714. SX6 B6+
  715. SA6 INPA
  716. INP2 SX6 X3+B1 INCREMENT INDEX
  717. SA3 X3
  718. SA6 INPB
  719. SX1 B0 SET TRANSFER COMPLETE
  720. BX6 X3
  721. EQ INPX RETURN
  722.  
  723.  
  724. INPA CON 0 LWA+1 OF DATA
  725. INPB CON 0 INDEX IN BUFFER
  726. IRR SPACE 4,15
  727. ** IRR - INITIATE/RESUME *RPHRLS* REQUEST.
  728. *
  729. * EXIT *RPHRLS* INITIATED IF NECESSARY.
  730. *
  731. * USES X - 1, 2, 3, 4, 7.
  732. * A - 1, 2, 3, 4.
  733. * B - NONE.
  734. *
  735. * MACROS RPHRLS.
  736. *
  737. * NOTE BECAUSE THE *CIO* CODE FOR *RPHRLS* IS 230B, THE
  738. * COMMON DECKS WILL NOT RESTART THE REQUEST SHOULD *CIO*
  739. * DROP OUT, SINCE THEY INTERPRET A FET STATUS WITH 2**4
  740. * SET AS *EOF*.
  741.  
  742.  
  743. IRR SUBR ENTRY/EXIT
  744. SA2 S CHECK FET STATUS
  745. LX2 59-0
  746. PL X2,IRRX IF FET BUSY
  747. SA2 S+5 CHECK FOR END OF LIST
  748. SA2 X2+
  749. ZR X2,IRRX IF ALL PRUS PROCESSED
  750.  
  751. * THE FOLLOWING CODE IS ADAPTED FROM *COMCRDW*.
  752.  
  753. SA1 S+1 GET FET BUFFER POINTERS
  754. SA2 A1+B1
  755. SA3 A2+B1
  756. SA4 A3+B1
  757. SX1 X1
  758. SX4 X4+
  759. IX1 X4-X1 LIMIT - FIRST
  760. IX7 X2-X3 IN-OUT
  761. LX3 X7,B1 2*(IN-OUT)
  762. AX7 60 SIGN OF (IN-OUT)
  763. BX4 X7-X1 INVERT BUFFER IF OUT \ IN
  764. IX7 X4-X3 BUFFER SIZE - 2*(IN-OUT)
  765. NG X7,IRRX IF BUFFER THRESHOLD NOT REACHED
  766. RPHRLS S INITIATE *CIO* REQUEST
  767. EQ IRRX RETURN
  768. SPD SPACE 4,15
  769. ** SPD - SORT PRU DIRECTORY.
  770. *
  771. * ENTRY (PD) = FWA OF PRU DIRECTORY.
  772. * (PD+1) = NEXT UNUSED ENTRY IN DIRECTORY.
  773. *
  774. * EXIT DIRECTORY SORTED.
  775. * LIST ADDRESS SET IN *SCR* FET.
  776. *
  777. * CALLS SST=.
  778. *
  779. * USES X - 1, 2, 6.
  780. * A - 1, 2, 6.
  781. * B - 7.
  782.  
  783.  
  784. SPD SUBR ENTRY/EXIT
  785. SA1 PD SET *SST=* PARAMETERS
  786. BX6 X1
  787. SB7 X1 FWA OF TABLE TO BE SORTED
  788. SA6 S+5 SET PRU LIST INTO *SCR* FET
  789. SA2 A1+B1
  790. IX1 X2-X1
  791. SX1 X1-1 LENGTH OF TABLE
  792. RJ SST= SORT PRU DIRECTORY
  793. EQ SPDX RETURN
  794. SWB SPACE 4,15
  795. ** SWB - STORE WRITE BUFFER DATA.
  796. *
  797. * ENTRY (X6) = DATA TO WRITE.
  798. * (B6) = LINE TABLE ADDRESS.
  799. *
  800. * EXIT DATA PLACED IN LINE BUFFER.
  801. * LINE BUFFER WRITTEN TO *SCR* IF NECESSARY.
  802. * (B5). (B6), (B7) PRESERVED.
  803. *
  804. * USES X - 1, 2, 3, 4, 6, 7.
  805. * A - 1, 2, 3, 4, 6, 7.
  806. * B - 5, 6, 7.
  807. *
  808. * CALLS UPD.
  809. *
  810. * MACROS WRITEW.
  811.  
  812.  
  813. SWB1 SA6 A1+ SET NEW INDEX
  814.  
  815. SWB SUBR ENTRY/EXIT
  816. SA1 B6+LPTR GET LINE BUFFER POINTER
  817. SX7 X1+LBUF
  818. SA6 X7+B6
  819. SX6 X1+B1
  820. SX7 X6-LBUFL
  821. NZ X7,SWB1 IF OUTPUT BUFFER NOT FULL
  822. SX6 B5 SAVE REGISTERS
  823. SX7 B6
  824. SA6 SWBA
  825. SA7 A6+B1
  826. SX6 B7
  827. SA6 A7+1
  828. WRITEW S,X7+LBUF,LBUFL
  829. SA2 SWBA SET TERMINAL NUMBER
  830. SX3 LBUFL/100B SET NUMBER OF PRUS
  831. SB5 X2+
  832. RJ UPD UPDATE PRU DIRECTORY / POINTERS
  833. SA3 SWBA+1
  834. SA4 A3+B1
  835. SB6 X3
  836. SB7 X4
  837. BX6 X6-X6
  838. SA6 B6+LPTR STORE NEW BUFFER POINTER
  839. EQ SWBX RETURN
  840.  
  841.  
  842. SWBA BSS 3 TEMPORARY STORAGE
  843. UPD SPACE 4,15
  844. ** UPD - UPDATE PRU DIRECTORY AND POINTERS.
  845. *
  846. * ENTRY (B5) = TERMINAL NUMBER.
  847. * (X3) = NUMBER OF PRUS WRITTEN.
  848. * (PN) = NEXT PRU TO WRITE.
  849. * (PD+1) = NEXT PRU DIRECTORY ENTRY TO USE.
  850. *
  851. * EXIT (PN), (PD+1), ((PD+1)) UPDATED.
  852. *
  853. * USES X - 1, 3, 4, 6, 7.
  854. * A - 1, 2, 3, 6, 7.
  855. * B - 7.
  856. *
  857. * MACROS ABORT, MEMORY, MESSAGE.
  858.  
  859.  
  860. UPD SUBR ENTRY/EXIT
  861. SA1 PN
  862. IX6 X1+X3
  863. SA6 A1 UPDATE PRU NUMBER
  864. SB7 X3
  865. SA3 PD+B1
  866. SX4 B1
  867. PX6 X1,B5 MERGE TERMINAL NUMBER AND PRU NUMBER
  868. SA6 X3 UPDATE PRU DIRECTORY
  869. SX7 X3+B1
  870. SA7 A3
  871. UPD1 SB7 B7-1
  872. ZR B7,UPD2 IF ALL PRUS PROCESSED
  873. IX6 X6+X4
  874. SA6 A6+B1
  875. SX7 X7+B1
  876. SA7 A3
  877. EQ UPD1 LOOP
  878.  
  879. * CHECK FOR POSSIBLE MEMORY INCREASE.
  880.  
  881. UPD2 SA3 FL
  882. SA1 MR
  883. IX3 X3-X7
  884. LX1 30
  885. SX3 X3-LBUFL/100B-1
  886. PL X3,UPDX IF NO MEMORY INCREASE REQUIRED
  887. SX7 X1+MEMI
  888. SA7 A3 UPDATE CURRENT FL
  889. SA3 A3+B1
  890. LX7 30
  891. IX3 X3-X7
  892. SA7 A1+
  893. NG X3,UPD3 IF *MEM* REQUEST EXCEEDS JOB STEP MFL
  894. MEMORY CM,MR,R REQUEST ADDITIONAL MEMORY
  895. EQ UPDX RETURN
  896.  
  897. UPD3 MESSAGE (=C* DEMUX MEMORY OVERFLOW.*)
  898. RETURN S RETURN SCRATCH FILE
  899. ABORT
  900. COMMON SPACE 4,10
  901. * COMMON DECKS.
  902.  
  903.  
  904. *CALL COMCCDD
  905. *CALL COMCCFD
  906. *CALL COMCCIO
  907. *CALL COMCRDW
  908. *CALL COMCSST
  909. *CALL COMCSYS
  910. *CALL COMCWOD
  911. *CALL COMCWTW
  912. TITLE DEMUX CONVERSION TABLE.
  913. ASCI SPACE 4,10
  914. * ASCI - ASCII TABLE.
  915.  
  916.  
  917. ASCI BSS 0
  918. LOC 0
  919. DATA -1 UNPRINTABLE
  920. DUP 7,1
  921. DATA -1 UNPRINTABLE
  922. DATA 70B BACKSPACE (UP-ARROW)
  923. DUP 4,1
  924. DATA -1 UNPRINTABLE
  925. DATA 0 CARRIAGE RETURN
  926. DUP 18,1
  927. DATA -1 UNPRINTABLE
  928.  
  929. DATA 55B SPACE
  930. DATA -1 UNPRINTABLE
  931. DATA 64B DOUBLE QUOTE
  932. DATA 60B NUMBER
  933. DATA 53B DOLLAR SIGN
  934. DATA 63B PERCENT
  935. DATA 67B AMPERSAND
  936. DATA 70B APOSTROPHE
  937.  
  938. DATA 51B (
  939. DATA 52B )
  940. DATA 47B *
  941. DATA 45B +
  942. DATA 56B ,
  943. DATA 46B -
  944. DATA 57B .
  945. DATA 50B /
  946.  
  947. DATA 33B 0
  948. DATA 34B 1
  949. DATA 35B 2
  950. DATA 36B 3
  951. DATA 37B 4
  952. DATA 40B 5
  953. DATA 41B 6
  954. DATA 42B 7
  955.  
  956. DATA 43B 8
  957. DATA 44B 9
  958. DATA 400B COLON
  959. DATA 77B :
  960. DATA 72B <
  961. DATA 54B =
  962. DATA 73B >
  963. DATA 71B QUESTION MARK
  964.  
  965. DATA -1 UNPRINTABLE
  966. DATA 01B A
  967. DATA 02B B
  968. DATA 03B C
  969. DATA 04B D
  970. DATA 05B E
  971. DATA 06B F
  972. DATA 07B G
  973.  
  974. DATA 10B H
  975. DATA 11B I
  976. DATA 12B J
  977. DATA 13B K
  978. DATA 14B L
  979. DATA 15B M
  980. DATA 16B N
  981. DATA 17B O
  982.  
  983. DATA 20B P
  984. DATA 21B Q
  985. DATA 22B R
  986. DATA 23B S
  987. DATA 24B T
  988. DATA 25B U
  989. DATA 26B V
  990. DATA 27B W
  991.  
  992. DATA 30B X
  993. DATA 31B Y
  994. DATA 32B Z
  995. DATA 61B (
  996. DATA 75B REVERSE SLANT
  997. DATA 62B )
  998. DATA -1 UNPRINTABLE
  999. DATA 65B UNDERLINE
  1000.  
  1001. DATA -1 UNPRINTABLE
  1002. DATA 01B LOWER CASE A
  1003. DATA 02B B
  1004. DATA 03B C
  1005. DATA 04B D
  1006. DATA 05B E
  1007. DATA 06B F
  1008. DATA 07B G
  1009.  
  1010. DATA 10B H
  1011. DATA 11B I
  1012. DATA 12B J
  1013. DATA 13B K
  1014. DATA 14B L
  1015. DATA 15B M
  1016. DATA 16B N
  1017. DATA 17B O
  1018.  
  1019. DATA 20B P
  1020. DATA 21B Q
  1021. DATA 22B R
  1022. DATA 23B S
  1023. DATA 24B T
  1024. DATA 25B U
  1025. DATA 26B V
  1026. DATA 27B W
  1027.  
  1028. DATA 30B X
  1029. DATA 31B Y
  1030. DATA 32B Z
  1031. DUP 5,1
  1032. DATA -1 UNPRINTABLE
  1033. LOC *O
  1034. TASC SPACE 4,10
  1035. * TASC - ASCII READABLE OUTPUT TRANSLATION TABLE.
  1036.  
  1037. TASC BSS 0
  1038.  
  1039. LOC 0
  1040. DATA 10HNULL
  1041. DATA 10HSOH
  1042. DATA 10HSTX
  1043. DATA 10HETX
  1044. DATA 10HEOT
  1045. DATA 10HENQ
  1046. DATA 10HACK
  1047. DATA 10HBELL
  1048.  
  1049. DATA 10HBKSP
  1050. DATA 10HHTAB
  1051. DATA 10HLF
  1052. DATA 10HVTAB
  1053. DATA 10HFORM FEED
  1054. DATA 10HCR
  1055. DATA 10HSHIFT OUT
  1056. DATA 10HSHIFT IN
  1057.  
  1058. DATA 10HDLE
  1059. DATA 10HDC1
  1060. DATA 10HDC2
  1061. DATA 10HDC3
  1062. DATA 10HDC4
  1063. DATA 10HNAK
  1064. DATA 10HSYN
  1065. DATA 10HETB
  1066.  
  1067. DATA 10HCAN
  1068. DATA 10HEM
  1069. DATA 10HSUB
  1070. DATA 10HESC
  1071. DATA 10HFS
  1072. DATA 10HGS
  1073. DATA 10HRS
  1074. DATA 10HUS
  1075.  
  1076. DATA 10H
  1077. DATA 10HEX POINT
  1078. DATA 10HD QUOTE
  1079. DATA 10HPOUND SIGN
  1080. DATA 10H$
  1081. DATA 10H^
  1082. DATA 10HAMPERSAND
  1083. DATA 10HS QUOTE
  1084.  
  1085. DATA 10H(
  1086. DATA 10H)
  1087. DATA 10H*
  1088. DATA 10H+
  1089. DATA 10H,
  1090. DATA 10H-
  1091. DATA 10H.
  1092. DATA 10H/
  1093.  
  1094. DATA 10H0
  1095. DATA 10H1
  1096. DATA 10H2
  1097. DATA 10H3
  1098. DATA 10H4
  1099. DATA 10H5
  1100. DATA 10H6
  1101. DATA 10H7
  1102.  
  1103. DATA 10H8
  1104. DATA 10H9
  1105. DATA 10H%
  1106. DATA 10HSEMI
  1107. DATA 10H<
  1108. DATA 10H=
  1109. DATA 10H>
  1110. DATA 10HQUESTION
  1111.  
  1112. DATA 10HAT SIGN
  1113. DATA 10HA
  1114. DATA 10HB
  1115. DATA 10HC
  1116. DATA 10HD
  1117. DATA 10HE
  1118. DATA 10HF
  1119. DATA 10HG
  1120.  
  1121. DATA 10HH
  1122. DATA 10HI
  1123. DATA 10HJ
  1124. DATA 10HK
  1125. DATA 10HL
  1126. DATA 10HM
  1127. DATA 10HN
  1128. DATA 10HO
  1129.  
  1130. DATA 10HP
  1131. DATA 10HQ
  1132. DATA 10HR
  1133. DATA 10HS
  1134. DATA 10HT
  1135. DATA 10HU
  1136. DATA 10HV
  1137. DATA 10HW
  1138.  
  1139. DATA 10HX
  1140. DATA 10HY
  1141. DATA 10HZ
  1142. DATA 10HL BRACKET
  1143. DATA 10HREV SLANT
  1144. DATA 10HR BRACKET
  1145. DATA 10HCIRCUMFLEX
  1146. DATA 10HUNDERLINE
  1147.  
  1148. DATA 10HGR ACCENT
  1149. DATA 10H?A
  1150. DATA 10H?B
  1151. DATA 10H?C
  1152. DATA 10H?D
  1153. DATA 10H?E
  1154. DATA 10H?F
  1155. DATA 10H?G
  1156.  
  1157. DATA 10H?H
  1158. DATA 10H?I
  1159. DATA 10H?J
  1160. DATA 10H?K
  1161. DATA 10H?L
  1162. DATA 10H?M
  1163. DATA 10H?N
  1164. DATA 10H?O
  1165.  
  1166. DATA 10H?P
  1167. DATA 10H?Q
  1168. DATA 10H?R
  1169. DATA 10H?S
  1170. DATA 10H?T
  1171. DATA 10H?U
  1172. DATA 10H?V
  1173. DATA 10H?W
  1174.  
  1175. DATA 10H?X
  1176. DATA 10H?Y
  1177. DATA 10H?Z
  1178. DATA 10HL BRACE
  1179. DATA 10HVERT LINE
  1180. DATA 10HR BRACE
  1181. DATA 10HTILDE
  1182. DATA 10HRUBOUT
  1183. LOC *O
  1184. BUFFERS SPACE 4,20
  1185. USE PRESET
  1186.  
  1187. * BUFFER ALLOCATION.
  1188.  
  1189. IBUF BSSN IBUFL *STIMOUT* BUFFER
  1190. OBUF BSSN OBUFL *OUTPUT* / *TRACE* BUFFER
  1191. SBUF BSSN SBUFL *SCR* BUFFER
  1192. WBUF BSSN WBUFL WORKING BUFFER
  1193.  
  1194. * ALLOCATABLE MEMORY - LINE TABLES, PRU DIRECTORY.
  1195.  
  1196. AMEM BSSN 0 FWA OF ALLOCATABLE MEMORY
  1197. END BSSN
  1198.  
  1199. RFL= EQU AMEM STARTING FL FOR DEMUX
  1200. TITLE PRESET PROGRAM.
  1201. PRS SPACE 4,15
  1202. ** PRS - PRESET PROGRAM.
  1203. *
  1204. * ENTRY (B1) = 1.
  1205. *
  1206. * EXIT CONTROL STATEMENT PARAMETERS PROCESSED.
  1207. * FILES INITIALIZED AS NECESSARY.
  1208. *
  1209. * USES X - 1, 2, 4, 5, 6, 7.
  1210. * A - 1, 4, 5, 6, 7.
  1211. * B - 2, 3, 4, 5, 6, 7.
  1212. *
  1213. * CALLS ARG, DXB.
  1214. *
  1215. * MACROS ABORT, EVICT, MEMORY, MESSAGE, REWIND.
  1216.  
  1217.  
  1218. PRS SUBR ENTRY/EXIT
  1219. SX6 B0+ ESTABLISH DEFAULT OF NO TRACE
  1220. SA6 TR
  1221.  
  1222. * PROCESS CONTROL STATEMENT PARAMETERS.
  1223.  
  1224. SA1 ACTR SET *COMCARG* PARAMETERS
  1225. SB5 PRSA
  1226. SA4 ARGR
  1227. SB4 X1+
  1228. RJ ARG PROCESS ARGUMENTS
  1229. ZR X1,PRS1 IF NO ERROR DETECTED
  1230. MESSAGE (=C* DEMUX ARGUMENT ERROR.*)
  1231. ABORT
  1232.  
  1233. * PROCESS *NT* PARAMETER.
  1234.  
  1235. PRS1 SA5 NT
  1236. SB7 0 SET DEFAULT BASE TO OCTAL
  1237. RJ DXB CONVERT TO BINARY
  1238. SA6 NT
  1239. ZR X4,PRS2 IF NO CONVERSION ERROR
  1240. MESSAGE (=C* DEMUX NUMERIC ARGUMENT CONVERSION ERROR.*)
  1241. ABORT
  1242.  
  1243. PRS2 SX1 MTN+1 CHECK FOR *NT* IN RANGE
  1244. IX2 X6-X1
  1245. NG X2,PRS3 IF *NT* VALUE IN RANGE
  1246. MESSAGE (=C* DEMUX NT VALUE TOO LARGE.*)
  1247. ABORT
  1248.  
  1249. * PROCESS *SL* PARAMETER.
  1250.  
  1251. PRS3 SA5 SL PROCESS SELECTIVE LINE
  1252. SB7 0 SET DEFAULT BASE TO OCTAL
  1253. RJ DXB CONVERT TO BINARY
  1254. SA6 SL
  1255. ZR X4,PRS4 IF NO CONVERSION ERROR
  1256. MESSAGE (=C* DEMUX NUMERIC ARGUMENT CONVERSION ERROR.*)
  1257. ABORT
  1258.  
  1259. PRS4 SA1 NT
  1260. IX2 X1-X6
  1261. PL X2,PRS5 IF SL .LE. NT
  1262. MESSAGE (=C* DEMUX SL VALUE TOO LARGE.*)
  1263. ABORT
  1264.  
  1265. * CHECK FOR 63-CHARACTER SYSTEM.
  1266.  
  1267. PRS5 SA1 CSMR CHECK CHARACTER SET MODE OF SYSTEM
  1268. NG X1,PRS6 IF 64 CHARACTER SET
  1269. SX6 63B CHANGE COLON TO PERCENT
  1270. SA6 ASCI+72B
  1271.  
  1272. * ALLOCATE LINE TABLES AND INITIAL PRU DIRECTORY SIZE.
  1273.  
  1274. PRS6 MX6 29 GET JOB STEP MFL
  1275. SA6 FL+1
  1276. MEMORY CM,FL+1,R
  1277. SA1 NT
  1278. SB2 X1+ SAVE TERMINAL NUMBER
  1279. SX2 LNLG
  1280. IX5 X2*X1
  1281. SX7 X5+AMEM INITIALIZE PRU DIRECTORY POINTERS
  1282. SA7 PD
  1283. SA7 A7+B1
  1284. SX7 X7+MEMI+77B DETERMINE MEMORY REQUIREMENTS
  1285. AX7 6
  1286. LX7 6
  1287. SA7 FL SAVE CURRENT FL
  1288. SA1 A7+B1
  1289. LX7 30
  1290. IX1 X1-X7
  1291. SA7 MR
  1292. NG X1,PRS8 IF *MEM* REQUEST EXCEEDS JOB STEP MFL
  1293. MEMORY CM,MR,R REQUEST ADDITIONAL MEMORY
  1294.  
  1295. * INITIALIZE LINE TABLES.
  1296.  
  1297. MX6 0
  1298. SA6 AMEM
  1299. SB6 A6
  1300. SB3 LNLG
  1301. PRS7 SA6 B6+B3
  1302. SB3 B3-B1
  1303. PL B3,PRS7 IF LINE TABLE NOT COMPLETE
  1304. MX7 1 SET *NO SESSION DATA* FLAG
  1305. SA7 B6+LPTR
  1306. SX7 54 SET SHIFT COUNT
  1307. SA7 A6+LSHF
  1308. SB3 LNLG
  1309. SB6 B6+LNLG PREPARE FOR NEXT TERMINAL
  1310. SB2 B2-1
  1311. NZ B2,PRS7 IF MORE TERMINALS TO PROCESS
  1312.  
  1313. * INITIALIZE FILES.
  1314.  
  1315. EVICT S RETURN SCRATCH FILE
  1316. SA1 NR CHECK NO REWIND OPTION
  1317. NZ X1,PRSX IF *NR* OPTION SELECTED
  1318. REWIND I,R
  1319. REWIND O,R
  1320. EQ PRSX RETURN
  1321.  
  1322. PRS8 MESSAGE (=C* DEMUX MEMORY OVERFLOW.*)
  1323. ABORT
  1324.  
  1325.  
  1326. PRSA BSS 0
  1327. I ARG STIMOUT,I
  1328. NR ARG -=1,NR
  1329. NT ARG =0L1,NT
  1330. O ARG OUTPUT,O
  1331. SL ARG =0,SL
  1332. T ARG -=1,T
  1333. TR ARG OUTPUT,TR
  1334. ARG TERMINATOR
  1335. COMMON SPACE 4,10
  1336. * COMMON DECKS (PRESET).
  1337.  
  1338.  
  1339. *CALL COMCARG
  1340. *CALL COMCDXB
  1341. END SPACE 4,10
  1342. END
cdc/nos2.source/opl871/demux.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator