User Tools

Site Tools


cdc:nos2.source:opl871:list80

LIST80

Table Of Contents

  • [00010] LIST80 - COMPRESS COMPASS LISTINGS.
  • [00012] COMPRESS COMPASS LISTINGS.
  • [00058] STORAGE ASSIGNMENT.
  • [00110] SUBROUTINES.
  • [00112] CKS - CHECK SUBTITLE.
  • [00152] ERD - LIST ERROR DIRECTORY.
  • [00184] LSL - LIST LINE.
  • [00287] PEJ - PROCESS EJECT.
  • [00316] REF - LIST CROSS REFERENCE TABLE.
  • [00347] SRN - SET RECORD NAME.
  • [00382] STA - LIST STORAGE ALLOCATION.
  • [00423] ARG - PROCESS ARGUMENTS.
  • [00508] IPP - INITIALIZE PAGE PARAMETERS.

Source Code

LIST80.txt
  1. IDENT LIST80,FETS
  2. ABS
  3. SYSCOM B1 DEFINE (B1) = 1
  4. SPACE 4,10
  5. *COMMENT LIST80 - COMPRESS COMPASS LISTINGS.
  6. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  7. SPACE 4,10
  8. ENTRY LIST80
  9. ENTRY RFL=
  10. TITLE LIST80 - COMPRESS COMPASS LISTINGS.
  11. TITLE
  12. *** LIST80 - COMPRESS COMPASS LISTINGS.
  13. * G. R. MANSFIELD.
  14. * D. R. HILGREN. 79/04/25. RESEQUENCED.
  15. SPACE 4,10
  16. *** *LIST80* READS A FILE CONTAINING LIST OUTPUT
  17. * PRODUCED BY THE COMPASS COMPILER AND COMPRESSES IT TO 80
  18. * COLUMNS.
  19. SPACE 4,10
  20. *** CONTROL CARD CALL.
  21. *
  22. * LIST80(IFILE,OFILE,NR)
  23. * IFILE FILE TO COPY FROM.
  24. * OFILE FILE TO COPY TO.
  25. * NR IF PRESENT, *IFILE* WILL NOT BE REWOUND.
  26. *
  27. * ASSUMED PARAMETERS.
  28. * IFILE = *LIST*
  29. * OFILE = *OUTPUT*
  30. *
  31. * PAGE SIZE AND PRINT DENSITY WILL BE BASED
  32. * ON THE PRINT FILE TO BE PROCESSED.
  33. *
  34. SPACE 4,10
  35. *** DAYFILE MESSAGES.
  36. *
  37. * * CONVERSION COMPLETE.* - *LIST80* COMPLETED.
  38. *
  39. * * FILE NAME CONFLICT.* - *IFILE* AND *OFILE* HAVE THE SAME
  40. * NAME.
  41. *
  42. * * FL TOO SHORT FOR LIST.* - NOT ENOUGH STORAGE FOR LIST.
  43. SPACE 4,10
  44. **** ASSEMBLY CONSTANTS.
  45.  
  46.  
  47. IBUFL EQU 2001B
  48. OBUFL EQU 2001B
  49.  
  50. ****
  51. SPACE 4,10
  52. * COMMON DECKS.
  53.  
  54.  
  55. *CALL COMCMAC
  56. *CALL COMCCMD
  57. ****
  58. TITLE STORAGE ASSIGNMENT.
  59. * STORAGE ASSIGNMENT.
  60.  
  61.  
  62. ORG 110B
  63. FETS BSS 0
  64.  
  65. I BSS 0 *IFILE*
  66. LIST FILEC IBUF,IBUFL
  67.  
  68. O BSS 0 *OFILE*
  69. OUTPUT FILEC OBUF,OBUFL,(FET=6)
  70.  
  71. MBUF BSS 136 WORKING READ BUFFER
  72. MBUFL EQU *-MBUF
  73.  
  74. SBUF BSS 80 WORKING WRITE BUFFER
  75. SBUFL EQU *-SBUF
  76. BSS 10
  77. SPACE 4,10
  78. * PROGRAM CONSTANTS.
  79.  
  80. PD CON 1LS,0 PRINT DENSITY / CONTROL WORD
  81. PL CON 0 PAGE LENGTH
  82.  
  83. BLANKS BSS 0 BLANKS
  84. DUP 10,1
  85. CON 1R
  86. LIST80 TITLE LIST80 - MAIN PROGRAM.
  87.  
  88.  
  89. LIST80 SB1 1 ENTRY
  90. RJ ARG PROCESS ARGUMENTS
  91. LST1 READ I
  92. SX6 LSL SET LINE LIST
  93. SA0 SRN SET INITIAL LIST DISABLE
  94. SA6 CKSAE+1
  95. EQ LST3 READ FIRST LINE OF *IFILE*
  96.  
  97. LST2 WRITES O,SBUF,SBUFL
  98. LST3 READS I,MBUF,MBUFL
  99. NG X1,LST4 IF EOF
  100. NZ X1,LST1 IF EOR
  101. SA1 MBUF
  102. SX6 X1-1R1
  103. ZR X6,PEJ IF PAGE EJECT
  104. SB2 A0
  105. JP B2 PROCESS LINE
  106.  
  107. LST4 WRITER O
  108. MESSAGE (=C* CONVERSION COMPLETE.*),3
  109. ENDRUN
  110. TITLE SUBROUTINES.
  111. CKS SPACE 4,10
  112. ** CKS - CHECK SUBTITLE.
  113. *
  114. * EXIT TO *LST2*.
  115. *
  116. * USES A - 0, 1, 2, 6.
  117. * X - 1, 2, 4, 6, 7.
  118. * B - 2.
  119. *
  120. * MACROS MOVE.
  121.  
  122.  
  123. CKS SA1 MBUF+8 ASSEMBLE 10 CHARACTERS
  124. MX4 1
  125. BX6 X6-X6
  126. CKS1 LX6 6
  127. BX6 X1+X6
  128. LX4 6
  129. SA1 A1+B1
  130. PL X4,CKS1 IF NOT END OF WORD
  131. SA6 CKSAE
  132. SA2 CKSA
  133. SB2 B1+B1
  134. CKS2 BX7 X6-X2
  135. SA1 A2+B1
  136. SA2 A2+B2
  137. SA0 X1
  138. NZ X7,CKS2 IF NOT SUBTITLE
  139. SX6 1R
  140. SA6 SBUF
  141. SA6 A6+B1
  142. MOVE 46,MBUF+8,A6+B1 MOVE SUBTITLE
  143. MOVE 31,MBUF+69,SBUF+48 MOVE SUB-SUBTITLE
  144. EQ LST2 WRITE LINE
  145.  
  146. CKSA BSS 0
  147. CON 10HSTORAGE AL,STA
  148. CON 10HSYMBOLIC R,REF
  149. CON 10HERROR DIRE,ERD
  150. CKSAE CON 0,LSL
  151. ERD SPACE 4,10
  152. ** ERD - LIST ERROR DIRECTORY.
  153. *
  154. * EXIT TO *LST2*.
  155. *
  156. * USES A - 1, 6.
  157. * X - 1, 6.
  158. * B - 2, 3, 4.
  159. *
  160. * MACROS MOVE.
  161.  
  162.  
  163. ERD SA1 MBUF+16
  164. SX6 X1-1R
  165. ZR X6,ERD1 IF NOT TYPE EXPLANATION
  166. MOVE 16,MBUF+12,SBUF
  167. MOVE 64,MBUF+40,SBUF+16
  168. EQ LST2 WRITE LINE
  169.  
  170. ERD1 MOVE 21,MBUF+19,SBUF
  171. SB2 9 NUMBER OF FIELDS TO MOVE
  172. SB3 MBUF+44
  173. SB4 SBUF+21
  174. ERD2 MOVE 6,B3,B4 MOVE FIELD
  175. SB3 B3+10
  176. SB4 B4+6
  177. SB2 B2-1
  178. NZ B2,ERD2 IF NOT END OF LINE
  179. MOVE 4,BLANKS,SBUF+75 CLEAR LAST PART OF LINE
  180. SX6 LSL
  181. SA6 CKSAE+1 RESET LINE LIST
  182. EQ LST2 WRITE LINE
  183. LSL SPACE 4,10
  184. ** LSL - LIST LINE.
  185. *
  186. * EXIT TO *LST2*.
  187. *
  188. * USES A - 0, 1, 2, 6, 7.
  189. * X - 1, 2, 3, 4, 6, 7.
  190. * B - 2.
  191. *
  192. * MACROS MOVE.
  193.  
  194.  
  195. LSL MOVE 7,MBUF+7,SBUF+1 LOCATION FIELD
  196. MOVE 64,MBUF+40,SBUF+8 CARD IMAGE
  197. MOVE 6,MBUF+120,SBUF+72 SEQUENCE NUMBER
  198. SA1 MBUF+1 FIRST ERROR CODE (IF ANY)
  199. MX4 1
  200. BX6 X1
  201. SA6 SBUF+1
  202. SA1 MBUF+112 ASSEMBLE CARD NAME
  203. SB2 X1-1R
  204. ZR B2,LSL2 IF BLANK NAME
  205. BX6 X6-X6
  206. LX4 3*6
  207. SA2 LSLA
  208. LSL1 LX6 6
  209. BX6 X6+X1
  210. LX4 6
  211. SA1 A1+B1
  212. PL X4,LSL1 IF NOT END OF WORD
  213. BX3 X2-X6
  214. ZR X3,LSL2 IF SAME CARD NAME
  215. SA6 A2 SET NEW NAME
  216. SX7 1R
  217. SA7 SBUF+65
  218. MOVE 7,MBUF+112,SBUF+66
  219. LSL2 SA1 MBUF+40 CHECK CARD TYPE
  220. SX6 X1-1R*
  221. SB2 X1-1R,
  222. ZR X6,LST2 IF COMMENT
  223. ZR B2,LST2 IF CONTINUATION
  224. SA1 MBUF+50 ASSEMBLE OPCODE
  225. MX4 1
  226. BX6 X6-X6
  227. SA2 LSLB
  228. LX4 3*6
  229. LSL3 LX6 6
  230. BX6 X6+X1
  231. LX4 6
  232. SA1 A1+B1
  233. PL X4,LSL3 IF NOT END OF WORD
  234. BX7 X2-X6
  235. ZR X7,LSL5 IF *END*
  236. LSL4 SA2 A2+B1
  237. BX7 X2-X6
  238. ZR X2,LST2 IF EOL
  239. NZ X7,LSL4 IF NOT *EQU* TYPE
  240. MOVE 7,MBUF+29,SBUF
  241. SX6 1R
  242. SA6 SBUF
  243. EQ LST2 WRITE LINE
  244.  
  245. * PROCESS STATISTICS.
  246.  
  247. LSL5 SA0 LSL6 SET STATISTICS LIST
  248. SX6 A0+
  249. SA6 CKSAE+1
  250. EQ LST2 WRITE LINE
  251.  
  252. LSL6 MX4 1 CHECK FOR NEW IDENT
  253. SA1 MBUF+50
  254. BX6 X6-X6
  255. LX4 3*6
  256. SA2 LSLC
  257. LSL7 LX6 6
  258. BX6 X1+X6
  259. LX4 6
  260. SA1 A1+B1
  261. PL X4,LSL7 IF NOT YET 7 CHARACTERS
  262. SX7 LSL
  263. BX6 X6-X2
  264. NZ X6,LSL8 IF NOT *IDENT*
  265. SA0 X7
  266. SA7 CKSAE+1
  267. EQ LSL PROCESS IDENT
  268.  
  269. LSL8 MOVE 75,MBUF+27,SBUF
  270. MOVE 5,BLANKS,SBUF+75
  271. EQ LST2 WRITE LINE
  272.  
  273. LSLA CON 1H
  274.  
  275. LSLB BSS 0
  276. CON 7REND
  277. LSLC CON 7RIDENT
  278. CON 7REQU
  279. CON 7RSET
  280. CON 7RDUP
  281. CON 7RMAX
  282. CON 7RMIN
  283. CON 7RCOL
  284. CON 7RBASE
  285. CON 0
  286. PEJ SPACE 4,10
  287. ** PEJ - PROCESS EJECT.
  288. *
  289. * EXIT (A0) = LINE PROCESSOR.
  290. * EXIT TO *LST2*.
  291. *
  292. * USES A - 0, 1, 6, 7.
  293. * X - 1, 6, 7.
  294. *
  295. * MACROS MOVE.
  296.  
  297.  
  298. PEJ SA0 CKS SET SUBTITLE CHECK
  299. SX6 1R1 SET EJECT
  300. SX7 1R
  301. SA6 SBUF
  302. SA7 A6+1
  303. MOVE 46,MBUF+8,A7+B1 TITLE
  304. MOVE 21,MBUF+89,SBUF+47 DATE/TIME
  305. MOVE 5,MBUF+115,SBUF+68 * PAGE*
  306. MOVE 7,MBUF+121,SBUF+73 PAGE NUMBER
  307. SA1 =1H CLEAR CARD NAME
  308. BX6 X1
  309. SA6 LSLA
  310. SA1 PD+1 GET *PD* CONTROL WORD
  311. BX6 X6-X6 DISABLE USE OF *PD*
  312. SA6 A1
  313. WRITEW O,PD,X1 WRITE PRINT DENSITY FORMAT CONTROL
  314. EQ LST2 WRITE LINE
  315. REF SPACE 4,10
  316. ** REF - LIST CROSS REFERENCE TABLE.
  317. *
  318. * EXIT TO *LST2*.
  319. *
  320. * USES A - 1, 6.
  321. * X - 1, 6.
  322. * B - 2, 3, 4.
  323. *
  324. * MACROS MOVE.
  325.  
  326.  
  327. REF SA1 MBUF+67
  328. SX6 X1-1R=
  329. NZ X6,REF1 IF NOT QUALIFIER LINE
  330. MOVE 30,MBUF+50,SBUF+18
  331. EQ LST2 WRITE LINE
  332.  
  333. REF1 MOVE 9,MBUF+7,SBUF SYMBOL NAME
  334. MOVE 7,MBUF+17,SBUF+9 SYMBOL VALUE
  335. SB3 MBUF+42
  336. SB2 8 NUMBER OF FIELDS TO MOVE
  337. SB4 SBUF+16
  338. REF2 MOVE 8,B3,B4 MOVE FIELD *PPP/LL F*
  339. SB3 B3+10
  340. SB4 B4+8
  341. SB2 B2-1
  342. NZ B2,REF2 IF NOT END OF LINE
  343. SX6 LSL RESET LINE LIST
  344. SA6 CKSAE+1
  345. EQ LST2 WRITE LINE
  346. SRN SPACE 4,10
  347. ** SRN - SET RECORD NAME.
  348. *
  349. * EXIT TO *LST3*.
  350. *
  351. * USES A - 1, 6.
  352. * B - 3.
  353. * X - 1, 4, 6.
  354. *
  355. * MACROS MESSAGE.
  356.  
  357.  
  358. SRN SA1 MBUF
  359. SB3 X1-1RS
  360. ZR B3,SRN2 IF 6 LPI PRINT DENSITY IMAGE
  361. EQ B3,B1,SRN2 IF 8 LPI PRINT DENSITY IMAGE
  362. SX6 B0
  363. MX4 10
  364. SRN1 LX6 6
  365. BX6 X6+X1
  366. LX4 1
  367. SA1 A1+B1
  368. NG X4,SRN1 IF NOT 7 CHARACTERS CHECKED
  369. LX6 -6
  370. SA6 SRNA+1
  371. MESSAGE A6-B1,1
  372. EQ LST3 READ NEXT LINE
  373.  
  374. SRN2 SX6 X1
  375. LX6 -6
  376. SA6 PD
  377. EQ LST3 READ NEXT LINE
  378.  
  379. SRNA DATA 10HCONVERTING
  380. DATA 0,0
  381. STA SPACE 4,10
  382. ** STA - LIST STORAGE ALLOCATION.
  383. *
  384. * EXIT TO *LST2*.
  385. *
  386. * USES A - 1.
  387. * X - 1, 6.
  388. *
  389. * MACROS MOVE.
  390.  
  391.  
  392. STA SA1 MBUF+26 CHECK LINE TYPE
  393. SX6 X1-1R
  394. ZR X6,STA1 IF NOT ALLOCATION
  395. MOVE 76,MBUF+18,SBUF
  396. EQ LST2 WRITE LINE
  397.  
  398. STA1 MOVE 76,MBUF+38,SBUF
  399. EQ LST2 WRITE LINE
  400. SPACE 4,10
  401. ** COMMON DECKS.
  402.  
  403.  
  404. *CALL COMCCIO
  405. *CALL COMCMVE
  406. *CALL COMCRDS
  407. *CALL COMCRDW
  408. *CALL COMCSYS
  409. *CALL COMCWTS
  410. *CALL COMCWTW
  411. BUFFERS SPACE 4,10
  412. ** BUFFERS.
  413.  
  414.  
  415. ENDS BSS 0
  416. USE //
  417. IBUF BSS IBUFL
  418. OBUF BSS OBUFL
  419. END BSS 0
  420. RFL= BSS 0
  421. USE *
  422. ARG SPACE 4,10
  423. ** ARG - PROCESS ARGUMENTS.
  424. *
  425. * USES A - 1, 2, 6, 7.
  426. * X - 0, 1, 2, 3, 4, 6, 7.
  427. * B - 2, 7.
  428. *
  429. * CALLS IPP.
  430. *
  431. * MACROS ABORT, MESSAGE, REWIND.
  432.  
  433.  
  434. ORG IBUF
  435. SEG
  436.  
  437. ARG5 NZ X0,ARG6 IF NO REWIND
  438. REWIND I
  439. ARG6 RJ IPP INITIALIZE PAGE PARAMETERS
  440.  
  441. ARG SUBR ENTRY/EXIT
  442. SX7 A0-END CHECK FL
  443. PL X7,ARG1 IF ENOUGH FIELD LENGTH
  444. MESSAGE ARGA * FL TOO SHORT FOR LIST, NEED XXXXB.*
  445. ABORT ABORT
  446.  
  447. ARG1 SB2 IBUF SPLIT FL BETWEEN BUFFERS
  448. BX0 X0-X0 CLEAR NO REWIND
  449. SX1 A0-B2
  450. AX1 1
  451. SX6 X1+B2 LIMIT FOR I = FIRST FOR O
  452. SX7 A0+ LIMIT FOR O = FL
  453. SA6 I+4
  454. SA7 O+4
  455. SA6 A7-B1
  456. SA6 A6-B1
  457. SX7 B1
  458. LX7 18
  459. BX6 X6+X7 SET FET SIZE TO 1+MINIMUM
  460. SA6 A6-B1
  461. SX7 B2 (0) = POINTER TO I BUFFER
  462. SA7 B0
  463. SA1 ACTR CHECK ARGUMENT COUNT
  464. MX4 42
  465.  
  466. * PROCESS *IFILE* NAME.
  467.  
  468. SB7 X1
  469. ZR B7,ARG5 IF NO ARGUMENTS
  470. SA1 B1+B1 SET *IFILE* NAME
  471. SA2 I
  472. BX7 X4*X1
  473. SX3 X2
  474. ZR X7,ARG2 IF BLANK ARGUMENT
  475. IX7 X7+X3
  476. SA7 A2
  477.  
  478. * PROCESS *OFILE* NAME.
  479.  
  480. ARG2 SB7 B7-B1
  481. ZR B7,ARG4 IF 1 ARGUMENT
  482. SA1 A1+B1 SET *OFILE* NAME
  483. SA2 O
  484. BX7 X4*X1
  485. ZR X7,ARG3 IF BLANK ARGUMENT
  486. IX7 X7+X3
  487. SA7 A2
  488.  
  489. * CHECK FOR NO REWIND.
  490.  
  491. ARG3 SX0 B7-B1
  492.  
  493. * CHECK FILE NAMES.
  494.  
  495. ARG4 SA1 I CHECK FILE NAMES
  496. SA2 O
  497. BX7 X1-X2
  498. AX7 18
  499. NZ X7,ARG5 IF *IFILE* NE. *OFILE*
  500. MESSAGE ARGB * FILE NAME CONFLICT.*
  501. ABORT ABORT
  502.  
  503. .1 OCTMIC ENDS+END-IBUF+20
  504. ARGA DATA C* FL TOO SHORT FOR LIST, NEED ".1"B.*
  505.  
  506. ARGB DATA C* FILE NAME CONFLICT.*
  507. IPP SPACE 4,15
  508. ** IPP - INITIALIZE PAGE PARAMETERS.
  509. *
  510. * ENTRY NONE.
  511. *
  512. * EXIT PRINT DENSITY SET UP IF NOT TTY.
  513. *
  514. * USES A - 6.
  515. * B - NONE.
  516. * X - 2, 6.
  517. *
  518. * CALLS STF.
  519. *
  520. * MACROS GETPP.
  521.  
  522.  
  523. IPP SUBR ENTRY/EXIT
  524. SX2 O FET ADDRESS OF PRINT FILE
  525. RJ STF
  526. ZR X6,IPPX IF TTY PRINT FILE
  527. GETPP IPPA,PL,PD
  528. SX6 B1+
  529. SA6 PD+1 SET CONTROL WORD TO USE *PD*
  530. EQ IPPX RETURN
  531.  
  532. IPPA BSSZ 2 GETPAGE RESPONSE BLOCK
  533. SPACE 4,5
  534. * COMMON DECKS FOR PRESET.
  535.  
  536. *CALL COMCCPM
  537. *CALL COMCSTF
  538.  
  539. END
cdc/nos2.source/opl871/list80.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator