User Tools

Site Tools


cdc:nos2.source:opl871:docment

DOCMENT

Table Of Contents

  • [00012] INTERNAL/EXTERNAL DOCUMENTATION PROGRAM.
  • [00177] DATA DEFINITION.
  • [00293] MAIN PROGRAM.
  • [00294] MAIN PROGRAM.
  • [00369] PRC - PROCESS SUBPROGRAM.
  • [00467] GFW - GET FIRST WORD FROM CARD.
  • [00507] FTN - PROCESS FORTRAN SUBPROGRAMS.
  • [00559] CMP - PROCESS COMPASS SUBPROGRAM.
  • [00658] NDK - PROCESS NEW DECK *IDENT* OR *SEGMENT*.
  • [00680] SPC - PROCESS SPECIAL CARDS.
  • [00716] CNT - SET TABLE OF CONTENTS.
  • [00774] FCN - FORMAT TABLE OF CONTENTS.
  • [00868] SRT - SORT DECK NAME TABLE.
  • [00908] LCC - PROCESS *LCC* CARDS.
  • [00930] TTL - SET TITLE OF NEW SUBPROGRAM.
  • [00967] LFL - LIST FIRST LINE.
  • [00985] CTA - COUNT ASTERISKS.
  • [01008] LST - LIST DOCUMENTATION.
  • [01123] LSL - LIST LAST LINE.
  • [01158] TAB - PROCESS TABLE GENERATION.
  • [01227] STL - SET TABLE LABEL IF ANY.
  • [01276] ASD - ASSEMBLE DIGIT FIELD.
  • [01329] ASF - ASSEMBLE TABLE FIELD INTO LINE.
  • [01397] LTB - LIST A TABLE ENTRY.
  • [01507] STB - SKIP TO BOTTOM OF PAGE.
  • [01536] CVT - CONVERT NUMBER FROM OCTAL TO DECIMAL DISPLAY CODE.
  • [01574] ABT - TERMINATE ON PREMATURE EOR/EOF.
  • [01587] CPY - COPY SCRATCH FILE TO OUTPUT FILE.
  • [01635] EDC - *END* CARD PROCESSOR.
  • [01678] COL - PROCESS *COL* CARDS.
  • [01707] CTX - PROCESS *CTEXT* CARDS.
  • [01720] EDX - PROCESS *ENDX* CARDS.
  • [01736] BKD - PROCESS BLOCK DATA SUBPROGRAMS.
  • [01786] LSC - PROCESS *LIST* CARD.
  • [01882] TIT - PROCESS TITLE CARD.
  • [01920] COMMON DECKS.
  • [01937] DECODING AREA.
  • [02019] ARG - PROCESS ARGUMENTS.
  • [02024] CKO - CHECK OPTIONS SELECTED.
  • [02111] CTF - CHECK TERMINAL OUTPUT FILE.
  • [02136] CTP - CALCULATE TITLE PAGE.
  • [02172] IPP - INITIALIZE PAGE PARAMETERS.
  • [02209] RIF - READ INPUT FILE.

Source Code

DOCMENT.txt
  1. IDENT DOCMENT,FETS
  2. ABS
  3. ENTRY DOCMENT
  4. ENTRY MFL=
  5. SYSCOM B1
  6. LIST F
  7.  
  8. DOCMENT TITLE DOCMENT - INTERNAL/EXTERNAL DOCUMENTATION PROGRAM.
  9. *COMMENT DOCMENT - INTERNAL/EXTERNAL DOCUMENTATION PROGRAM.
  10. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  11. SPACE 4,10
  12. *** DOCMENT - INTERNAL/EXTERNAL DOCUMENTATION PROGRAM.
  13. * R.S. HORECK 70/07/06.
  14. SPACE 4
  15. *** CONTROL CARD CALL.
  16. *
  17. * DOCMENT(P1,P2,P3,,,PN)
  18. *
  19. * THE PARAMETERS P(I) MAY INCLUDE THE FOLLOWING (IN ANY ORDER)
  20. * AND MUST BE IN ONE OF THE FORMS -
  21. *
  22. * * * - (NONE) ASSUME FIRST DEFAULT VALUE.
  23. * P - ASSUME ALTERNATE DEFAULT VALUE.
  24. * P=X - SUBSTITUTE *X* FOR ANY ASSUMED VALUE OF *P*.
  25. *
  26. * ANY NUMERIC PARAMETER MAY BE SPECIFIED WITH A POST RADIX
  27. * TO CLARIFY ITS VALUE. THE RADIX MAY BE *D* OR *B*.
  28. *
  29. * I - INPUT FILE NAME ON WHICH TO FIND PAGE FOOTING INFORMATION.
  30. * THIS MUST BE A SINGLE CARD OF THE FORMAT -
  31. * COLUMN(S) - CONTENTS -
  32. * 2-45 DOCUMENT TITLE - COLUMN 1 MUST BE BLANK.
  33. * 46-55 PUBLICATION NUMBER.
  34. * 56-60 REVISION LEVEL.
  35. * 61-70 REVISION DATE.
  36. * S - FILE CONTAINING THE SOURCE CARD IMAGES FROM WHICH TO
  37. * EXTRACT THE DOCUMENTATION. THIS FILE IS REWOUND
  38. * UNLESS THE *NR* PARAMETER IS SPECIFIED.
  39. * L - FILE ON WHICH DOCUMENTATION IS TO BE WRITTEN.
  40. * N - NUMBER OF COPIES TO BE PRODUCED.
  41. * T - DOCUMENTATION TYPE (INT OR EXT)
  42. * C - CHECK CHARACTER FOR DOCUMENTATION.
  43. * P - NUMBER OF PRINT LINES / PAGE.
  44. * NR - DISABLE REWIND ON THE *S* (SOURCE) FILE.
  45. * NT - NEGATE THE TABLE GENERATOR.
  46. * TC - LIST TABLE OF CONTENTS.
  47. *
  48. * DEFAULT PARAMETER SUBSTITUTION VALUES -
  49. *
  50. * FIRST ALTERNATE
  51. * PARAMETER DEFAULT DEFAULT - COMMENT -
  52. *
  53. * I *0* *INPUT* PAGE FOOT INFORMATION.
  54. * S *COMPILE* *SOURCE* SOURCE CARD IMAGES.
  55. * L *OUTPUT* *OUTPUT* LIST FILE.
  56. * N 1 1 DECIMAL NUMBER OF COPIES.
  57. * T *EXT* *INT* DOCUMENTATION TYPE.
  58. * C -*- *03* CHECK CHAR. (2 OCTAL DIGITS)
  59. * P PS SPS NUMBER OF PRINT LINES/PAGE.
  60. * PS = JOB PAGE SIZE.
  61. * SPS = SYSTEM PAGE SIZE.
  62. * NR REWIND NO REWIND STATUS OF SOURCE FILE REWIND.
  63. * NT ON OFF STATUS OF TABLE GENERATOR.
  64. * TC OFF ON STATUS OF TABLE OF CONTENTS.
  65. SPACE 4,10
  66. *** DOCUMENTATION FOLLOWS THE FOLLOWING RULES.
  67. *
  68. * EXTERNAL DOCUMENTATION -
  69. * THREE ASTERISKS STARTING IN COLUMN 1 START DOCUMEN-
  70. * TATION WHICH CONTINUES UNTIL ALL CONSECUTIVE CARDS
  71. * WITH COLUMN 1 ASTERISKS HAVE BEEN EXHAUSTED.
  72. *
  73. * INTERNAL DOCUMENTATION -
  74. * TWO OR THREE ASTERISKS STARTING IN COLUMN 1 START DOC-
  75. * UMENTATION WHICH CONTINUES UNTIL ALL CONSECUTIVE CARDS
  76. * CONTAINING COLUMN 1 ASTERISKS HAVE BEEN EXHAUSTED.
  77. *
  78. * IN ADDITION, ANY CARD WITH FOUR (4) ASTERISKS STARTING
  79. * IN COLUMN 1 ACTS AS A TOGGLE FOR DOCUMENTATION. IN THIS
  80. * MANNER WHEN A CARD IS FOUND TO CONTAIN 4 ASTERISKS
  81. * STARTING IN COLUMN 1, THAT CARD AND ALL SUCCEEDING
  82. * CARDS THROUGH ANOTHER LIKE CARD (REGARDLESS OF THE
  83. * COLUMN 1 CHARACTER) ARE CONSIDERED TO BE PART OF THE
  84. * DOCUMENTATION.
  85. *
  86. * DOCUMENTATION FORMAT -
  87. *
  88. * EACH PAGE OF DOCUMENTATION IS COMPOSED OF 3 ELEMENTS
  89. *
  90. * 1. PAGE HEADER - THIS LINE GIVES THE FIRST 45 CHARAC-
  91. * TERS (LEADING BLANKS SUPPRESSED) OF THE
  92. * SUBPROGRAM HEADER (I.E. SUBROUTINE,IDENT,
  93. * ETC.), THE CURRENT DATE, AND THE DOCUMEN-
  94. * TATION TYPE (EXT OR INT).
  95. * 2. DOCUMENTATION TEXT - DOCUMENTATION EXTRACTED FROM
  96. * THE SOURCE CARDS (EACH SUBGROUP SEPARATED
  97. * BY 4 BLANK LINES).
  98. * 3. PAGE FOOTING - THIS LINE INCLUDES THE 70 CHARACTERS
  99. * READ FROM THE *INPUT* FILE AND THE PAGE
  100. * NUMBER OF THE FORM *X/Y* WHERE - X IS THE
  101. * NUMBER OF THE SUBPROGRAM (CHAPTER) AND Y
  102. * IS THE PAGE WITHIN THIS CHAPTER.
  103. *
  104. * SPECIAL CARD TYPES -
  105. *
  106. * DOCUMENTATION CARDS CONTAINING *E IN COLUMNS 1 AND 2 CAUSE
  107. * THE PAGE TO BE EJECTED.
  108. *
  109. * DOCUMENTATION CARDS CONTAINING *T IN COLUMNS 1 AND 2 ACTIVATE
  110. * THE TABLE WRITER.
  111. * FOR EXAMPLE, THE CARD -
  112. * *T EXAMPLE 24/PP PROGRAM NAME+RECALL,18/PARAMETER 1,18/PARAMETER 2
  113. * WOULD GENERATE THE FOLLOWING TABLE PICTURE -
  114. *
  115. *T EXAMPLE 24/PP PROGRAM NAME+RECALL,18/PARAMETER 1,18/PARAMETER 2
  116. *
  117. * THE IDENTIFICATION *EXAMPLE* MAY BE OMITTED.
  118. * EACH TIME A NEW BLOCK OF *T CARDS IS ENCOUNTERED,
  119. * A BIT POSITION HEADER IS LISTED. THIS HEADER IS NOT
  120. * LISTED FOR EACH CONSECUTIVE TABLE CARD OR FOR ANY
  121. * CARD CONTAINING A NON-BLANK CHARACTER IN COLUMN 3 OF
  122. * THE FIRST *T CARD IN A BLOCK.
  123. * CARD FORMAT IS THE SAME AS FOR THE COMPASS *VFD*
  124. * PSEUDO INSTRUCTION, HOWEVER, NO *VFD* MAY BE PRESENT.
  125. * A SLASH */* MUST IMMEDIATELY FOLLOW A BIT COUNT
  126. * FIELD, BUT LEADING SPACES ARE IGNORED.
  127. * ALL BIT COUNTS FOR FIELD WIDTHS MAY BE SPECIFIED IN
  128. * EITHER OCTAL OR DECIMAL. DECIMAL COUNTS ARE ASSUMED
  129. * IN THE ABSENCE OF A POST-RADIX (B) OR (D).
  130. * MAXIMUM PICTURE WIDTH IS 60 BITS.
  131. * A SLASH SEPARATES FIELDS IN THE PICTURE AND THE
  132. * BIT POSITION IT OCCUPIES IS INCLUDED IN THE FIELD
  133. * TO ITS LEFT. SINGLE BIT FIELDS ARE LISTED WITHOUT
  134. * A SLASH FIELD SEPARATOR. ALL TABLE ENTRY
  135. * DESCRIPTION CARDS WITHIN A *T BLOCK ARE CONSIDERED
  136. * TO HAVE THE SAME TOTAL NUMBER OF BITS.
  137. * FIELD LABELS ARE LEFT JUSTIFIED WITHIN THE FIELD
  138. * AND WILL BE TRUNCATED IF THE LABEL CONTAINS MORE
  139. * CHARACTERS THAN THE BIT COUNT MINUS 1.
  140. * IF THE THIRD CHARACTER ON THE CARD IS NON-BLANK, NO
  141. * BIT COUNT HEADER WILL BE PLACED ABOVE THE TABLE
  142. * ENTRY. SINGLE BIT FIELDS WILL BE LISTED WITH A *+*
  143. * BELOW THE FIELD POSITION. THE ONLY EXCEPTION TO THIS
  144. * IS THE CASE WHERE ONLY ONE TABLE ENTRY IS LISTED. IN
  145. * THIS INSTANCE THE *+* WILL BE LISTED BOTH ABOVE AND
  146. * BELOW THE FIELD POSITION.
  147. *
  148. * ALL LOADER CONTROL CARDS (I.E. OVERLAY,SECTION,ETC.) ARE
  149. * CONSIDERED SPECIAL AND THEIR IMAGES ARE PLACED ALONG
  150. * WITH THE PAGE NUMBER AT THE FOOT OF EACH SUBPROGRAM
  151. * ENCOMPASSED BY THE SCOPE OF THE DIRECTIVE.
  152. * ALL *END* CARDS ARE CONSIDERED SPECIAL SINCE THEY TERMINATE A
  153. * CHAPTER.
  154. * IN COMPASS THE FOLLOWING CARDS ALSO HAVE SPECIAL MEANING -
  155. * TITLE - THE FIRST TITLE CARD REPLACES THE PAGE HEADER
  156. * WITH ITS CONTENTS (IF NON-BLANK).
  157. * SUBSEQUENT TITLE CARDS ARE IGNORED.
  158. * LIST - THE PARAMETERS *X* AND *L* ARE PROCESSED. IF A
  159. * *-L* IS ENCOUNTERED ALL DOCUMENTATION IS
  160. * SUPRESSED UNTIL A *LIST L* CARD IS ENCOUN-
  161. * TERED. IF A *-X* (ASSUMED) IS ENCOUNTERED,
  162. * NO DOCUMENTATION WILL BE PROCESSED ON
  163. * COMMON TEXT *CTEXT* UNTIL A *LIST X* CARD
  164. * IS FOUND. ONLY A DEFINED NUMBER OF LIST
  165. * CARDS MAY BE PROCESSED. THIS NUMBER IS
  166. * DEFINED BY THE TAG *NLCA*. EACH (LIST *)
  167. * CARD ALLOWS AN EXTRA LIST CARD TO BE
  168. * PROCESSED ABOVE THE NUMBER *NLCA*.
  169. * CTEXT,ENDX - BRACKET CARDS SURROUNDING COMMON TEXT -
  170. * NO DOCUMENTATION IS LISTED UNLESS A *LIST
  171. * X* CARD HAS BEEN ENCOUNTERED.
  172. * COL - DATA BEYOND THE COMMENT COLUMN IS NOT
  173. * EXAMINED FOR KEYWORDS. IF A *COL*
  174. * CARD IS ENCOUNTERED, THE COMMENT
  175. * COLUMN IS CHANGED TO THE COLUMN
  176. * SPECIFIED ON THE *COL* CARD.
  177. TITLE DATA DEFINITION.
  178. * CONSTANTS.
  179.  
  180. SBUFL EQU 201B LENGTH OF TABLE OF CONTENTS BUFFER
  181. BFSZ EQU 3001B BUFFER SIZE
  182. NBFS EQU 2 NUMBER OF BUFFERS
  183. NCR EQU 72 NUMBER OF CHARACTERS TO READ FROM A CARD
  184. NLCA EQU 24 NUMBER OF LIST CARDS ALLOWED
  185. FLP EQU 7 NUMBER OF HEADER FOOTER LINES
  186. MPGS EQU 16D MINIMUM PAGE SIZE
  187. SPACE 4,10
  188. *CALL COMCMAC
  189. *CALL COMCCMD
  190. SPACE 4,10
  191. ORG 110B
  192.  
  193. FETS BSS 0
  194.  
  195.  
  196. S VFD 42/0LCOMPILE,18/3 FETS FOR INPUT AND SOURCE
  197.  
  198. O VFD 42/0LOUTPUT,18/3 FETS FOR OUTPUT AND SCRATCH
  199.  
  200. SCR1 FILEB BUF,BFSZ
  201.  
  202. SCR2 FILEB SBUF,SBUFL
  203.  
  204. I BSS 0
  205. INPUT FILEB BUF+BFSZ,BFSZ
  206. INPX EQU *
  207. ORG INPUT
  208. CON 0
  209. ORG INPX
  210.  
  211. * TABLE OF SPECIAL NAMES.
  212.  
  213. TNM VFD 60/-0 10 CHAR MASK
  214. DATA 10HSUBROUTINE
  215. DATA 10HPRECISION
  216. VFD 48/-0,12/ 8 CHAR MASK
  217. DATA 8LFUNCTION
  218. VFD 42/-0,18/ 7 CHAR MASK
  219. DATA 7LPROGRAM
  220. DATA 7LINTEGER
  221. DATA 7LFORTRAN
  222. DATA 7LLOGICAL
  223. DATA 7LOVERLAY
  224. DATA 7LSEGMENT
  225. DATA 7LSECTION
  226. DATA 7LSEGZERO
  227. DATA 7LCHNLINK
  228. VFD 36/-0,24/ 6 CHAR MASK
  229. DATA 6LDOUBLE
  230. DATA 6LSINGLE
  231. VFD 30/-0,30/ 5 CHAR MASK
  232. DATA 5LIDENT
  233. DATA 5LBLOCK
  234. VFD 24/-0,36/ 4 CHAR MASK
  235. DATA 4LTYPE
  236. DATA 4LDATA
  237. DATA 4LREAL
  238. VFD 12/-0,48/ 2 CHAR MASK
  239. DATA 2LII
  240. DATA 2LIV
  241. DATA 2LVI
  242. VFD 60/ END OF TABLE
  243. SPACE 4
  244. * VARIABLES.
  245.  
  246. NAS DATA 20 NUMBER OF ASTERISKS NECESSARY IN THE FIRST
  247. MAS DATA 3 MINIMUM NUMBER OF ASTERISKS NEEDED FOR DOC
  248. XFL DATA 0 LIST X FLAG
  249. FOUR COLUMNS TO TURN TOGGLE
  250. TOG DATA 0 TOGGLE FOR **** CARDS (INT ONLY) 0=NO,1=YES
  251. PTYP CON 0 PROGRAM TYPE (0=*COMPASS*, 1=FORTRAN)
  252. FCR DATA 1 FIRST COLUMN TO CHECK ON INPUT CARD
  253. CCM DATA 30 COLUMN FOR COMMENTS
  254. LCT BSS 1 LINE COUNT
  255. LLM BSS 1 MAXIMUM NUMBER OF LINES PER PAGE
  256. PD BSS 1 PRINT DENSITY
  257.  
  258. HDSL1 BSS 1 HEADING SUBLENGTH 1
  259. HDSL2 BSS 1 HEADING SUBLENGTH 2
  260.  
  261.  
  262. HDG BSS 5 HEADING LINE
  263. HDG1 CON 0 DATE
  264. HDG2 DATA 10H EXTERNAL
  265. CON 0 END OF LINE
  266.  
  267. FOT DATA 40H CONTROL DATA SYSTEMS DOCUMENTATION.
  268. DATA 30H
  269. BSSZ 1 END OF LINE FLAG
  270. SBF DATA 10H
  271. DUP 5,1
  272. DATA 10H
  273. PGE VFD 42/7H PAGE ,18/
  274. BSSZ 1 SUBPAGE NUMBER
  275.  
  276. CHP BSSZ 1 CHAPTER COUNT
  277. SPG BSSZ 1 SUBCHAPTER PAGE COUNT
  278. EDAS DATA 3 SAME AS MAS
  279. IDAS DATA 20 SAME AS NAS
  280. FLF DATA 0 FIRST LINE LISTED FLAG
  281. PCT DATA 0 PAGE COUNT FOR PAGE PARITY CHECK
  282.  
  283. * INPUT PARAMETERS.
  284.  
  285. N CON 1L1
  286. T CON 0LEXT
  287. C CON 0L47B
  288. P CON 0 LINES PER PAGE
  289. NR CON 0 DISABLE SOURCE FILE REWIND
  290. NT CON 0
  291. TC CON 0
  292. NI CON 0
  293. TITLE MAIN PROGRAM.
  294. ** DOCMENT - MAIN PROGRAM.
  295.  
  296.  
  297. DOCMENT SB1 1
  298. RJ IPP INITIALIZE PAGE PARAMETERS
  299. SA1 ACTR GET ARGUMENT COUNT
  300. R= A4,ARGR FIRST ARGUMENT
  301. SB4 X1
  302. SB5 ARGA ADDRESS OF ARGUMENT TABLE
  303. RJ ARG PROCESS ARGUMENTS
  304. NZ X1,DOC7 IF ERROR IN ARGUMENTS
  305. RJ CKO CHECK OPTIONS
  306. RJ CTF CHECK TERMINAL FILE
  307. RJ CTP CALCULATE TITLE PAGE
  308. REWIND SCR2,R REWIND SCRATCH FILE
  309. REWIND SCR1,R REWIND SCRATCH FILE
  310. RJ RIF READ INPUT FILE
  311. SA5 S CHANGE FILE NAME OF INPUT
  312. BX6 X5
  313. SA6 I
  314. SA1 NR
  315. NZ X1,DOC0.1 IF NO REWIND OF SOURCE FILE
  316. REWIND A6,R REWIND SOURCE FILE
  317. DOC0.1 READ I BEGIN READING SOURCE CODE
  318. DOC1 READS I,DCD,NCR READ INPUT CARD
  319. NZ X1,DOC2 IF EOR/EOF
  320. RJ PRC PROCESS SUBPROGRAM
  321. EQ DOC1
  322.  
  323. DOC2 NG X1,DOC3 IF EOF
  324. SA5 S
  325. BX6 X5
  326. SA6 X2 RESET FILE NAME
  327. SA1 SBF CLEAR SUB-FOOT LINE
  328. BX6 X1
  329. LX7 X1
  330. SA6 A1+B1 STORE FIRST BLANK
  331. SA7 A6+B1 STORE SECOND BLANK
  332. SA6 A7+B1 STORE THIRD BLANK
  333. SA7 A6+B1 STORE FOURTH BLANK
  334. SA6 A7+B1 STORE FIFTH BLANK
  335. READ X2 INITIATE READ
  336. EQ DOC1 GO TILL EOF
  337.  
  338. DOC3 SA1 PCT CHECK PAGE PARITY
  339. SX6 B1
  340. BX6 X6*X1
  341. ZR X6,DOC4 IF EVEN PAGE COUNT
  342. WRITEC SCR1,(=2L1 )
  343. DOC4 WRITER SCR1,R WRITE EOR ON SCRATCH FILE
  344. WRITER SCR2,R
  345. MESSAGE (=C* COPYING OUTPUT.*),1
  346. RJ FCN FORMAT TABLE OF CONTENTS
  347.  
  348. DOC5 REWIND SCR1,R REWIND SCRATCH FILE
  349. SA5 O CHANGE FILE NAME ON INPUT
  350. MX7 0
  351. SA7 I
  352. READ I SET FIRST=IN=OUT
  353. BX6 X5
  354. SA6 X2 STORE NEW FILE NAME
  355. READ SCR1
  356. RJ CPY COPY THE FILE TO OUTPUT
  357. SA1 N
  358. SX6 X1-1 DECREMENT COPY COUNT
  359. SA6 A1
  360. NZ X6,DOC5 IF NOT FINISHED
  361. DOC6 RETURN SCR1,R
  362. RETURN SCR2,R
  363. MESSAGE (=C* DOCUMENTATION COMPLETE.*)
  364. ENDRUN
  365.  
  366. DOC7 MESSAGE (=C* ERROR IN DOCMENT ARGUMENTS.*)
  367. ABORT
  368. PRC TITLE SUBROUTINES.
  369. ** PRC - PROCESS SUBPROGRAM.
  370. *
  371. * ENTRY DCD - (DCD+NCR) = FIRST CARD FOLLOWING *END*.
  372. *
  373. * EXIT TO PROPER SUBPROGRAM MANAGER.
  374. *
  375. * USES A - 0, 2, 7.
  376. * B - 2, 5.
  377. * X - 0, 2, 3, 6, 7.
  378. *
  379. * CALLS GFW.
  380.  
  381.  
  382. PRC PS 0 ENTRY/EXIT
  383. SX7 B1 RESET FIRST CHARACTER SCAN
  384. SA7 FCR
  385. RJ GFW GET FIRST WORD
  386. SB2 -B1 SET PARAMETER COUNT
  387. SA2 TNM BASE OF MNEMONIC TABLE
  388. PRC1 BX0 X2 SET MASK
  389. PRC2 SA2 A2+B1 GET CHECK WORD
  390. NG X2,PRC1 IF MASK WORD
  391. SB2 B2+B1 BUMP PARAMETER COUNT
  392. ZR X2,PRC IF NOT SPECIAL CARD - END OF TABLE REACHED
  393. BX3 X0*X1
  394. IX6 X3-X2 CHECK NAME
  395. NZ X6,PRC2 NO MATCH - LOOP
  396. JP B2+PRC3 EXIT TO ROUTINE
  397.  
  398. PRC3 BSS 0 START OF TABLE
  399. LOC 0
  400. + EQ FTN *SUBROUTINE*
  401.  
  402. + SB5 B5-B1 *PRECISION*
  403. EQ SKP
  404.  
  405. + SB5 B5-2 *FUNCTION*
  406. EQ FTN
  407.  
  408. + SB5 B5-3 *PROGRAM*
  409. EQ FTN
  410.  
  411. + SB5 B5-3 *INTEGER*
  412. EQ SKP
  413.  
  414. + SB5 B5-3 *FORTRAN*
  415. EQ SKP
  416.  
  417. + SB5 B5-3 *LOGICAL*
  418. EQ SKP
  419.  
  420. + SA0 PRC *OVERLAY*
  421. EQ SPC
  422.  
  423. + SA0 PRC *SEGMENT*
  424. EQ SPC
  425.  
  426. + SA0 PRC *SECTION*
  427. EQ SPC
  428.  
  429. + SA0 PRC *SEGZERO*
  430. EQ SPC
  431.  
  432. + SA0 PRC *CHNLINK*
  433. EQ SPC
  434.  
  435. + SB5 B5-4 *DOUBLE*
  436. EQ SKP
  437.  
  438. + SB5 B5-4 *SINGLE*
  439. EQ SKP
  440.  
  441. + SB5 B5-4 *IDENT*
  442. EQ CMP
  443.  
  444. + SB5 B5-5 *BLOCK*
  445. EQ SKP
  446.  
  447. + SB5 B5-6 *TYPE*
  448. EQ SKP
  449.  
  450. + SB5 B5-6 *DATA*
  451. EQ BKD
  452.  
  453. + SB5 B5-6 *REAL*
  454. EQ SKP
  455.  
  456. + SB5 B5-8 *II*
  457. EQ SKP
  458.  
  459. + SB5 B5-8 *IV*
  460. EQ SKP
  461.  
  462. + SB5 B5-8 *VI*
  463. EQ SKP
  464.  
  465. LOC *O
  466. GFW SPACE 4,20
  467. ** GFW - GET FIRST WORD FROM CARD.
  468. *
  469. * ENTRY (FCR) = FIRST CHARACTER ON CARD TO ANALYZE.
  470. * AT *SKP* FOR SPECIAL CARDS.
  471. *
  472. * EXIT (B5) = LOCATION OF NEXT CHARACTER TO READ.
  473. * (X1) = FIRST 10 CHARACTERS FOLLOWING LEADING BLANKS.
  474. *
  475. * USES A - 2.
  476. * B - 5, 7.
  477. * X - 1, 2, 3, 4, 5, 6.
  478.  
  479.  
  480. GFW PS 0 ENTRY/EXIT
  481. SA2 FCR FIRST CHARACTER
  482. SB5 X2+DCD-1
  483.  
  484. SKP BSS 0 ENTRY FOR SKIP
  485.  
  486. GFW1 SX1 0 CLEAR FLAG WORD
  487. SX3 1R
  488. SX4 1R0
  489. SB7 9
  490. GFW2 SA2 B5 READ CHARACTER
  491. SB5 B5+B1
  492. ZR X2,GFW END OF CARD
  493. IX5 X2-X3
  494. BX6 X2-X4
  495. ZR X5,GFW2 IF BLANK
  496. ZR X6,GFW2 IF ZERO
  497.  
  498. GFW3 BX1 X1+X2
  499. SA2 B5 READ NEXT CHARACTER
  500. SB7 B7-B1 DECREMENT LOOP COUNT
  501. LX1 6
  502. SB5 B5+B1
  503. NZ B7,GFW3 LOOP FOR 10 CHARS
  504. BX1 X1+X2
  505. EQ GFW EXIT
  506. FTN SPACE 4,10
  507. ** FTN - PROCESS FORTRAN SUBPROGRAMS.
  508. *
  509. * ENTRY (B5) = ADDRESS OF NEXT CHARACTER TO READ.
  510. *
  511. * USES A - 0, 2, 6.
  512. * B - 2.
  513. * X - 0, 2, 3, 4, 6.
  514. *
  515. * CALLS CNT, CTA, GFW, LST, TTL.
  516.  
  517.  
  518. FTN BSS 0 ENTRY
  519. SX6 B1+ SET PROGRAM TYPE TO FORTRAN
  520. SA6 PTYP
  521. RJ CNT ADD TO TABLE OF CONTENTS
  522. RJ TTL SET TITLE AND START NEW PAGE
  523. SX6 7 SET STARTING CHAR FOR GFW
  524. SA6 FCR
  525.  
  526. FTN1 READS I,DCD,NCR READ NEXT CARD
  527. NZ X1,ABT IF PREMATURE EOR/EOF
  528. RJ CTA COUNT ASTERISKS
  529. ZR X1,FTN2 IF NOT A COMMENT
  530. SA2 MAS MINIMUM NUMBER OF ASTERISKS TO DOCUMENT
  531. IX4 X1-X2
  532. NG X4,FTN1 IF NOT ENOUGH
  533. RJ LST GO PROCESS COMMENT CARDS
  534. FTN2 RJ GFW GET FIRST WORD
  535. SB2 -B1 SET PARAMETER COUNT
  536. SA2 FTNA BASE OF SPECIAL NAMES TABLE
  537.  
  538. FTN3 BX0 X2 SET MASK
  539. FTN4 SA2 A2+B1 GET CHECK WORD
  540. NG X2,FTN3 IF MASK WORD
  541. SB2 B2+B1 BUMP PARAMETER COUNT
  542. ZR X2,FTN1 IF NOT SPECIAL CARD - END OF TABLE
  543. BX3 X0*X1
  544. IX6 X3-X2 CHECK NAME
  545. NZ X6,FTN4 NO MATCH - LOOP
  546. JP B2+FTN5 EXIT TO ROUTINE
  547.  
  548. FTN5 BSS 0 JUMP TABLE
  549. LOC 0
  550. + SA0 PRC *END*
  551. EQ EDC
  552.  
  553. LOC *O
  554.  
  555. FTNA VFD 24/-0,36/ 4 CHAR MASK
  556. DATA 4LEND
  557. VFD 60/ END OF TABLE
  558. CMP SPACE 4,10
  559. ** CMP - PROCESS COMPASS SUBPROGRAM.
  560. *
  561. * ENTRY (B5) = ADDRESS OF NEXT CHARACTER TO READ.
  562. *
  563. * USES A - 0, 2, 5, 6, 7.
  564. * B - 2, 5.
  565. * X - 0, 2, 3, 4, 5, 6, 7.
  566. *
  567. * CALLS CNT, CTA, GFW, LST, TTL.
  568.  
  569.  
  570. CMP BSS 0 ENTRY
  571. SX6 B0+ SET PROGRAM TYPE TO *COMPASS*
  572. SA6 PTYP
  573. RJ CNT ADD TO TABLE OF CONTENTS
  574. RJ TTL SET TITLE AND START NEW PAGE
  575. SX6 11 SET STARTING COLUMN FOR GFW
  576. SA6 FCR
  577. SX6 30 SET COLUMN NUMBER
  578. SA6 CCM
  579. SA5 CMPA RESET TITLE IN TABLE
  580. BX7 X5
  581. SA7 CMPC
  582.  
  583. CMP1 READS I,DCD,NCR READ NEXT CARD
  584. NZ X1,ABT IF PREMATURE EOR/EOF
  585. RJ CTA COUNT ASTERISKS
  586. ZR X1,CMP2 IF NOT COMMENT CARD
  587. SA2 MAS MINIMUM NUMBER OF ASTERISKS TO DOCUMENT
  588. IX4 X1-X2
  589. NG X4,CMP1 IF NOT ENOUGH
  590. RJ LST GO PROCESS COMMENT CARDS
  591. CMP2 RJ GFW GET FIRST WORD
  592. SX6 B5-DCD-10 CHECK WHICH COLUMN KEYWORD STARTED
  593. SA2 CCM
  594. IX6 X6-X2
  595. PL X6,CMP1 IF STARTED AFTER COMMENT COLUMN
  596. SB2 -B1 SET PARAMETER COUNT
  597. SA2 CMPB BASE OF SPECIAL NAMES TABLE
  598.  
  599. CMP3 BX0 X2 SET MASK
  600. CMP4 SA2 A2+B1 READ CHECK WORD
  601. NG X2,CMP3 IF MASK
  602. SB2 B2+B1 BUMP PARAMETER COUNT
  603. ZR X2,CMP1 IF NOT SPECIAL WORD - END OF TABLE
  604. BX3 X0*X1
  605. IX6 X3-X2 CHECK NAME
  606. NZ X6,CMP4 NO MATCH - LOOP
  607. JP B2+CMP5 EXIT TO ROUTINE
  608.  
  609. CMP5 BSS 0 START OF JUMP TABLE
  610. LOC 0
  611. + SB5 B5-2 *SEGMENT*
  612. EQ NDK
  613.  
  614. + SB5 B5-4 *CTEXT*
  615. EQ CTX
  616.  
  617. + SB5 B5-4 *IDENT*
  618. EQ NDK
  619.  
  620. + SB5 B5-5 *ENDX*
  621. EQ EDX
  622.  
  623. + SB5 B5-4 *LIST*
  624. EQ LSC
  625.  
  626. + SB5 B5-6 *COL*
  627. EQ COL PROCESS *COL* CARD
  628.  
  629. + SA0 PRC *END*
  630. EQ EDC
  631.  
  632. + SA0 CMP1 *LCC*
  633. EQ LCC
  634.  
  635. CMP6 SB5 B5-4 *TITLE*
  636. EQ TIT
  637.  
  638. LOC *O
  639.  
  640. CMPA DATA 6LTITLE
  641. CMPB VFD 48/-0,12/ 8 CHAR MASK
  642. DATA 8LSEGMENT
  643. VFD 36/-0,24/ 6 CHAR MASK
  644. DATA 6LCTEXT
  645. DATA 6LIDENT
  646. VFD 30/-0,30/ 5 CHAR MASK
  647. DATA 5LENDX
  648. DATA 5LLIST
  649. VFD 24/-0,36/ 4 CHAR MASK
  650. DATA 4LCOL
  651. DATA 4LEND
  652. DATA 4LLCC
  653. VFD 36/-0,24/ 6 CHAR MASK FOR *TITLE* - MUST BE LAST
  654.  
  655. CMPC DATA 6LTITLE
  656. VFD 60/ END OF TABLE
  657. NDK SPACE 4,10
  658. ** NDK - PROCESS NEW DECK *IDENT* OR *SEGMENT*.
  659. *
  660. * ENTRY (B5) = ADDRESS OF NEXT CHARACTER IN STRING BUFFER.
  661. * (X1) = FIRST 10 CHARACTERS OF SPECIAL CARD.
  662. * (A0) = EXIT ADDRESS.
  663. *
  664. * USES A - 1, 7.
  665. * X - 0, 1, 7.
  666. *
  667. * CALLS LSL, STB.
  668.  
  669.  
  670. NDK SA1 FLF CHECK TO SEE IF AT TOP OF PAGE
  671. ZR X1,CMP1 IF NO OUTPUT YET
  672. SA1 LCT
  673. BX0 X1
  674. RJ STB
  675. RJ LSL
  676. MX7 0 CLEAR FIRST LINE LISTED FLAG
  677. SA7 FLF
  678. EQ CMP1 RETURN
  679. SPC SPACE 4,20
  680. ** SPC - PROCESS SPECIAL CARDS.
  681. *
  682. * ENTRY (B5) = ADDRESS OF NEXT CHARACTER IN STRING BUFFER.
  683. * (X1) = FIRST 10 CHARACTERS OF SPECIAL CARD.
  684. * (A0) = EXIT ADDRESS.
  685. *
  686. * EXIT IMAGE OF SPECIAL CARD IS PLACED IN SUB-FOOT LINE.
  687. *
  688. * USES A - 2, 7.
  689. * B - 2, 6, 7.
  690. * X - 2, 7.
  691.  
  692.  
  693. SPC BX7 X1
  694. SA2 B5 READ NEXT CHARACTER
  695. SA7 SBF+1 STORE FIRST WORD
  696. SB6 4 SET WORD COUNT
  697. SB7 9 SET CHARACTER COUNT
  698. BX7 X2
  699. EQ SPC2 GO PACK WORD
  700.  
  701. SPC1 SB7 10 SET CHARACTER COUNT
  702. SA7 A7+B1 STORE NEXT WORD
  703. SB6 B6-B1 DECREMENT WORD COUNT
  704. MX7 0 CLEAR ENCODE WORD
  705. ZR B6,SPC3 IF END OF SUB-FOOT LINE
  706. SPC2 SA2 A2+B1 READ NEXT CHARACTER
  707. LX7 6
  708. SB7 B7-B1 DECREMENT CHARACTER COUNT
  709. BX7 X2+X7
  710. NZ B7,SPC2 LOOP FOR 10 CHARACTERS
  711. EQ SPC1 STORE WORD
  712.  
  713. SPC3 SB2 A0 SET EXIT ADDRESS
  714. JP B2 EXIT
  715. CNT SPACE 4,10
  716. ** CNT - SET TABLE OF CONTENTS.
  717. *
  718. * ENTRY (B5) = ADDRESS OF NEXT CHARACTER TO READ.
  719. *
  720. * EXIT SUBCHAPTER AND PAGE COUNTS UPDATED.
  721. *
  722. * USES A - 2, 3, 4, 6, 7.
  723. * B - 6, 7.
  724. * X - 0, 2, 3, 4, 5, 6, 7.
  725.  
  726.  
  727. CNT5 SA2 A2 DECREMENT SUB-CHAPTER COUNT
  728. SX6 X2-1
  729. SA6 A2
  730.  
  731. CNT PS 0 ENTRY/EXIT
  732. SA2 CHP CHAPTER COUNT
  733. MX7 0
  734. SX6 X2+B1
  735. SA7 SPG RESET SUB-CHAPTER PAGE COUNT
  736. SA6 A2 RESET CHAPTER COUNT
  737. SA3 B5-B1 DUMMY READ
  738. SX2 1R
  739. SB7 54
  740. SB6 -1R,
  741. SX5 1R(
  742.  
  743. CNT1 SA3 A3+B1 READ NEXT CHARACTER
  744. BX4 X3-X2
  745. ZR X4,CNT1 IF BLANK
  746. ZR X3,CNT4 IF END OF LINE
  747.  
  748. CNT2 IX6 X3-X5
  749. SX4 X3+B6
  750. ZR X6,CNT3 IF TERMINATOR
  751. ZR X4,CNT3
  752. BX7 X7+X3
  753. SB7 B7-6
  754. SA3 A3+B1 READ NEXT CHARACTER
  755. LX7 6
  756. NZ B7,CNT2 LOOP FOR 10 CHARACTERS
  757. CNT3 LX7 X7,B7
  758. CNT4 ZR X7,CNT5 IF NO NAME FOUND
  759. SA7 CNTB
  760. SA4 CHP GET SUBCHAPTER COUNT
  761. SX6 X4
  762. MX0 42
  763. BX7 X0*X7
  764. BX6 X6+X7
  765. WRITEO SCR2
  766. MESSAGE CNTA,1
  767. EQ CNT EXIT
  768.  
  769. CNTA DATA 10H READING
  770. CNTB DATA 0
  771. DATA 0
  772. CNTC CON 0
  773. FCN SPACE 4,10
  774. ** FCN - FORMAT TABLE OF CONTENTS.
  775. *
  776. * USES A - 1, 2, 3, 4, 5, 6, 7.
  777. * B - 3.
  778. * X - ALL.
  779. *
  780. * CALLS CVT, SFN, SRT.
  781.  
  782.  
  783. FCN4 WRITER SCR2,R
  784. FCN PS 0 ENTRY/EXIT
  785. REWIND SCR2,R
  786. SA5 SCR2
  787. MX7 0
  788. SA7 I
  789. READ I RESET FIRST=IN=OUT
  790. BX6 X5
  791. SA6 X2
  792. SA1 TC CHECK FOR LIST OF TABLE OF CONTENTS
  793. ZR X1,FCN4 EXIT
  794. READ I,R
  795. REWIND SCR2,R
  796. SA1 LLM
  797. SX1 X1-61
  798. NG X1,FCN0 IF NOT MORE THAN 60 LINES PER PAGE
  799. SX6 1RT
  800. LX6 60-6
  801. WRITEO SCR2
  802. FCN0 WRITEW SCR2,FCNB,LFCB
  803. SA1 PCT BUMP PAGE COUNT FOR PAGE PARITY
  804. SX6 X1+B1
  805. SA6 A1
  806. SX7 4
  807. SA7 LCT
  808. RJ SRT SORT DECK NAME TABLE
  809. SA5 I+2 IN
  810. SA4 A5+B1 OUT
  811. IX6 X5-X4 CALCULATE THE NUMBER OF ROWS TO PRINT
  812. SX0 X4
  813. SX6 X6+3
  814. AX6 2 DIVIDE BY 4
  815. SX7 -B1
  816. SA6 FCNA+1 NUMBER OF ROWS
  817. SA7 A6+B1 CURRENT ROW
  818. SA6 A6-B1 INCREMENT
  819. FCN1 SA1 FCNA+1 DECREMENT ROW COUNT
  820. SX6 X1-1
  821. ZR X1,FCN4 IF END OF TABLE
  822. SA2 A1+B1 ADVANCE INCREMENT
  823. SA6 A1
  824. SX7 X2+B1
  825. SA7 A2
  826. SA1 I+3 OUT
  827. IX0 X7+X1 SAVE ENTRY ADDRESS
  828. SA6 DCD-1 INITIALIZE STORE ADDRESS
  829. FCN2 SA3 X0 READ ENTRY
  830. MX4 42
  831. BX1 X4*X3 GET SUBPROGRAM NAME
  832. SB3 X3
  833. RJ SFN FILL NAME WITH SPACES
  834. LX6 60-18 RIGHT JUSTIFY NAME
  835. SX1 B3
  836. SA6 A6+B1 STORE IN PRINT LINE
  837. RJ CVT
  838. LX6 X7,B7
  839. LX6 6*4
  840. SA6 A6+B1 STORE NUMBER
  841. SA1 FCNA LENGTH OF ROW
  842. IX0 X0+X1 BUMP TO NEXT ENTRY
  843. IX6 X0-X5
  844. NG X6,FCN2 LOOP TO END OF LINE
  845. MX7 0
  846. SA7 A6+B1
  847. SA2 LCT
  848. SA3 LLM
  849. SX6 X2+B1 BUMP LINE COUNT
  850. SA6 A2
  851. IX7 X6-X3 CHECK FOR END OF PAGE
  852. NG X7,FCN3
  853. WRITEW SCR2,FCNB,LFCB
  854. SA1 PCT BUMP PAGE COUNT
  855. SX6 X1+B1
  856. SA6 A1
  857. SX7 4
  858. SA7 LCT
  859. FCN3 WRITEC SCR2,DCD
  860. EQ FCN1 CONTINUE FOR ALL ROWS
  861.  
  862. FCNA BSS 3 TEMPORARY STORAGE
  863. FCNB DATA H*1 LIST OF SUB-PROGRAMS AND CORRESPONDING CHAPTERS*
  864. DATA C* PROCESSED BY DOCMENT.*
  865. DATA 2L0
  866. LFCB EQU *-FCNB
  867. SRT SPACE 4,10
  868. ** SRT - SORT DECK NAME TABLE.
  869. *
  870. * USES A - 0, 1, 2, 6, 7.
  871. * B - 2, 3, 4, 5, 6, 7.
  872. * X - 1, 2, 4, 5, 6, 7.
  873.  
  874.  
  875. SRT PS 0 ENTRY/EXIT
  876. SA1 I+2 LWA+1 TABLE
  877. SA2 A1+B1
  878. IX5 X1-X2 LENGTH = (B7) = N
  879. SA0 X2-1
  880. SB7 X5
  881. SB6 X5
  882.  
  883. SRT1 SX6 B6 N = N/2
  884. AX6 1
  885. SB6 X6
  886. SB3 B1 J = 1
  887. ZR B6,SRT RETURN IF M = 0
  888. SB4 B7-B6 N = N-M
  889. SB2 B3 I = J
  890.  
  891. SRT2 SB5 B2+B6 L = I+M
  892. SA1 A0+B2 A(I)
  893. SA2 A0+B5 A(L)
  894. IX4 X2-X1
  895. PL X4,SRT3 IF A(L) > A(I)
  896. BX6 X1 INTERCHANGE A(L) AND A(I)
  897. LX7 X2
  898. SA6 A2
  899. SA7 A1
  900. SB2 B2-B6 I = I-M
  901. GT B2,SRT2 IF I > 0
  902.  
  903. SRT3 SB3 B3+B1 J = J+1
  904. SB2 B3 I = J
  905. LE B3,B4,SRT2 IF J @ K
  906. EQ SRT1
  907. LCC SPACE 4,10
  908. ** LCC - PROCESS *LCC* CARDS.
  909. *
  910. * ENTRY (A0) = EXIT ADDRESS.
  911. * (B5) = ADDRESS OF NEXT CHARACTER IN STRING BUFFER.
  912. *
  913. * USES A - 2, 6.
  914. * B - 2.
  915. * X - 2, 6.
  916. *
  917. * CALLS GFW.
  918.  
  919.  
  920. LCC SA2 FCR GET FIRST CHARACTER ADDRESS
  921. SX6 B5-DCD
  922. SX6 X6-6 SET FIRST CHARACTER FOR GFW
  923. SB2 X2 SAVE ADDRESS OF OLD FIRST CHARACTER
  924. SA6 A2
  925. RJ GFW GET FIRST WORD SET UP FOR SPC
  926. SX6 B2 RESTORE FCR
  927. SA6 FCR
  928. EQ SPC PROCESS AS SPECIAL CARD
  929. TTL SPACE 4,10
  930. ** TTL - SET TITLE OF NEW SUBPROGRAM.
  931. *
  932. * USES A - 2, 3, 7.
  933. * B - 6, 7.
  934. * X - 0, 1, 2, 3, 6, 7.
  935. *
  936. * CALLS GFW.
  937.  
  938.  
  939. TTL PS 0 ENTRY/EXIT
  940. RJ GFW GET FIRST WORD
  941. SA3 TTLA
  942. MX0 12
  943. LX1 48
  944. BX6 -X0*X1 GET FIRST 8 CHARACTERS
  945. BX7 X6+X3
  946. SA7 HDG SET FIRST WORD OF HEADING
  947. SB7 8 SET CHARACTER COUNT
  948. BX7 X0*X1 GET LAST 2 CHARACTERS
  949. SB6 4 SET WORD COUNT
  950. LX7 12
  951. EQ TTL2
  952.  
  953. TTL1 SB7 10
  954. SA7 A7+B1 STORE NEXT WORD
  955. SB6 B6-B1
  956. MX7 0
  957. ZR B6,TTL IF END OF TITLE LINE
  958. TTL2 SA2 A2+B1 READ NEXT CHARACTER
  959. LX7 6
  960. SB7 B7-B1
  961. BX7 X7+X2
  962. NZ B7,TTL2 LOOP FOR 10 CHARACTERS
  963. EQ TTL1
  964.  
  965. TTLA VFD 12/1H1,48/
  966. LFL SPACE 4,10
  967. ** LFL - LIST FIRST LINE.
  968. *
  969. * USES A - 1, 6, 7.
  970. * X - 1, 6, 7.
  971.  
  972.  
  973. LFL PS 0 ENTRY/EXIT
  974. SA1 SPG SUB-CHAPTER PAGE COUNT
  975. SX6 X1+B1
  976. SA6 A1 BUMP PAGE COUNT
  977. SX7 FLP
  978. SA7 LCT RESET LINE COUNT
  979. WRITEC SCR1,HDG WRITE HEADING LINE
  980. WRITEC X2,(=2L0 ) 2 BLANK LINES
  981. SX7 X2 SET FIRST LINE LISTED FLAG
  982. SA7 FLF
  983. EQ LFL EXIT
  984. CTA SPACE 4,10
  985. ** CTA - COUNT ASTERISKS.
  986. *
  987. * USES A - 2, 3, 6.
  988. * B - 7.
  989. * X - 1, 2, 3, 6, 7.
  990.  
  991.  
  992. CTA PS 0 ENTRY/EXIT
  993. MX1 0 SET INITIAL COUNT
  994. SX6 1R
  995. SA2 C READ CHECK CHARACTER
  996. SA3 DCD
  997. SB7 5
  998. CTA1 BX7 X3-X2 CHECK FOR ASTERISK
  999. SB7 B7-B1 DECREMENT LOOP COUNT
  1000. NZ X7,CTA IF NOT * EXIT
  1001. SA6 A3 REPLACE IT WITH A BLANK
  1002. SX1 X1+B1
  1003. SA3 A3+B1
  1004. NZ B7,CTA1 IF MORE CHARACTERS TO PROCESS
  1005. SX1 3 TREAT ***** LIKE *** STATEMENTS
  1006. EQ CTA EXIT
  1007. LST SPACE 4,10
  1008. ** LST - LIST DOCUMENTATION.
  1009. *
  1010. * ENTRY (X1) - NUMBER OF ASTERISKS FOUND.
  1011. *
  1012. * EXIT TO *EDC* IF END CARD ENCOUNTERED.
  1013. *
  1014. * USES A - 0, 1, 2, 4, 5, 6, 7.
  1015. * X - ALL.
  1016. *
  1017. * CALLS CTA, GFW, LFL, LSL, STB, TAB.
  1018.  
  1019.  
  1020. LST PS 0 ENTRY/EXIT
  1021. SA2 NAS MINIMUM NUMBER OF ASTERISKS FOR INT DOC
  1022. IX3 X1-X2
  1023. PL X3,LST5 DO INTERNAL DOCUMENTATION
  1024. SX2 4 CHECK FOR EXTERNAL DOCUMENTATION
  1025. IX3 X1-X2
  1026. PL X3,LST IF NOT EXTERNAL
  1027.  
  1028. LST1 SA2 FLF CHECK FIRST LINE FLAG
  1029. NZ X2,*+2 IF FIRST LINE HAS BEEN LISTED
  1030. + RJ LFL LIST FIRST LINE
  1031. SA1 LCT CHECK PAGE POSITION
  1032. SX5 X1-FLP CHECK FOR TOP OF PAGE
  1033. ZR X5,LST4 IF AT TOP
  1034. SX6 X1+4
  1035. SA6 A1 RESET LINE COUNT
  1036. SA4 LLM MAXIMUM NUMBER OF LINES ON PAGE
  1037. IX5 X6-X4
  1038. NG X5,LST3 IF NOT AT BOTTOM OF PAGE
  1039. BX6 X1 RESTORE LINE COUNT
  1040. SA6 A1
  1041. LST1A SA1 LCT
  1042. BX0 X1
  1043. RJ STB SKIP TO BOTTOM OF PAGE
  1044. LST2 RJ LSL LIST LAST LINE ON PAGE
  1045. RJ LFL LIST FIRST LINE
  1046. EQ LST4
  1047.  
  1048. LST3 WRITEC SCR1,(=2L0 )
  1049. WRITEC SCR1,(=2L0 )
  1050. LST4 SA1 DCD+1 CHECK COLUMN 2 FOR TABLE FLAG
  1051. SX2 X1-1RE CHECK FOR EJECT
  1052. SX1 X1-1RT
  1053. NZ X2,LST4A IF NOT EJECT CARD
  1054. SA2 TOG
  1055. NZ X2,LST4B IF INTERNAL TOGGLE IS ON - LIST THE CARD
  1056. SX7 1R CLEAR *E*
  1057. SA7 DCD+1
  1058. WRITES SCR1,LNE,NCR+2
  1059. SA1 LCT
  1060. SX0 X1+1 SET SPACE COUNT
  1061. RJ STB
  1062. SA2 LLM
  1063. SX6 X2-1
  1064. SA6 LCT RESET LINE COUNT
  1065. EQ LST4D CONTINUE
  1066.  
  1067. LST4A NZ X1,LST4B IF NOT TABLE CARD
  1068. SA2 TOG CHECK FOR INTERNAL NO ASTERISK
  1069. NZ X2,LST4B IF SO
  1070. SA2 NT CHECK STATUS OF TABLE GENERATOR
  1071. NZ X2,LST4B IF OFF
  1072. RJ TAB PROCESS TABLE
  1073. EQ LST4C PROCESS THE NEXT CARD
  1074.  
  1075. LST4B WRITES SCR1,LNE,NCR+2 WRITE CARD TO DOC FILE
  1076. LST4D SA1 LCT BUMP LINE COUNT
  1077. SX6 X1+B1
  1078. SA6 A1
  1079. READS I,DCD,NCR READ NEXT CARD
  1080. NZ X1,ABT IF PREMATURE EOR/EOF
  1081. RJ CTA COUNT ASTERISKS
  1082.  
  1083. LST4C SA2 NAS CHECK FOR END OF INTERNAL DOCUMENTATION
  1084. IX4 X1-X2
  1085. PL X4,LST5 IF END
  1086. ZR X1,LST7 CHECK FOR END OF DOCUMENTATION
  1087. SA5 LCT CHECK FOR END OF PAGE
  1088. SA4 LLM LINE LIMIT
  1089. IX5 X5-X4
  1090. NG X5,LST4 IF NOT AT BOTTOM OF PAGE
  1091. EQ LST2
  1092.  
  1093. LST5 SA1 TOG CHECK TOGGLE
  1094. NZ X1,LST6 IF ON
  1095. SA2 MAS SAVE MINIMUM EXT * COUNT
  1096. MX7 0
  1097. BX6 X2
  1098. SA7 A2 SET MINIMUM AST TO 0
  1099. SA6 A1 SET TOGGLE
  1100. EQ LST1 GO LIST CARD
  1101.  
  1102. LST6 MX7 0 RESET TOGGLE
  1103. BX6 X1
  1104. SA7 A1
  1105. SA6 MAS RESET MINIMUM FOR EXT DOC
  1106. EQ LST1 GO LIST CARD
  1107.  
  1108. LST7 SA1 TOG CHECK MODE
  1109. ZR X1,LST IF EXTERNAL
  1110. RJ GFW
  1111. MX0 24 CHECK FOR END CARD
  1112. SA2 =4LEND
  1113. BX6 X0*X1
  1114. BX6 X6-X2
  1115. SA0 PRC SET EXIT FOR END
  1116. ZR X6,EDC IF *END* CARD
  1117. SA5 LCT
  1118. SA4 LLM CHECK FOR END OF PAGE
  1119. IX5 X5-X4
  1120. NG X5,LST4 IF NOT AT BOTTOM OF PAGE
  1121. EQ LST2
  1122. LSL SPACE 4,10
  1123. ** LSL - LIST LAST LINE.
  1124. *
  1125. * USES A - 1, 6, 7.
  1126. * X - 0, 1, 5, 6, 7.
  1127. *
  1128. * CALLS CVT.
  1129.  
  1130.  
  1131. LSL PS 0 ENTRY/EXIT
  1132. WRITEC SCR1,(=2L )
  1133. SA1 CHP CHAPTER COUNT
  1134. RJ CVT CONVERT THE CHAPTER COUNT TO DECIMAL DISP
  1135. LX7 X7,B7
  1136. MX0 60-18
  1137. SA1 PGE
  1138. BX7 -X0*X7
  1139. BX6 X0*X1
  1140. BX7 X6+X7
  1141. SA7 A1
  1142. SA1 SPG
  1143. RJ CVT
  1144. MX0 42
  1145. BX7 X0*X7 CLEAR LOW 18 BITS
  1146. SX5 1R/
  1147. BX7 X5+X7
  1148. LX7 54
  1149. SA7 A7+B1 SET SUBCHAPTER PAGE COUNT
  1150. WRITEC SCR1,FOT WRITE PAGE FOOTING
  1151. WRITEC SCR1,(=2L )
  1152. WRITEC SCR1,SBF WRITE PAGE SUB-FOOT
  1153. SA1 PCT BUMP PAGE COUNT
  1154. SX6 X1+B1
  1155. SA6 A1
  1156. EQ LSL EXIT
  1157. TAB SPACE 4,20
  1158. ** TAB - PROCESS TABLE GENERATION.
  1159. * J.C. BOHNHOFF - 70/7/4.
  1160. *
  1161. * ENTRY (A1) = ADDRESS OF *T* CHARACTER IN CARD.
  1162. *
  1163. * EXIT TABLES GENERATED AND LISTED.
  1164. * GENERATION TERMINATED AT END OF *T* BLOCK.
  1165. *
  1166. * USES A - 1, 2, 6, 7.
  1167. * B - 7.
  1168. * X - 1, 2, 4, 6, 7.
  1169. *
  1170. * CALLS ASD, ASF, CTA, DXB, LFL, LSL, LTB, STL.
  1171.  
  1172.  
  1173. TAB PS 0 ENTRY/EXIT
  1174. SA1 A1+B1 READ SECOND CHARACTER TO CHECK FOR HEADER
  1175. *OFF*
  1176. SX6 1R,
  1177. MX7 0
  1178. SA6 DCD+NCR TERMINATE CARD STRING BUFFER
  1179. SA7 A6+1
  1180. SX6 X1-1R
  1181. SA6 PBP SET *PRINT BIT POSITIONS* FLAG
  1182.  
  1183. TAB0 SX6 1R-
  1184. SB7 71
  1185. TAB0A SA6 AST+B7
  1186. SB7 B7-1
  1187. NZ B7,TAB0A
  1188. RJ STL SET TABLE LABEL
  1189. SX7 0 CLEAR TOTAL BIT COUNT
  1190. SX6 TCL AND SET POINTER TO BEGINNING OF CONTENT
  1191. LINE BUFFER
  1192. SA7 TBC
  1193. SA6 TCLP
  1194.  
  1195. TAB1 RJ ASD ASSEMBLE DIGIT FIELD
  1196. ZR X1,TAB3 IF END OF CARD
  1197. RJ DXB CONVERT DIGIT FIELD TO BINARY
  1198. NZ X4,TAB2 IF DIGIT FIELD ERROR
  1199. SX7 X6-61 CHECK LEGALITY OF FIELD
  1200. PL X7,TAB2
  1201. RJ ASF ASSEMBLE TABLE FIELD
  1202. EQ TAB1 CONTINUE FORMING TABLE
  1203.  
  1204. TAB2 WRITES SCR1,LNE,NCR+2 LIST THE BAD CARD NORMALLY
  1205. SA1 LCT ADVANCE LINE COUNT
  1206. SX7 X1+B1
  1207. SA7 A1
  1208. SA2 LLM CHECK FOR END OF PAGE
  1209. IX6 X7-X2
  1210. NG X6,TAB4 IF NOT AT BOTTOM OF PAGE
  1211. RJ LSL LIST LAST LINE ON PAGE
  1212. RJ LFL LIST FIRST LINE
  1213. EQ TAB4
  1214.  
  1215. TAB3 RJ LTB LIST TABLE ENTRY
  1216.  
  1217. TAB4 READS I,DCD,NCR READ NEXT CARD
  1218. NZ X1,ABT IF PREMATURE EOR/EOF
  1219. RJ CTA COUNT ASTERISKS
  1220. ZR X1,TAB **RETURN - IF NOT COMMENT CARD
  1221. SA2 DCD+1 CHECK FOR CONTINUATION OF TABLE BLOCK
  1222. SX4 X2-1RT
  1223. NZ X4,TAB **RETURN IF NOT *T CARD
  1224. SA1 A2+B1 READ NEXT CHARACTER FOR *STL*
  1225. EQ TAB0 GO PROCESS THE CARD
  1226. STL SPACE 4,20
  1227. ** STL - SET TABLE LABEL IF ANY.
  1228. * J.C. BOHNHOFF - 70/07/11.
  1229. *
  1230. * ENTRY (A1) = ADDRESS+1 OF *T* CHARACTER.
  1231. *
  1232. * EXIT (A1) = ADDRESS OF LAST CHARACTER OF LABEL OR ADDRESS
  1233. * OF FIRST CHARACTER BEFORE DIGIT FIELD IF NO LABEL.
  1234. *
  1235. * USES A - 1, 2, 6, 7.
  1236. * X - 1, 2, 3, 4, 5, 6, 7.
  1237. *
  1238. * CALLS ASF, MVE.
  1239.  
  1240.  
  1241. STL1 SX4 1R SPACE
  1242. SA2 A1 PRESET (A2)
  1243. SX5 X4+B1 COMMA
  1244.  
  1245. STL1A SA2 A2+1 SEARCH FOR END OF TAG
  1246. ZR X2,STL IF END OF CARD
  1247. IX3 X4-X2 COMPARE SPACE
  1248. BX7 X5-X2 COMPARE COMMA
  1249. ZR X7,STL1B IF COMMA
  1250. NZ X3,STL1A IF NOT SPACE
  1251. BX7 X5
  1252. SA7 A2 REPLACE SPACE WITH COMMA
  1253.  
  1254. STL1B SX7 TCF+1 SET PARAMS FOR ASF
  1255. MX6 0 CLEAR RESIDUE FROM TOTAL BIT COUNT
  1256. SA6 TBC
  1257. SX6 9
  1258. SA7 TCLP
  1259. RJ ASF ASSEMBLE LABEL INTO LIST LINE
  1260.  
  1261. STL PS
  1262. SX1 9 CLEAR BEGINNING OF CONTENT LINE
  1263. SX2 BLN
  1264. SX3 TCF
  1265. RJ =XMVE=
  1266.  
  1267. STL2 SA1 A1+1 CHECK NEXT CHARACTER
  1268. SX3 X1-1R
  1269. ZR X1,STL IF END OF CARD
  1270. ZR X3,STL2 IF ANOTHER BLANK
  1271. SX3 X1-1RZ-1
  1272. SA1 A1-1 BACKSPACE
  1273. NG X3,STL1 IF ALPHA
  1274. EQ STL **RETURN - NO LABEL
  1275. ASD SPACE 4,20
  1276. ** ASD - ASSEMBLE DIGIT FIELD.
  1277. * J.C. BOHNHOFF - 70/7/4.
  1278. *
  1279. * ENTRY (A1)= ADDRESS OF CHARACTER PRECEDING A SUPPOSED
  1280. * DIGIT FIELD.
  1281. * DCD MUST BE ZERO TERMINATED.
  1282. *
  1283. * EXIT (X5) = LEFT JUSTIFIED DISPLAY CODED DIGIT FIELD.
  1284. * (B7) = NONZERO.
  1285. * (X1) = 0 IF END OF CARD ENCOUNTERED BEFORE DIGIT FIELD.
  1286. * LEADING SPACES ARE IGNORED AND ASSEMBLY TERMINATES
  1287. * WHEN A */* IS ENCOUNTERED.
  1288. *
  1289. * USES A - 1.
  1290. * B - 2, 3, 7.
  1291. * X - 1, 3, 4, 5.
  1292.  
  1293.  
  1294. ASD1 ZR X1,ASD IF END OF CARD ENCOUNTERED
  1295. SX3 X1-1R CHECK FOR LEADING SPACE
  1296. NZ X3,ASD1A IF FIRST NON-BLANK CHARACTER
  1297. SA1 A1+1 READ NEXT CHARACTER
  1298. EQ ASD1 LOOP TILL END OF CARD OR FIRST NON-BLANK
  1299.  
  1300. ASD1A SX3 X1-1R0 CHECK FOR LEADING NUMERIC
  1301. SX5 -1 FORCE DXB ERROR IF NOT NUMERIC
  1302. NG X3,ASD IF ALPHA
  1303. SX3 X3-10
  1304. NG X3,ASD2 IF NOT SPECIAL CHARACTER
  1305. SX3 X1-1R, CHECK FOR COMMA AS FIRST CHARACTER
  1306. NZ X3,ASD IF NOT COMMA
  1307. SX1 0 FLAG END-OF-CARD
  1308. EQ ASD **RETURN
  1309.  
  1310. ASD2 SX3 X1-1R/ CHECK FOR FIELD SEPERATOR
  1311. ZR X1,ASD **RETURN - IF EOC
  1312. ZR X3,ASD3 IF SEPERATOR
  1313. LX4 6 SHIFT ASSEMBLY
  1314. BX4 X4+X1 INSERT NEXT CHARACTER
  1315. SB3 B3-B2 ADVANCE BIT COUNT
  1316. SA1 A1+B1 READ NEXT CHARACTER
  1317. EQ ASD2
  1318.  
  1319. ASD3 LX5 X4,B3 LEFT JUSTIFY THE DIGITS
  1320. SB7 1
  1321.  
  1322. ASD PS ENTRY/EXIT
  1323. SB2 6
  1324. SB3 60 INITIALIZE ASSEMBLY BIT COUNT
  1325. MX4 0 CLEAR ASSEMBLY REGISTER
  1326. SA1 A1+B1 READ FIRST CHARACTER TO BE CONSIDERED
  1327. EQ ASD1 GO ASSEMBLE
  1328. ASF SPACE 4,20
  1329. ** ASF - ASSEMBLE TABLE FIELD INTO LINE.
  1330. * J.C. BOHNHOFF - 70/7/4.
  1331. *
  1332. * ENTRY (A1)= ADDRESS OF CHARACTER PRECEDING A SUPPOSED
  1333. * NAME FIELD.
  1334. * (X6) = NUMBER OF BITS IN FIELD.
  1335. *
  1336. * EXIT FIELD ASSEMBLED INTO TABLE LINE BUFFER.
  1337. *
  1338. * USES A - 1, 3, 4, 7.
  1339. * X - 1, 3, 4, 5, 6, 7.
  1340.  
  1341.  
  1342. ASF PS ENTRY/EXIT
  1343. SA3 TBC TOTAL BIT COUNT
  1344. SA4 TCLP TABLE CONTENT LINE POINTER
  1345. IX7 X3+X6 ADVANCE TOTAL BIT COUNT
  1346. SA7 A3
  1347. SX5 X6-1 DECREMENT NUMBER OF BITS IN FIELD
  1348. NG X5,ASF6 IF NEGATIVE BIT COUNT
  1349. NZ X5,ASF1 IF NOT SINGLE BIT FIELD
  1350. SX5 X4-TCL+AST+1
  1351. SX7 1R+
  1352. SA7 X5
  1353. SA1 A1+B1
  1354. BX7 X1
  1355. EQ ASF5
  1356.  
  1357. ASF1 SA1 A1+B1 READ NAME CHARACTER
  1358. SX6 X6-1 DECREMENT BIT COUNT
  1359. BX7 X1
  1360. ZR X1,ASF4 IF END OF CARD
  1361. SX3 X1-1R, CHECK FOR COMMA SEPERATOR
  1362. ZR X3,ASF4 IF COMMA
  1363. ZR X6,ASF1A IF TIME TO INSERT FIELD SEPERATOR
  1364. SA7 X4 STORE CHARACTER IN FIELD
  1365. SX4 X4+B1 ADVANCE CHARACTER POINTER
  1366. EQ ASF1 CONTINUE
  1367.  
  1368. ASF1A SA1 A1+1 SEARCH FOR END OF NAME FIELD
  1369. SX3 X1-1R,
  1370. ZR X1,ASF2 IF END OF STATEMENT
  1371. NZ X3,ASF1A CONTINUE IF NOT END
  1372. ASF2 SX7 1R/ STORE FIELD SEPERATOR
  1373. SA7 X4
  1374. SX4 X4+B1 ADVANCE CHARACTER POINTER
  1375. ASF3 BX7 X4 RESTORE CHARACTER POINTER
  1376. SA7 A4
  1377. EQ ASF **RETURN
  1378.  
  1379. ASF4 SX7 1R PROPAGATE SPACES UNTIL FIELD EXHAUSTED
  1380. ZR X6,ASF2 IF TIME TO INSERT FIELD SEPERATOR
  1381. SA7 X4 STORE CHARACTER IN FIELD
  1382. SX6 X6-1 DECREMENT BIT COUNT
  1383. SX4 X4+B1 ADVANCE CHARACTER POINTER
  1384. EQ ASF4 CONTINUE
  1385.  
  1386. ASF5 SA7 X4 STORE SINGLE CHARACTER
  1387. SX4 X4+1 ADVANCE CHARACTER POINTER
  1388. ASF6 SA1 A1+1 SCAN TILL END OF FIELD
  1389. SX3 X1-1R,
  1390. ZR X1,ASF3 IF END OF STATEMENT
  1391. ZR X3,ASF3 IF TERMINATOR
  1392. EQ ASF6 LOOP TILL TERMINATOR
  1393.  
  1394. TBC BSSZ 1 HOLDS TOTAL BIT COUNT FOR ONE TABLE CARD
  1395. TCLP VFD 60/TCL TABLE CONTENT LINE POINTER
  1396. LTB SPACE 4,20
  1397. ** LTB - LIST A TABLE ENTRY.
  1398. * J.C. BOHNHOFF - 70/7/4.
  1399. *
  1400. * ENTRY (TCL) = CONTENT LINE TO BE LISTED.
  1401. * (TCLP) = ADDRESS OF LIMIT OF *TCL*.
  1402. * (TBC) = TOTAL BIT COUNT FOR THIS TABLE ENTRY.
  1403. * (PBP) = 0 IF BIT POSITION HEADER LINES TO BE LISTED.
  1404. *
  1405. * EXIT TABLE ENTRY LISTED.
  1406. * (PBP) .NE. 0 IF ZERO ON ENTRY.
  1407. *
  1408. * USES A - 1, 3, 4, 5, 7.
  1409. * B - 6, 7.
  1410. * X - 0, 1, 2, 3, 4, 5, 7.
  1411. *
  1412. * CALLS LFL, LSL, MVE, STB, WTS.
  1413.  
  1414.  
  1415. LTB PS ENTRY/EXIT
  1416. SA4 LCT LINE COUNT
  1417. SX1 10 SET BLANKS AT BEGINNING OF LINE
  1418. MX7 0
  1419. SX2 BLN
  1420. BX0 X4 SAVE LINE COUNT
  1421. SX3 TPF
  1422. SA7 ATF CLEAR *ASTERS ONLY* FLAG
  1423. RJ =XMVE=
  1424. SA1 PBP *PRINT BIT POSITIONS* FLAG
  1425. SA5 TBC TOTAL BIT COUNT FOR THIS TABLE ENTRY
  1426. NG X1,LTBA IF SOME PART OF THE HEADER IS NOT TO BE
  1427. LISTED THIS TIME
  1428. ZR X1,LTBB IF FULL BIT POSITION HEADER TO BE LISTED
  1429. THIS BLOCK
  1430. LTBA MX7 60
  1431. BX7 X1-X7
  1432. ZR X7,LTB1 IF ALL HEADER IS OFF
  1433. SA7 ATF
  1434.  
  1435. LTBB MX7 60 TOGGLE THE FLAG
  1436. SA7 A1
  1437. SA3 LLM LINE LIMIT
  1438. NO
  1439. SX7 X0+5
  1440. IX3 X7-X3
  1441. NG X3,LTB0 IF IT WILL FIT
  1442. RJ STB SKIP TO BOTTOM OF PAGE
  1443. RJ LSL LIST LAST LINE ON PAGE
  1444. RJ LFL LIST FIRST LINE ON PAGE
  1445. SA1 LCT RESTORE REGISTERS
  1446. SA5 TBC
  1447. BX0 X1
  1448.  
  1449. LTB0 SA1 ATF
  1450. NZ X1,LTB0A IF ASTER LINE ONLY TO BE LISTED
  1451. LTBC SX2 BP1L
  1452. BX1 X5 SET WORD COUNT FOR MVE
  1453. IX2 X2-X5
  1454. SX3 TPL SET DESTINATION FOR MVE - (TABLE PRNT LINE)
  1455. RJ =XMVE= MOVE LINE INTO LIST BUFFER
  1456. SB7 X5+10 SET WORD COUNT FOR WRITE
  1457. SX2 SCR1 SET ADDRESS OF FET
  1458. SB6 TPF
  1459. RJ =XWTS= WRITE THE FIRST BIT POSITION HEADER LINE
  1460. SX0 X0+B1 BUMP LINE COUNT
  1461. SX2 BP2L SET UP FOR WRITE OF 2ND HEADER LINE
  1462. BX1 X5
  1463. SX3 TPL
  1464. IX2 X2-X5
  1465. RJ =XMVE= MOVE SECOND LINE INTO BUFFER
  1466. SX2 SCR1
  1467. SB6 TPF
  1468. SB7 X5+10
  1469. RJ =XWTS= WRITE SECOND BIT POSITION HEADER LINE
  1470. SX0 X0+1 BUMP LINE COUNT
  1471.  
  1472. LTB0A SX2 AST MOVE ASTERISK LINE
  1473. SX3 TPL-1
  1474. SX1 X5+1
  1475. RJ =XMVE=
  1476. WRITES SCR1,TPF,X5+10 WRITE ASTERISK LINE TO DEFINE TOP OF ENT
  1477. SX0 X0+B1 BUMP LINE COUNT
  1478. EQ LTB2
  1479.  
  1480. LTB1 SA3 LLM LINE LIMIT
  1481. SX7 X0+2 SEE IF ENTRY WILL FIT ON PAGE
  1482. NO
  1483. IX3 X7-X3
  1484. NG X3,LTB2 IF IT WILL FIT
  1485. RJ STB SKIP TO BOTTOM OF PAGE
  1486. RJ LSL LIST LAST LINE
  1487. RJ LFL LIST FIRST LINE
  1488. SA1 LCT RESTORE REGISTERS
  1489. SA5 TBC
  1490. BX0 X1
  1491. EQ LTBC WRITE NEW HEADER
  1492.  
  1493. LTB2 WRITES SCR1,TCF,X5+10 WRITE TABLE CONTENT LINE
  1494. SX0 X0+B1 BUMP LINE COUNT
  1495. SX1 X5+B1
  1496. SX2 AST MOVE ASTERISKS
  1497. SX3 TPL-1
  1498. RJ =XMVE=
  1499. WRITES SCR1,TPF,X5+10 WRITE ASTERISK LINE TO DEFINE BTTM OF EN
  1500. SX7 X0+1
  1501. SA7 LCT RESTORE BUMPED LINE COUNT
  1502. EQ LTB **RETURN
  1503.  
  1504. PBP BSSZ 1 PRINT BIT POSITIONS FLAG
  1505. ATF BSSZ 1 ASTERISK ONLY FLAG
  1506. STB SPACE 4,10
  1507. ** STB - SKIP TO BOTTOM OF PAGE.
  1508. * J.C. BOHNHOFF - 70/07/11.
  1509. *
  1510. * ENTRY (X0) = CURRENT LINE COUNT.
  1511. *
  1512. * EXIT FORM POSITIONED AT *LINP*.
  1513. *
  1514. * USES A - 2.
  1515. * X - 0, 2, 5, 6.
  1516.  
  1517.  
  1518. STB PS
  1519. BX0 -X0
  1520. SA2 LLM
  1521. NO
  1522. IX0 X0+X2
  1523. AX5 X0,B1 /2= NUMBER OF DOUBLE SPACES NEEDED
  1524. LX6 X5,B1
  1525. IX0 X0-X6 NUMBER OF SINGLE SPACES NEEDEAFTER DOUBLES
  1526.  
  1527. STB1 ZR X5,STB2 IF DONE DOUBLE SPACEING
  1528. WRITEC SCR1,(=2L0 )
  1529. SX5 X5-1
  1530. EQ STB1
  1531.  
  1532. STB2 ZR X0,STB **RETURN - IF AT BOTTOM
  1533. WRITEC SCR1,(=2L )
  1534. EQ STB
  1535. CVT SPACE 4,10
  1536. ** CVT - CONVERT NUMBER FROM OCTAL TO DECIMAL DISPLAY CODE.
  1537. *
  1538. * ENTRY (X1) = LOW 18 BITS OF NUMBER TO BE CONVERTED.
  1539. *
  1540. * EXIT (X7) = LEFT JUSTIFIED DISPLAY CODED NUMBER.
  1541. * (B7) = 6*NUMBER OF DIGITS IN CONVERTED NUMBER.
  1542. *
  1543. * USES A - 2, 3, 4.
  1544. * B - 0, 4, 5, 6, 7.
  1545. * X - 1, 2, 3, 4, 6, 7.
  1546.  
  1547.  
  1548. CVT1 DX7 X1*X2
  1549. FX1 X1*X2
  1550. LX4 54
  1551. SB4 X1
  1552. FX6 X3*X7 CALCULATE REMAINDER DIGIT
  1553. SB7 B7+B5
  1554. SX6 X6+B6
  1555. IX4 X6+X4
  1556. NZ B4,CVT1
  1557. BX7 X4 LEFT JUSTIFY NUMBER
  1558. LX7 54
  1559.  
  1560. CVT PS 0 ENTRY/EXIT
  1561. SA2 CVTA
  1562. SA3 A2+B1
  1563. SA4 A3+B1
  1564. PX1 X1
  1565. SB7 B0 SET DIGIT COUNT
  1566. SB5 6
  1567. SB6 -22B
  1568. EQ CVT1
  1569.  
  1570. CVTA DATA 0.1000000001P48
  1571. DATA 10.0P0
  1572. DATA 1H
  1573. ABT SPACE 4,10
  1574. ** ABT - TERMINATE ON PREMATURE EOR/EOF.
  1575. *
  1576. * USES A - 7.
  1577. * X - 7.
  1578.  
  1579.  
  1580. ABT SX7 B1 SET NUMBER OF COPIES TO 1
  1581. SA7 N
  1582. WRITEC SCR1,(=2L )
  1583. WRITEC SCR1,(=2L )
  1584. WRITEC SCR1,(=C* PREMATURE EOR/EOF ON SOURCE FILE.*)
  1585. EQ DOC3 EXIT
  1586. CPY SPACE 4,10
  1587. ** CPY - COPY SCRATCH FILE TO OUTPUT FILE.
  1588. *
  1589. * USES X - 1, 6.
  1590. * A - 1, 6.
  1591. * B - 7.
  1592. *
  1593. * MACROS READ, READW, RECALL, REWIND, WRITER, WRITEW.
  1594.  
  1595.  
  1596. CPY PS 0 ENTRY/EXIT
  1597. SA1 PD
  1598. ZR X1,CPY0 IF FORMAT EFFECTOR NOT TO BE WRITTEN
  1599. WRITEW I,PD,1 WRITE FORMAT EFFECTOR
  1600. BX6 X6-X6
  1601. SA6 PD
  1602. CPY0 SA1 NI CHECK FOR NO INPUT FILE
  1603. ZR X1,CPY3 IF NONE
  1604. CPY1 READW SCR1,DCD,100B
  1605. NZ X1,CPY2 IF EOR/EOF
  1606. WRITEW I,DCD,100B WRITE FROM WORKING BUFFER
  1607. EQ CPY1 COPY SOME MORE
  1608.  
  1609. CPY2 SB7 X1-DCD GET WORD COUNT OF LAST TRANSFER
  1610. WRITEW I,DCD,B7 TRANSFER LAST FEW WORDS
  1611. READ SCR1
  1612. CPY3 SA1 TC CHECK FOR TABLE OF CONTENTS
  1613. ZR X1,CPY6 IF NO TABLE OF CONTENTS
  1614. REWIND SCR2,R
  1615. READ SCR2
  1616. CPY4 READW SCR2,DCD,100B
  1617. NZ X1,CPY5 IF EOR/EOF
  1618. WRITEW I,DCD,100B WRITE FROM WORKING BUFFER
  1619. EQ CPY4 COPY SOME MORE
  1620.  
  1621. CPY5 SB7 X1-DCD GET WORD COUNT OF LAST TRANSFER
  1622. WRITEW I,DCD,B7 TRANSFER LAST FEW WORDS
  1623. RECALL SCR2
  1624. CPY6 READW SCR1,DCD,100B
  1625. NZ X1,CPY7 IF EOR/EOF
  1626. WRITEW I,DCD,100B WRITE FROM WORKING BUFFER
  1627. EQ CPY6 COPY SOME MORE
  1628.  
  1629. CPY7 SB7 X1-DCD GET WORD COUNT OF LAST TRANSFER
  1630. WRITEW I,DCD,B7 TRANSFER LAST FEW WORDS
  1631. WRITER I,R
  1632. RECALL SCR1
  1633. EQ CPY EXIT
  1634. EDC SPACE 4,10
  1635. ** EDC - *END* CARD PROCESSOR.
  1636. *
  1637. * ENTRY (A0) - EXIT ADDRESS.
  1638. *
  1639. * USES A - 2, 4, 5, 6, 7.
  1640. * B - 2.
  1641. * X - 2, 4, 5, 6, 7.
  1642. *
  1643. * CALLS LSL.
  1644.  
  1645.  
  1646. EDC SA2 FLF CHECK TO SEE IF ANYTHING HAS BEEN LISTED
  1647. ZR X2,EDC3 IF NOT
  1648. SA5 LCT
  1649. SA4 LLM LINE LIMIT
  1650. IX5 X5-X4
  1651. BX6 X5
  1652. LX6 59-0 CHECK EVEN OR ODD
  1653. ZR X5,EDC2 IF AT BOTTOM OF PAGE
  1654. NG X6,EDC1 IF EVEN
  1655. WRITEC SCR1,(=2L )
  1656. SX5 X5+B1
  1657. EDC1 ZR X5,EDC2 IF AT BOTTOM OF PAGE
  1658. WRITEC SCR1,(=2L0 )
  1659. SX5 X5+2
  1660. EQ EDC1 LOOP TO BOTTOM OF PAGE
  1661.  
  1662. EDC2 RJ LSL LIST LAST LINE
  1663. EDC3 MX7 0
  1664. SA7 FLF CLEAR FIRST LINE FLAG
  1665. SA7 LSCA CLEAR LIST CARD STACK
  1666. SA7 FCR RESET FIRST CHARACTER TO SCAN FROM
  1667. SA7 XFL CLEAR LIST *X* FLAG
  1668. SA7 TOG CLEAR TOGGLE
  1669. SA5 EDAS RESET ASTERISK COUNT FOR DOC TYPE
  1670. SA4 IDAS
  1671. BX6 X5
  1672. LX7 X4
  1673. SA6 MAS
  1674. SA7 NAS
  1675. SB2 A0
  1676. JP B2 EXIT
  1677. COL SPACE 4,10
  1678. ** COL - PROCESS *COL* CARDS.
  1679. *
  1680. * USES X - 2, 3, 4, 5, 6.
  1681. * A - 2, 6.
  1682. * B - 5, 7.
  1683. *
  1684. * CALLS DXB.
  1685.  
  1686. COL BSS 0 ENTRY
  1687. COL1 SA2 B5 FIND COLUMN NUMBER
  1688. SX3 X2-1R CHECK FOR SPACE
  1689. SB5 B5+B1
  1690. ZR X2,CMP1 IF END OF LINE
  1691. ZR X3,COL1 IF A SPACE
  1692. SB7 54 SET SHIFT COUNT
  1693. SX5 B0+ INITIALIZE ASSEMBLY AREA
  1694. COL2 LX2 B7 SHIFT CHARACTER
  1695. SB7 B7-6 ADJUST SHIFT COUNT
  1696. BX5 X5+X2 ADD TO ASSEMBLED DATA
  1697. SA2 B5 NEXT CHARACTER
  1698. SB5 B5+B1
  1699. ZR X2,COL3 IF END OF CARD
  1700. SX3 X2-1R
  1701. NZ X3,COL2 IF NOT SPACE
  1702. COL3 RJ DXB CONVERT COLUMN NUMBER
  1703. NZ X4,CMP1 IF NOT NUMERIC
  1704. SA6 CCM RESET COMMENT COLUMN
  1705. EQ CMP1 EXIT
  1706. CTX SPACE 4,10
  1707. ** CTX - PROCESS *CTEXT* CARDS.
  1708. *
  1709. * USES A - 1, 7.
  1710. * X - 1, 7.
  1711.  
  1712.  
  1713. CTX SA1 XFL CHECK LIST *X* FLAG
  1714. NZ X1,CMP1 EXIT IF ON
  1715. SX7 20 RESET LIST LIMITS
  1716. SA7 MAS
  1717. SA7 NAS
  1718. EQ CMP1 EXIT
  1719. EDX SPACE 4,10
  1720. ** EDX - PROCESS *ENDX* CARDS.
  1721. *
  1722. * USES A - 1, 4, 5, 6, 7.
  1723. * X - 1, 4, 5, 6, 7.
  1724.  
  1725.  
  1726. EDX SA1 XFL CHECK LIST *X* FLAG
  1727. NZ X1,CMP1 EXIT IF ON
  1728. SA4 EDAS RESTORE LIMITS ON ASTERISK COUNTS
  1729. SA5 IDAS
  1730. BX6 X4
  1731. LX7 X5
  1732. SA6 MAS
  1733. SA7 NAS
  1734. EQ CMP1 EXIT
  1735. BKD SPACE 4,10
  1736. ** BKD - PROCESS BLOCK DATA SUBPROGRAMS.
  1737. *
  1738. * ENTRY (B5) = ADDRESS OF NEXT CHARACTER IN STRING BUFFER.
  1739. *
  1740. * EXIT TO *CMP1* IF *COMPASS* PROGRAM.
  1741. *
  1742. * A - 1, 2, 3, 4, 6.
  1743. * B - 6, 7.
  1744. * X - 0, 1, 2, 3, 4, 6, 7.
  1745. *
  1746. * CALLS CVT.
  1747.  
  1748.  
  1749. BKD BSS 0 ENTRY
  1750. SA4 PTYP
  1751. ZR X4,CMP1 IF *COMPASS* PROGRAM
  1752. SB6 B5 SAVE ADDRESS OF NEXT CHARACTER
  1753. SX2 1R
  1754. BKD1 SA3 B6 CHECK FOR PRESENCE OF NAME
  1755. SB6 B6+B1
  1756. IX6 X3-X2
  1757. ZR X3,BKD2 IF NO NAME FOUND
  1758. ZR X6,BKD1 SKIP BLANKS
  1759. EQ FTN GO PROCESS AS FORTRAN
  1760.  
  1761. BKD2 SA1 BKDA BLOCK COUNT
  1762. SX6 X1+B1
  1763. SA6 A1
  1764. RJ CVT CONVERT BLOCK COUNT
  1765. MX0 42
  1766. SA2 BKDB
  1767. LX7 X7,B7
  1768. BX6 X0*X2
  1769. BX7 -X0*X7 GET NUMBER
  1770. BX7 X6+X7
  1771. MX0 60-6
  1772. SB7 10
  1773. SB6 B5
  1774.  
  1775. BKD3 LX7 6 DECODE NAME
  1776. SB7 B7-B1
  1777. BX6 -X0*X7 GET CHARACTER
  1778. SA6 B6
  1779. SB6 B6+B1
  1780. NZ B7,BKD3 LOOP FOR 10 CHARACTERS
  1781. EQ FTN GO PROCESS AS FORTRAN
  1782.  
  1783. BKDA DATA 1 BLOCK DATA SUBROUTINE COUNT
  1784. BKDB VFD 42/0HNUMBER-,18/
  1785. LSC SPACE 4,10
  1786. ** LSC - PROCESS *LIST* CARD.
  1787. *
  1788. * ENTRY (B5) = ADDRESS OF NEXT CHARACTER IN STRING BUFFER.
  1789. *
  1790. * USES A - 2, 4, 5, 6, 7.
  1791. * B - 7.
  1792. * X - 2, 3, 4, 5, 6, 7.
  1793.  
  1794.  
  1795. LSC SB7 B1 SET .NOT. *-* FLAG
  1796. SA2 B5 READ NEXT CHARACTER
  1797. SX3 1R
  1798. LSC1 ZR X2,CMP1 EXIT IF NO LIST PARAMETERS LEFT
  1799. IX6 X2-X3
  1800. BX4 X2
  1801. SA2 A2+B1 READ NEXT CHARACTER
  1802. ZR X6,LSC1 SKIP BLANKS
  1803. SA5 A2+B1 READ FOLLOWING CHARACTER
  1804. SB7 X4-1R- CHECK FOR *-*
  1805. ZR B7,LSC2 IF PRESENT
  1806. SA5 A2
  1807. SX2 X4
  1808. LSC2 SX6 X2-1RL *L*
  1809. SX7 X2-1RX *X*
  1810. SX2 X2-1R* ***
  1811. ZR X6,LSC4
  1812. ZR X7,LSC6
  1813. ZR X2,LSC9
  1814. EQ LSC8 PUSH LIST OPTION ONTO STACK
  1815. LSC3 IX2 X5-X3 CHECK FOR END
  1816. ZR X2,CMP1 IF END OF CARD
  1817. SA2 A5+B1
  1818. EQ LSC1 CONTINUE SEARCH
  1819.  
  1820. LSC4 NZ B7,LSC5 PROCESS *L*
  1821. SX7 20 PROCESS *-L*
  1822. SA7 MAS RESET LIST LIMITS
  1823. SA7 NAS
  1824. EQ LSC8 TRY AGAIN
  1825.  
  1826. LSC5 SA4 EDAS RESET LIST LIMITS FOR *L* CARD
  1827. SA2 IDAS
  1828. BX6 X4
  1829. LX7 X2
  1830. SA6 MAS
  1831. SA7 NAS
  1832. EQ LSC8 TRY AGAIN
  1833.  
  1834. LSC6 NZ B7,LSC7 PROCESS *X*
  1835. SA7 XFL CLEAR LIST X FLAG
  1836. EQ LSC8 TRY AGAIN
  1837. LSC7 SX6 1RX
  1838. SA6 XFL SET LIST X FLAG
  1839. LSC8 SA2 MAS
  1840. SA4 NAS
  1841. LX2 40
  1842. LX4 20
  1843. BX7 X2+X4
  1844. SA4 XFL
  1845. BX7 X7+X4
  1846. SA2 LSCA LIST OPTIONS TABLE
  1847. SX6 X2+B1
  1848. SA6 A2
  1849. SX4 X6-LSCBL
  1850. PL X4,LSC10 IF LIST CARD LIMIT REACHED
  1851. SA7 LSCB+X6
  1852. EQ LSC3 TRY AGAIN
  1853.  
  1854. LSC9 SA2 LSCA
  1855. SX6 X2-1
  1856. NG X6,LSC3 IF NO STACK
  1857. SA6 A2+
  1858. SX4 X6-LSCBL
  1859. PL X4,LSC3 IF STILL ABOVE LIMIT
  1860. SA4 LSCB+X6
  1861. MX2 20
  1862. BX6 X2*X4 GET MAS
  1863. BX7 -X2*X4 GET NAS
  1864. LX6 20
  1865. LX7 40
  1866. SX7 X7
  1867. SA7 NAS
  1868. SA6 MAS
  1869. SX7 X4
  1870. SA7 XFL
  1871. EQ LSC3
  1872.  
  1873. LSC10 MESSAGE (=C* LIST CARD LIMIT - CARD IGNORED.*)
  1874. EQ LSC3
  1875.  
  1876.  
  1877. LSCA CON 0
  1878. LSCB CON 0
  1879. BSSZ NLCA
  1880. LSCBL EQU *-LSCB
  1881. TIT SPACE 4,10
  1882. ** TIT - PROCESS TITLE CARD.
  1883. *
  1884. * ENTRY (B5) = ADDRESS OF NEXT CHARACTER IN STRING BUFFER.
  1885. *
  1886. * USES A - 1, 2, 7.
  1887. * B - 5, 6, 7.
  1888. * X - 1, 2, 3, 6, 7.
  1889.  
  1890.  
  1891. TIT MX7 0 CLEAR TITLE FROM SPECIAL CARD LIST
  1892. SA7 CMPC
  1893. SA2 B5 READ NEXT CHARACTER
  1894. SA1 =5L
  1895. SX3 1R
  1896. TIT1 IX6 X2-X3 CHECK FOR BLANK
  1897. ZR X2,CMP1 EXIT IF NO TITLE
  1898. SA2 A2+B1 READ NEXT CHARACTER
  1899. ZR X6,TIT1 SKIP BLANKS
  1900. SX1 2R1
  1901. SB7 8
  1902. SB6 5 SET WORD COUNT
  1903. BX7 X1
  1904. SA2 A2-B1 READ LAST CHARACTER
  1905. SB5 B0
  1906. EQ TIT3
  1907.  
  1908. TIT2 SB7 10
  1909. SA7 B5+HDG STORE WORD
  1910. SB6 B6-B1 DECREMENT LOOP COUNT
  1911. SB5 B5+B1
  1912. MX7 0
  1913. ZR B6,CMP1 IF DONE
  1914. TIT3 LX7 6 ENCODE 10 CHARACTERS
  1915. SB7 B7-B1 DECREMENT CHARACTER COUNT
  1916. BX7 X7+X2
  1917. SA2 A2+B1 READ NEXT CHARACTER
  1918. NZ B7,TIT3 LOOP FOR 10 CHARACTERS
  1919. EQ TIT2 GET NEXT WORD
  1920. TITLE COMMON DECKS.
  1921. ** COMMON DECKS.
  1922.  
  1923. *CALL COMCSFN
  1924. *CALL COMCMVE
  1925. *CALL COMCWTO
  1926. *CALL COMCDXB
  1927. *CALL COMCRDC
  1928. *CALL COMCRDO
  1929. *CALL COMCRDH
  1930. *CALL COMCRDS
  1931. *CALL COMCRDW
  1932. *CALL COMCWTC
  1933. *CALL COMCWTS
  1934. *CALL COMCWTW
  1935. *CALL COMCCIO
  1936. *CALL COMCSYS
  1937. TITLE DECODING AREA.
  1938. USE DECODE DECODE AREA
  1939.  
  1940. TCF BSS 0 TABLE CONTENT LINE
  1941. DUP 9,1
  1942. DATA 1R
  1943. DATA 1R/
  1944.  
  1945. TCL BSSZ 73
  1946.  
  1947. BLN BSS 0 SOME BLANKS
  1948. DUP 11,1
  1949. DATA 1R
  1950.  
  1951. AST BSS 0 BUNCH OF ASTERISKS
  1952. DUP 72
  1953. DATA 1R-
  1954. ENDD
  1955.  
  1956. BP1 BSS 0 BIT POSITION TEMPLATE FOR LINE 1
  1957. NUM SET 59
  1958. DUP 1000
  1959. TEN SET NUM/10
  1960. DUP 9,1
  1961. CON 1R
  1962. IFNE TEN,0,2
  1963. CON TEN+1R0
  1964. ELSE 1
  1965. CON 1R
  1966. NUM SET NUM-10
  1967. IFLT NUM,0,1
  1968. STOPDUP
  1969. ENDD
  1970.  
  1971. BP1L BSS 0 DEFINE END OF TEMPLATE
  1972.  
  1973. BP2 BSS 0 BIT POSITION TEMPLATE FOR LINE 2
  1974.  
  1975. NUM SET 9
  1976. DUP 60
  1977. VFD 60/NUM+1R0
  1978. NUM SET NUM-1
  1979. IFLT NUM,0,1
  1980. NUM SET 9
  1981. ENDD
  1982.  
  1983. BP2L BSS 0 DEFINE END OF TEMPLATE
  1984.  
  1985.  
  1986. * ARGUMENT LIST.
  1987.  
  1988. ARGA BSS 0
  1989. I ARG ARGB+5,INPUT
  1990. S ARG ARGB,S
  1991. L ARG O,O
  1992. N ARG N,N
  1993. T ARG ARGB+1,T
  1994. C ARG ARGB+2,C
  1995. P ARG ARGB+3,P
  1996. NR ARG ARGB+4,NR
  1997. NT ARG ARGB+4,NT
  1998. TC ARG ARGB+4,TC
  1999. CON 0 END OF TABLE
  2000.  
  2001. * ASSUMED PARAMETER VALUES.
  2002.  
  2003. ARGB CON 0LSOURCE+3
  2004. CON 0LINT
  2005. CON 0L03B
  2006. BSS 1
  2007. CON 0LOFF
  2008. CON 0LINPUT
  2009.  
  2010. LNE DATA 1R ENCODE AREA FOR PRINT LINE
  2011. DATA 1R
  2012.  
  2013. DCD BSS 0 DECODE AREA FOR CARD IMAGE
  2014.  
  2015. TPF EQU LNE
  2016. TPL EQU LNE+10
  2017.  
  2018. ARG SPACE 4,3
  2019. ** ARG - PROCESS ARGUMENTS.
  2020.  
  2021.  
  2022. *CALL COMCARG
  2023. CKO SPACE 4,10
  2024. ** CKO - CHECK OPTIONS SELECTED.
  2025. *
  2026. * USES A - 1, 2, 3, 5, 6, 7.
  2027. * B - 2, 6, 7.
  2028. * X - 1, 2, 3, 5, 6, 7.
  2029. *
  2030. * CALLS DXB.
  2031.  
  2032.  
  2033. CKO PS 0 ENTRY/EXIT
  2034. SA1 S CHECK SOURCE FILE NAME
  2035. ZR X1,NOF IF NO SOURCE FILE
  2036. SA1 O CHECK OUTPUT FILE NAME
  2037. ZR X1,NOF NO OUTPUT FILE
  2038. SA5 N
  2039. SB7 N SET DECIMAL BASE
  2040. RJ DXB CONVERT NUMBER
  2041. NZ X4,DOC7 IF ILLEGAL
  2042. SA6 N
  2043. ZR X6,NOF IF NO COPIES REQUESTED
  2044. SA5 C
  2045. SB7 0 SET OCTAL BASE
  2046. RJ DXB
  2047. NZ X4,DOC7 IF ILLEGAL
  2048. SX7 X6-64
  2049. ZR X6,DOC7 IF NO CHARACTER
  2050. PL X7,DOC7 IF NOT VALID CHARACTER
  2051. SA6 C SET CHECK CHARACTER
  2052. SA5 P
  2053. SB7 P SET DECIMAL BASE
  2054. RJ DXB
  2055. NZ X4,DOC7 IF PAGE SIZE IS ILLEGAL
  2056. SX7 X6-MPGS
  2057. NG X7,DOC7 IF .LT. MINIMUM PAGE SIZE
  2058. SA6 LLM SET PAGE SIZE
  2059. SA1 T DOCUMENTATION TYPE
  2060. LX1 18
  2061. SX6 3REXT
  2062. BX5 X1-X6
  2063. SX7 3RINT
  2064. BX6 X1-X7
  2065. ZR X5,CKO1 IF EXTERNAL
  2066. NZ X6,DOC7 IF ILLEGAL
  2067. SX6 4
  2068. SA6 IDAS
  2069. SX7 2 SET INTERNAL FLAGS
  2070. SA6 NAS
  2071. SA7 MAS
  2072. SA7 EDAS
  2073. SA2 =10H INTERNAL
  2074. BX6 X2
  2075. SA6 RIFD CHANGE TITLE PAGE
  2076. SA6 HDG2 CHANGE HEADER LINE
  2077.  
  2078. * SPLIT FL FOR BUFFERS.
  2079.  
  2080. CKO1 SX6 A0 SET AVAILABLE FL
  2081. SB6 BUF
  2082. SA6 I+4 SET LIMIT ON INPUT BUFFER
  2083. SX7 A0-B6 GET REMAINDER OF CORE
  2084. AX7 1 DIVIDE BY 2
  2085. SX7 X7+B6
  2086. SA7 SCR1+4 SET LIMIT ON SCRATCH FILE
  2087. SA7 I+1 SET FIRST ON INPUT FILE
  2088. SA7 A7+B1 IN
  2089. SA7 A7+B1 OUT
  2090. SA1 MAS SET LIST OPTION STACK
  2091. SA2 NAS
  2092. SA3 XFL
  2093. LX1 40
  2094. LX2 20
  2095. BX6 X1+X2
  2096. BX6 X6+X3
  2097. SA6 LSCB
  2098. EQ CKO EXIT
  2099.  
  2100. * PROCESS NO OUTPUT ERRORS.
  2101.  
  2102. NOF MESSAGE (=C* NO I/O REQUESTED.*)
  2103. ENDRUN
  2104.  
  2105. SIZ EQU *-DCD SIZE OF SET-UP AREA
  2106.  
  2107. IFLE SIZ,NCR,1
  2108. BSSZ NCR-SIZ+1 ZERO OUT REMAINDER OF DECODE AREA
  2109. USE *
  2110. CTF SPACE 4,15
  2111. ** CTF - CHECK TERMINAL OUTPUT FILE.
  2112. *
  2113. * ENTRY (O) = PRINT FILE NAME.
  2114. *
  2115. * EXIT (PD) = 0 IF PRINT FILE IS A TERMINAL FILE.
  2116. *
  2117. * USES X - 1, 2, 6.
  2118. * A - 1, 6.
  2119. *
  2120. * CALLS STF.
  2121.  
  2122.  
  2123. CTF SUBR ENTRY/EXIT
  2124. SA1 O GET CURRENT FILE NAME
  2125. BX6 X1
  2126. SA6 CTFA USE LOCAL FET FOR *STF*
  2127. SX2 A6
  2128. RJ STF
  2129. NZ X6,CTFX IF NOT A TERMINAL FILE
  2130. SA6 PD
  2131. EQ CTFX EXIT
  2132.  
  2133.  
  2134. CTFA FILEB CTFA,4,(FET=6)
  2135. CTP SPACE 4,15
  2136. ** CTP - CALCULATE TITLE PAGE.
  2137. *
  2138. * ENTRY (LLM) = PAGE SIZE.
  2139. *
  2140. * EXIT (HDSL1,HDSL2) = BLANK LINES COUNT FOR TITLE PAGE.
  2141. *
  2142. * USES X - 1, 2, 3, 6, 7.
  2143. * A - 1, 6, 7.
  2144. * B - 6, 7.
  2145.  
  2146.  
  2147. CTP SUBR ENTRY/EXIT
  2148. SA1 LLM GET PAGE SIZE
  2149. SB6 B1+B1
  2150. SX6 X1+7
  2151. SA6 LCT FORCE NEW TITLE
  2152. AX6 B6,X1 DIVIDE SIZE BY 4 FOR BOTTOM LINE COUNT
  2153. IX3 X1-X6
  2154. SX2 3
  2155. IX7 X1/X2
  2156. SX7 X7-3
  2157. SA7 HDSL1 BLANK LINE COUNT FROM TOP TO TITLE
  2158. IX6 X3-X7
  2159. SX6 X6-1-7
  2160. SA6 HDSL2 BLANK LINE COUNT AFTER TITLE
  2161. EQ CTPX EXIT
  2162. BUFFERS SPACE 4
  2163. USE BUFFERS
  2164.  
  2165. * SCRATCH (TABLE OF CONTENTS) BUFFER.
  2166.  
  2167. BSSZ 1
  2168. SBUF BSS SBUFL SCRATCH BUFFER
  2169.  
  2170. BUF BSS 0 RESERVE SCRATCH BUFFER
  2171. IPP SPACE 4,15
  2172. ** IPP - INITIALIZE PAGE PARAMETERS.
  2173. *
  2174. * EXIT JOB DEFAULT PAGE PARAMETERS INITIALIZED.
  2175. *
  2176. * USES X - 0, 1, 6.
  2177. * A - 1, 6.
  2178. * B - 2.
  2179. *
  2180. * CALLS CDD.
  2181. *
  2182. * MACROS GETPP.
  2183.  
  2184.  
  2185. IPP SUBR ENTRY/EXIT
  2186. GETPP IPPA,LLM,PD
  2187. SA1 LLM GET JOB PAGE SIZE
  2188. RJ CDD CONVERT TO DECIMAL DISPLAY
  2189. MX0 1
  2190. SB2 B2-B1
  2191. AX0 B2
  2192. BX6 X0*X4 REMOVE BLANKS
  2193. SA6 P STORE DEFAULT JOB PAGE SIZE
  2194. SA1 IPPA+1 GET DEFAULT SYSTEM PAGE SIZE
  2195. MX0 -8
  2196. AX1 12+8
  2197. BX1 -X0*X1
  2198. RJ CDD
  2199. MX0 1
  2200. SB2 B2-B1
  2201. AX0 B2
  2202. BX6 X0*X4
  2203. SA6 ARGB+3 STORE ALTERNATE DEFAULT
  2204. EQ IPPX RETURN
  2205.  
  2206.  
  2207. IPPA BSS 2 *GETPP* RESPONSE BLOCK
  2208. RIF SPACE 4,10
  2209. ** RIF - READ INPUT FILE.
  2210. *
  2211. * USES A - 1, 2, 3, 4, 5, 6, 7.
  2212. * X - ALL.
  2213.  
  2214.  
  2215. RIF PS 0 ENTRY/EXIT
  2216. DATE HDG1
  2217. SA2 I
  2218. ZR X2,RIF IF NO INPUT FILE
  2219. SX7 B1 SET COMPLETE BIT
  2220. BX7 X2+X7
  2221. SA7 A2
  2222. READ I,R
  2223. SA1 X2+2
  2224. SA3 A1+B1
  2225. IX4 X1-X3
  2226. ZR X4,RIF1 IF NO DATA
  2227. READH X2,FOT,7 READ INPUT CARD
  2228. SA3 FOT
  2229. SA2 =1L
  2230. MX0 6
  2231. BX7 -X0*X3
  2232. BX7 X2+X7
  2233. SA7 A3
  2234. EQ RIF1
  2235.  
  2236. RIFA DATA 2L1 TITLE PAGE
  2237. RIFAL EQU *-RIFA
  2238.  
  2239. * INSERT (HDSL1) BLANK LINES
  2240.  
  2241. RIFB DATA 1H
  2242. RIFC DATA 48L
  2243.  
  2244. DATA 2L
  2245. DATA 1H
  2246. DATA 1H
  2247. RIFD DATA C* EXTERNAL DOCUMENTATION*
  2248. RIFBL EQU *-RIFB
  2249.  
  2250. * INSERT (HDSL2) BLANK LINES
  2251.  
  2252. RIFS DATA 1H
  2253. DATA H*PUBLICATION NUMBER*
  2254. RIFE DATA 1H
  2255. DATA 0 END OF LINE
  2256.  
  2257. DATA 2L
  2258. DATA 1H
  2259. DATA H*REVISION LEVEL ...*
  2260. RIFF DATA 5L
  2261.  
  2262. DATA 2L
  2263. DATA 1H
  2264. DATA H*REVISION DATE ....*
  2265. RIFG DATA 1H
  2266. DATA 0 END OF LINE
  2267.  
  2268. RIFSL EQU *-RIFS LENGTH IN WORDS OF BOTTOM PORTION
  2269.  
  2270.  
  2271. RIF1 SA1 FOT MOVE PAGE FOOT INFORMATION TO TITLE PAGE
  2272. SA2 A1+B1
  2273. MX0 30 MASK TO SPLIT PUB NUMBER
  2274. SA3 A2+B1
  2275. SA4 A3+B1
  2276. SA5 A4+B1
  2277. BX6 X1
  2278. LX7 X2
  2279. SA6 RIFC STORE FIRST WORD OF PACKAGE NAME
  2280. SA7 A6+B1 STORE SECOND WORD
  2281. BX6 X3
  2282. LX7 X4
  2283. SA6 A7+B1 STORE THIRD WORD
  2284. SA7 A6+B1 STORE FOURTH WORD
  2285. BX6 X0*X5 GET LAST FIVE CHARACTERS OF PACKAGE NAME
  2286. BX7 -X0*X5 GET FIRST FIVE CHARACTERS OF PUB NUMBER
  2287. SA6 A7+B1 STORE FIFTH WORD
  2288. LX7 30 SHIFT FIRST 5 CHARS HIGH
  2289. SA1 A5+B1 READ END OF PUB NO. AND REV. LEVEL
  2290. LX1 30
  2291. SA2 A1+B1 GET REVISION DATE
  2292. BX6 -X0*X1 GET LAST 5 CHARS OF PUB NUMBER
  2293. BX7 X6+X7
  2294. BX6 X0*X1 GET REVISION LEVEL ALONE
  2295. SA7 RIFE STORE PUBLICATION NUMBER
  2296. SA6 RIFF STORE REVISION LEVEL
  2297. SA3 RIF MOVE EXIT BEFORE IT IS DESTROYED
  2298. BX7 X2
  2299. LX6 X3
  2300. SA7 RIFG STORE REVISION DATE
  2301. SA7 NI SET INPUT FOUND FLAG
  2302. SA6 RIF4
  2303. SA1 PCT BUMP PAGE COUNT FOR PAGE PARITY
  2304. SX6 X1+B1
  2305. SA6 A1
  2306.  
  2307. WRITEW SCR1,RIFA,RIFAL WRITE PAGE EJECT
  2308.  
  2309. SA5 HDSL1 GET COUNT OF BLANK LINES
  2310. RIF2 WRITEC SCR1,(=2L )
  2311. SX5 X5-1
  2312. NZ X5,RIF2 IF MORE BLANK LINES TO WRITE
  2313.  
  2314. WRITEW SCR1,RIFB,RIFBL WRITE TITLE
  2315.  
  2316. SA5 HDSL2 GET COUNT OF BLANK LINES
  2317. RIF3 WRITEC SCR1,(=2L )
  2318. SX5 X5-1
  2319. NZ X5,RIF3 IF MORE BLANK LINES TO WRITE
  2320.  
  2321. WRITEW SCR1,RIFS,RIFSL WRITE BOTTOM OF PAGE
  2322. WRITER SCR1,R
  2323. RIF4 EQ RIF EXIT
  2324.  
  2325.  
  2326. *CALL COMCCPM
  2327. *CALL COMCCDD
  2328. *CALL COMCSTF
  2329.  
  2330.  
  2331. MFL= EQU 200000B+BUF+2*BFSZ+10B
  2332.  
  2333. USE *
  2334. END SPACE 4
  2335. END
cdc/nos2.source/opl871/docment.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator