Table of Contents

VFYLIB

Table Of Contents

  • [00011] VERIFY LIBRARY FILES.
  • [00067] TABLE STRUCTURE.
  • [00101] MACRO DEFINITIONS.
  • [00102] CALL - SUBROUTINE CALL.
  • [00131] TABLE - DEFINE MANAGED TABLE POINTERS.
  • [00157] SEARCH - SEARCH FOR ENTRY IN MANAGED TABLE.
  • [00180] READW - REDEFINE READ WORDS MACRO TO USE CONTROL WORDS.
  • [00191] FETS AND TEMPORARY STORAGE.
  • [00231] MAIN PROGRAM.
  • [00232] VERIFY LIBRARY FILES.
  • [00302] SUBROUTINES.
  • [00303] ABT - ABORT JOB.
  • [00322] ADD - ADD WORD(S) TO MANAGED TABLE.
  • [00408] ARG - PROCESS ARGUMENTS ON CONTROL CARD.
  • [00494] CCM - COPY COMMENT.
  • [00537] CCS - CALCULATE CHECKSUM.
  • [00570] CDP - CHECK FOR DELETED OR INSERTED PROGRAMS.
  • [00607] CRC - CHECK RESIDENCE CHANGE.
  • [00656] CRP - CHECK REPLACED PROGRAMS.
  • [00726] C6S - CONVERT 6 DIGITS WITH LEADING ZERO SUPPRESSION.
  • [00759] LOL - LIST ONE LINE.
  • [00784] OPN - OUTPUT PROGRAM NAME.
  • [00883] RDF - READ FILES.
  • [01119] RDA - READ DATA.
  • [01184] CDT - CHECK DEVICE TYPE.
  • [01222] IDT - ISSUE UNKNOWN DEVICE MESSAGE.
  • [01264] WPH - WRITE PAGE HEADER.
  • [01305] SMT - SEARCH MANAGED TABLE.
  • [01377] PRS - PRESET VFYLIB.

Source Code

VFYLIB.txt
  1. IDENT VFYLIB,FETS,VFYLIB
  2. ABS
  3. ENTRY VFYLIB
  4. ENTRY MFL=
  5. ENTRY SSM=
  6. SYSCOM B1
  7. VFYLIB TITLE VFYLIB - VERIFY LIBRARY FILES.
  8. *COMMENT VFYLIB - VERIFY LIBRARY FILES.
  9. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  10. VFYLIB SPACE 4,10
  11. *** VFYLIB - VERIFY LIBRARY FILES.
  12. * D. A. CAHLANDER. 69/02/16.
  13. * P. D. HAAS. 73/10/10.
  14. * A. D. FORET. 75/02/10.
  15. SPACE 4
  16. *** VFYLIB COMPARES TWO LIBRARY FILES. REPLACEMENTS, DELETIONS,
  17. * INSERTIONS, AND CHANGES IN RESIDENCE ARE RECORDED ON FILE
  18. * *OUTPUT*.
  19. SPACE 4
  20. *** COMMAND.
  21. *
  22. * VFYLIB(OLD,NEW,OUTPUT,NR)
  23. *
  24. * OLD = OLD LIBRARY FILE (*OLD* ASSUMED).
  25. * NEW = NEW LIBRARY FILE (*NEW* ASSUMED).
  26. * OUTPUT = OUTPUT FILE (*OUTPUT* ASSUMED).
  27. * NR, IF SPECIFIED, OLD AND NEW ARE NOT REWOUND.
  28. SPACE 4,20
  29. *** DAYFILE MESSAGES.
  30. *
  31. * * FWA/LWA ERROR IN VFYLIB. * - FWA OF PROGRAM TEXT
  32. * IS LESS THAN THE LWA + 1 OF PROGRAM TEXT.
  33. *
  34. * * UNKNOWN DEVICE TYPE -- LFN = XX. * - DISPLAYS UNKNOWN
  35. * DEVICE TYPE.
  36. *
  37. * * TABLE OVERFLOW. JOB ABORTED. * - INSUFFICIENT FIELD LENGTH.
  38. *
  39. * * VERIFY GOOD. * - THE TWO FILES VERIFIED GOOD.
  40. *
  41. * * VFYLIB COMPLETE. * - NORMAL TERMINATION MESSAGE. THE
  42. * DIFFERENCES BETWEEN *OLD* AND *NEW* FILES ARE LISTED
  43. * ON THE OUTPUT FILE SPECIFIED.
  44. *
  45. * * XXXXXX FIELD LENGTH REQUIRED. * - FIELD LENGTH REQUIRED.
  46. SPACE 4
  47. **** ASSEMBLY CONSTANTS.
  48.  
  49.  
  50. OLDL EQU 30061B *OLD* BUFFER LENGTH
  51. NEWL EQU 30061B *NEW* BUFFER LENGTH
  52. ENTL EQU 5 NUMBER OF WORDS/ENTRY IN *OPT* AND *NPT*
  53. OUTL EQU 2010B *OUTPUT* BUFFER LENGTH
  54. MINBL EQU 4000B MINIMUM BUFFER LENGTH
  55. MINC EQU 1000B MEMORY REQUEST INCREMENT
  56. ODEBL EQU 16 LENGTH OF OD FET EXTENSION
  57. ****
  58.  
  59.  
  60. * SPECIAL ENTRY POINT.
  61.  
  62. SSM= EQU 0 SUPPRESS DUMPS OF FIELD LENGTH
  63. SPACE 4,10
  64. *CALL COMCMAC
  65. *CALL COMCCMD
  66. *CALL COMSSRT
  67. TITLE TABLE STRUCTURE.
  68. ** TABLE STRUCTURE.
  69. * ALL TABLES ARE VARIABLE LENGTH MANAGED TABLES. POINTERS
  70. * TO TABLE ABC ARE:
  71. * P.ABC = FWA OF TABLE ABC.
  72. * L.ABC = LENGTH OF TABLE ABC.
  73. * N.ABC = NUMBER OF WORDS/ENTRY.
  74. * D.ABC = NUMBER OF WORDS THE LENGTH OF TABLE IS
  75. * INCREASED IF TABLE IS FULL.
  76. *
  77. * OPT - OLD PROGRAM TABLE.
  78. *
  79. * 42/PROGRAM,12/LIB,6/TYPE
  80. * 12/CHECKSUM,18/0,30/INDEX
  81. * 60/ULIB
  82. * 60/DATE
  83. * 1. PROGRAM = PROGRAM NAME LEFT JUSTIFIED.
  84. * 2. LIB = LIBRARY NUMBER.
  85. * 3. TYPE = PROGRAM TYPE FROM *COMCSRT*.
  86. * 4. CHECKSUM = CHECKSUM OF PROGRAM TEXT.
  87. * 5. INDEX = INDEX TO COMMENT TABLE.
  88. * 6. ULIB = ULIB NAME.
  89. * 7. DATE = DATE FROM 7700 TABLE.
  90. *
  91. * NPT - NEW PROGRAM TABLE.
  92. *
  93. * FORMAT THE SAME AS OLD PROGRAM TABLE.
  94. *
  95. * CMT - COMMENT TABLE.
  96. *
  97. * 60/COMMENT TEXT
  98. * 60/COMMENT TEXT
  99. * ..
  100. * 48/COMMENT TEXT,12/0
  101. TITLE MACRO DEFINITIONS.
  102. ** CALL - SUBROUTINE CALL.
  103. *
  104. * THIS MACRO SETS UP A STANDARD CALLING SEQUENCE.
  105. *
  106. * CALL SUB,P1,P2,P3,P4,P5,P6
  107. *
  108. * ENTRY SUB = SUBROUTINE NAME.
  109. * PI = ADDRESS OF I-TH PARAMETER.
  110. * PARAMETER ADDRESSES ARE PASSED IN B-REGISTERS (AS IN FORTRAN)
  111. * WITH THE FIRST PARAMETER ADDRESS IN B2, SECOND IN B3, ETC.
  112.  
  113.  
  114. CALL MACRO SUB,P1,P2,P3,P4,P5,P6
  115. IFC NE,$P1$$,1
  116. R= B2,P1
  117. IFC NE,$P2$$,1
  118. R= B3,P2
  119. IFC NE,$P3$$,1
  120. R= B4,P3
  121. IFC NE,$P4$$,1
  122. R= B5,P4
  123. IFC NE,$P5$$,1
  124. R= B6,P5
  125. IFC NE,$P6$$,1
  126. R= B7,P6
  127. ENDIF
  128. RJ SUB
  129. ENDM
  130. SPACE 4
  131. ** TABLE - DEFINE MANAGED TABLE POINTERS.
  132. *
  133. * MANAGED TABLES HAVE 4 POINTERS ASSOCIATED WITH THEM:
  134. * (P.NAME) = FWA OF MANAGED TABLE.
  135. * (L.NAME) = LENGTH OF MANAGED TABLE.
  136. * (N.NAME) = NUMBER OF WORDS IN AN ENTRY.
  137. * (D.NAME) = NUMBER OF WORDS THE LENGTH OF TABLE IS
  138. * INCREASED IF TABLE IS FULL.
  139. *
  140. * TABLE NAME,WORD,DELTA
  141. *
  142. * ENTRY NAME = NAME OF TABLE.
  143. * WORD = NUMBER OF WORDS/ENTRY.
  144. * DELTA = SIZE OF TABLE INCREASE (NUMBER OF ENTRIES).
  145.  
  146.  
  147. TABLE MACRO NAME,WORD,DELTA
  148. LOCAL NW,DW
  149. NW SET WORD 1
  150. DW SET DELTA 4
  151. P.NAME VFD 42D/0L_NAME,18D/BUF
  152. L.NAME VFD 60D/0
  153. N.NAME VFD 60D/NW
  154. D.NAME VFD 60D/NW*DW
  155. ENDM
  156. SPACE 4
  157. ** SEARCH - SEARCH FOR ENTRY IN MANAGED TABLE.
  158. *
  159. * THIS MACRO SETS UP A CALL TO SEARCH FOR AN ENTRY
  160. * IN A MANAGED TABLE.
  161. *
  162. * SEARCH TABLE,ENTRY,MASK,INDEX,RETURN
  163. *
  164. * ENTRY TABLE = NAME OF MANAGED TABLE.
  165. * ENTRY = ADDRESS OF ENTRY.
  166. * MASK = ADDRESS OF SEARCH MASK.
  167. * INDEX = INDEX INTO TABLE.
  168. * RETURN = ADDRESS OF RETURN PARAMETER.
  169.  
  170.  
  171. SEARCH MACRO TABLE,ENTRY,MASK,INDEX,RETURN
  172. SB2 P.TABLE
  173. SB3 ENTRY
  174. SB4 MASK =77777777777777777777B
  175. SB5 INDEX B0
  176. SB6 RETURN SMTA
  177. RJ SMT
  178. ENDM
  179. READW SPACE 4
  180. ** READW - REDEFINE READ WORDS MACRO TO USE CONTROL WORDS.
  181.  
  182.  
  183. PURGMAC READW
  184.  
  185. READW MACRO F,S,N
  186. R= B6,S
  187. R= B7,N
  188. R= X2,F
  189. RJ RDA
  190. ENDM
  191. TITLE FETS AND TEMPORARY STORAGE.
  192. FETS SPACE 4,10
  193. ** FETS.
  194.  
  195.  
  196. ORG 104B
  197. FETS BSS 0
  198.  
  199. CON -0
  200. CON 0
  201. OLD FILEB OLDB,OLDL,(FET=10)
  202. ORG OLD+11B
  203. VFD 36/,6/ODEBL,18/OODEB POINTER TO *OD* EXT. BUFFER
  204. ORG OLD+10
  205.  
  206. CON -0
  207. CON 0
  208. NEW FILEB NEWB,NEWL,(FET=10)
  209. ORG NEW+11B
  210. VFD 36/,6/ODEBL,18/NODEB POINTER TO *OD* EXT. BUFFER
  211. ORG NEW+10
  212.  
  213. O BSS 0
  214. OUTPUT FILEC OUTB,OUTL,(FET=8)
  215. TEMP SPACE 4,10
  216. * OPTICAL DISK EXTENSION BUFFERS.
  217.  
  218. OODEB BSSZ ODEBL *OLD*
  219. NODEB BSSZ ODEBL *NEW*
  220. ** TEMPORARY STORAGE.
  221.  
  222.  
  223. CREW CON 0 CLEAR REWIND FLAG
  224. LINE CON 99999,0 LINE NUMBER COUNT
  225. LL EQU LINE+1 LINE LIMIT - PAGE SIZE
  226. PD CON 0,0 PRINT DENSITY FORMAT CONTROL
  227. TF EQU PD+1 TERMINAL FILE FLAG
  228. PNUM CON 0 PAGE NUMBER
  229. CFL CON 0 CURRENT FIELD LENGTH
  230. MFL VFD 30/-0,30/0 MAXIMUM FIELD LENGTH
  231. TITLE MAIN PROGRAM.
  232. ** VFYLIB - VERIFY LIBRARY FILES.
  233. *
  234. * ENTRY (ACTR) - ARGUMENT COUNT.
  235. * 1. FILE *OLD* AND *NEW* ARE READ TO CREATE DICTIONARY.
  236. * 2. REPLACEMENTS AND COPIES ARE CHECKED.
  237. * 3. RESIDENCE CHANGES ARE FOUND.
  238. * 4. DELETIONS ARE FOUND.
  239. * 5. INSERTIONS ARE FOUND.
  240. *
  241. * USES A - 1, 2, 6.
  242. * B - 6.
  243. * X - 0, 1, 2, 3, 6.
  244. *
  245. * CALLS ARG, CDP, COD, CRC, CRP, PRS, RDF.
  246. *
  247. * MACROS CALL, ENDRUN, MESSAGE, REWIND, WRITER.
  248.  
  249.  
  250. VFYLIB BSS 0 ENTRY
  251. SB1 1 (B1) = 1
  252. RJ PRS PRESET PROGRAM
  253. RJ ARG PROCESS ARGUMENTS
  254. RJ RDF READ FILES
  255. SX6 VFYA
  256. SA6 OPND
  257. RJ CRP CHECK REPLACED PROGRAMS
  258. SX6 VFYB
  259. SA6 OPND
  260. RJ CRC CHECK RESIDENCE CHANGES
  261. SX6 VFYC
  262. SA6 OPND
  263. CALL CDP,(P.OPT) CHECK DELETED PROGRAMS
  264. SX6 VFYD
  265. SA6 OPND
  266. CALL CDP,(P.NPT) CHECK INSERTED PROGRAMS
  267.  
  268. * END PROGRAM.
  269.  
  270. SA1 P.BUF ISSUE F.L. MESSAGE
  271. MX0 -18
  272. BX1 -X0*X1
  273. RJ COD
  274. SA2 VFYE
  275. MX1 6*6 BUILD FL REQUIRED MESSAGE
  276. BX3 X1*X4
  277. BX6 -X1*X2
  278. BX6 X6+X3
  279. SA6 A2
  280. MESSAGE A6,3 FL REQUIRED
  281. SA1 PNUM CHECK FOR PAGE NUMBER
  282. SX0 =C* VERIFY GOOD.*
  283. ZR X1,VFY2 IF NO PAGE NUMBER DETECTED
  284. SX0 =C* VFYLIB COMPLETE.*
  285. WRITER OUTPUT
  286. VFY2 SA1 CREW
  287. NZ X1,VFY3 IF NO REWIND FLAG SET
  288. REWIND OLD
  289. REWIND NEW
  290. VFY3 MESSAGE X0+
  291. ENDRUN
  292.  
  293. VFYA DATA C* RECORDS REPLACED.*
  294.  
  295. VFYB DATA C* CHANGES IN RESIDENCE.*
  296.  
  297. VFYC DATA C* DELETED RECORDS.*
  298.  
  299. VFYD DATA C* INSERTED RECORDS.*
  300.  
  301. VFYE DATA C*NNNNNN FIELD LENGTH REQUIRED.*
  302. TITLE SUBROUTINES.
  303. ** ABT - ABORT JOB.
  304. *
  305. * ENTRY (X1) = ADDRESS OF MESSAGE.
  306. *
  307. * USES A - 1, 2.
  308. * X - 1, 2, 6.
  309. *
  310. * MACROS ABORT, MESSAGE, WRITER.
  311.  
  312.  
  313. ABT SUBR ENTRY/EXIT
  314. MESSAGE X1 ISSUE ERROR MESSAGE
  315. SA1 OUTPUT+2 CLOSE OUT FILE *OUTPUT*
  316. SA2 A1+B1
  317. BX6 X1-X2
  318. ZR X6,ABT1 IF NO OUTPUT
  319. WRITER OUTPUT
  320. ABT1 ABORT
  321. SPACE 4
  322. ** ADD - ADD WORD(S) TO MANAGED TABLE.
  323. *
  324. * ENTRY (B2) = ADDRESS OF TABLE POINTER.
  325. * (B3) = FWA OF ENTRY.
  326. *
  327. * USES A - 1, 2, 3, 4, 5, 7.
  328. * B - 4, 5, 6, 7.
  329. * X - 1, 2, 3, 4, 5, 6, 7.
  330. *
  331. * CALLS ABT.
  332. *
  333. * MACROS MEMORY.
  334.  
  335.  
  336. ADD SUBR ENTRY/EXIT
  337. ADD1 SA1 B2 SET TABLE ADDRESS
  338. SA2 B2+B1
  339. SA3 A2+B1
  340. SA4 A3+B1
  341. SA5 A4+B1
  342. IX7 X2+X3
  343. IX7 X7-X5
  344. SB6 X1
  345. SX6 B6+X7
  346. PL X6,ADD3 IF NO ROOM FOR ENTRY
  347. SA1 B3 STORE ENTRY
  348. ADD2 BX7 X1
  349. SA7 B6+X2
  350. SX2 X2+B1
  351. SA1 A1+B1
  352. SX3 X3-1
  353. NZ X3,ADD2 LOOP FOR ENTIRE ENTRY
  354. BX7 X2
  355. SA7 A2
  356. EQ ADDX RETURN
  357.  
  358. * NO ROOM FOR ENTRY. MOVE OTHER TABLES UP TO MAKE ROOM FOR
  359. * ENTRY.
  360.  
  361. ADD3 SA1 P.BUF
  362. SA2 L.BUF
  363. IX6 X2-X4
  364. PL X6,ADD4 IF ENOUGH FL
  365. SA1 CFL INCREMENT CURRENT FIELD LENGTH
  366. SA3 MFL FIELD LENGTH LIMIT
  367. SX6 X1+MINC NEW FIELD LENGTH
  368. SX7 X2+MINC NEW LENGTH
  369. AX3 30
  370. SA6 A1
  371. SA7 A2+
  372. IX3 X3-X6
  373. NG X3,ADD8 IF INSUFFICIENT FIELD LENGTH
  374. BX1 X6
  375. MEMORY CM,,R,X1
  376. EQ ADD1 RESTART ALLOCATION
  377.  
  378. ADD4 SB5 X1 (B5) = LWA OF MOVE
  379. SB6 X5 (B6) = FWA OF MOVE
  380. SA6 A2
  381. SB4 A1
  382. ADD5 SA1 B4 INCREMENT TABLE POINTERS
  383. SB4 B4-4
  384. IX7 X1+X4
  385. SA7 A1
  386. NE B4,B2,ADD5 LOOP
  387. SA2 B5
  388. EQ B5,B6,ADD1 JUMP IF NO DATA TO MOVE
  389. SB7 X4+
  390. ADD6 SA1 A2-B1 MOVE TABLES
  391. SA2 A1-B1
  392. SB5 B5-2
  393. BX6 X1
  394. LX7 X2
  395. SA6 A1+B7
  396. SA7 A2+B7
  397. NE B5,B6,ADD6
  398. SX7 B0 CLEAR NEW AREA
  399. SB7 B6+B7
  400. ADD7 SA7 B6
  401. SB6 B6+B1
  402. NE B6,B7,ADD7 IF NOT END OF CLEAR
  403. EQ ADD1 MAKE ENTRY
  404.  
  405. ADD8 SX1 =C*TABLE OVERFLOW. JOB ABORTED.*
  406. RJ ABT ABORT
  407. SPACE 4
  408. ** ARG - PROCESS ARGUMENTS ON CONTROL CARD.
  409. *
  410. * USES A - 1, 2, 3, 4, 6.
  411. * B - 6, 7.
  412. * X - 0, 1, 2, 3, 4, 6.
  413. *
  414. * CALLS CDT, SFN, STF.
  415. *
  416. * MACROS CALL, OPEN, READCW, RECALL, REWIND, WRITEW.
  417.  
  418.  
  419. ARG SUBR ENTRY/EXIT
  420. SA1 ACTR SET ARGUMENT COUNT
  421. MX0 42
  422. SB7 X1
  423. SA1 ARGR
  424. SA2 ARGA SET LIST OF OPTIONS
  425. ARG1 ZR B7,ARG3 IF END OF ARGUMENTS
  426. BX6 X0*X1
  427. SA3 X2
  428. SB7 B7-B1
  429. BX3 -X0*X3
  430. ZR X6,ARG2 IF NO FILE NAME
  431. BX6 X6+X3
  432. SA6 X2
  433. ARG2 SA1 A1+B1 READ NEXT PARAMETER
  434. SA2 A2+B1
  435. NZ X2,ARG1 LOOP FOR NEXT PARAMETER
  436.  
  437. * SET TERMINAL FLAG.
  438.  
  439. ARG3 SX2 O
  440. RJ STF SET TERMINAL FILE
  441. SA6 TF
  442. WRITEW O,A6-B1,X6 CONDITIONALLY WRITE FORMAT EFFECTOR
  443.  
  444. * STORE FET POINTERS STARTING AT RA+2.
  445.  
  446. SA1 ARGA SET FET LIST
  447. SB6 ARGR
  448. ARG4 SA2 X1
  449. BX6 X0*X2
  450. BX6 X6+X1
  451. SA6 B6
  452. SB6 B6+B1
  453. SA1 A1+B1
  454. NZ X1,ARG4 LOOP FOR ALL FILES
  455. SX6 B0 TERMINATE LIST
  456. SA6 B6
  457.  
  458. * SET FILE NAMES IN TITLE.
  459.  
  460. SA2 OLD
  461. BX1 X0*X2
  462. RJ SFN SPACE FILL NAME
  463. SX1 1RN&1R
  464. SA2 NEW
  465. BX6 X6-X1
  466. SA6 WPHB+3
  467. BX1 X0*X2
  468. SA4 CREW
  469. RJ SFN
  470. SA6 WPHB+5
  471. NZ X4,ARG5 IF NO REWIND FLAG SET
  472. OPEN OLD,READ,R
  473. OPEN NEW,READ,R
  474. EQ ARG6 CONTINUE
  475.  
  476. ARG5 OPEN OLD,READNR,R
  477. OPEN NEW,READNR,R
  478. ARG6 SA1 OLD+1 CHECK DEVICE TYPE
  479. RJ CDT
  480. ZR X7,IDT IF UNKNOWN DEVICE
  481. READCW OLD,17B
  482. SA1 NEW+1 CHECK DEVICE TYPE
  483. RJ CDT
  484. ZR X7,IDT IF UNKNOWN DEVICE
  485. READCW NEW,17B
  486. EQ ARGX RETURN
  487.  
  488. ARGA CON OLD TABLE OF DEFAULT OPTIONS
  489. CON NEW
  490. CON OUTPUT
  491. CON CREW
  492. CON 0
  493. SPACE 4
  494. ** CCM - COPY COMMENT.
  495. *
  496. * ENTRY (B2) = ADDRESS OF FILE PARAMETER AREA.
  497. * (B4) = ADDRESS OF WORKING STORAGE.
  498. *
  499. * EXIT (B3) = FWA OF PROGRAM TEXT.
  500. *
  501. * USES A - 1, 4, 6.
  502. * B - 3, 6.
  503. * X - 1, 3, 4, 6, 7.
  504. *
  505. * CALLS CPT.
  506.  
  507.  
  508. CCM SUBR ENTRY/EXIT
  509. SA4 B2+.TL
  510. SA1 B2+B1 INSERT LIBRARY NUMBER
  511. LX4 6
  512. BX6 X1+X4
  513. SA6 A1
  514. MX3 .CL-.RL CLEAR FILE PARAMETER AREA
  515. BX6 X6-X6
  516. SB6 B2+ENTL+1
  517. SA6 A4-B1 CLEAR FILE PARAMETER AREA
  518. SX7 X1 SAVE RECORD TYPE
  519. CCM1 LX3 1
  520. SA6 A6-B1
  521. NG X3,CCM1 IF NOT END OF CLEAR
  522. SA1 B4
  523. SB3 B0
  524. SA4 A6 RESET (A6) FOR CPT
  525. LX6 X4
  526. SA6 A4
  527. ZR X7,CCM2 IF TYPE TEXT SKIP PREFIX TABLE COMMENTS
  528. RJ CPT
  529. ZR X6,CCM2 IF LAST WORD EMPTY
  530. SB6 B6-1
  531. CCM2 SX6 A6-B6 SET COMMENT LENGTH
  532. SB3 A1+B3
  533. NG X6,CCMX IF NO COMMENTS
  534. SA6 B2+.CL STORE COMMENT LENGTH
  535. EQ CCMX RETURN
  536. SPACE 4
  537. ** CCS - CALCULATE CHECKSUM.
  538. *
  539. * CHECKSUM PROGRAM TEXT FROM (B3) TO (B4).
  540. *
  541. * ENTRY (B2) = ADDRESS OF FILE PARAMETER AREA.
  542. * (B3) = FIRST WORD ADDRESS OF PROGRAM TEXT.
  543. * (B4) = LAST WORD ADDRESS + 1 OF PROGRAM TEXT.
  544. *
  545. * USES A - 1, 4, 6.
  546. * B - 3.
  547. * X - 1, 4, 6.
  548. *
  549. * CALLS ABT.
  550.  
  551.  
  552. CCS1 SA1 B3
  553. SB3 B3+B1
  554. BX4 X4-X1
  555. LX4 1
  556. NE B3,B4,CCS1 LOOP TO DETERMINE CHECKSUM
  557. BX6 X4
  558. SA6 A4
  559.  
  560. CCS SUBR ENTRY/EXIT
  561. SA4 B2+.CS GET CURRENT CHECKSUM
  562. SA1 B2+.RL ADVANCE RECORD LENGTH
  563. SX6 B4-B3
  564. IX6 X1+X6
  565. SA6 A1+
  566. LT B3,B4,CCS1 IF FWA .LT. LWA+1
  567. SX1 =C* FWA/LWA ERROR IN VFYLIB.*
  568. RJ ABT ABORT
  569. SPACE 4
  570. ** CDP - CHECK FOR DELETED OR INSERTED PROGRAMS.
  571. *
  572. * ENTRY (B2) = ADDRESS OF PROGRAM NAME TABLE POINTER.
  573. *
  574. * USES A - 1, 2, 3, 6, 7.
  575. * B - 2, 6, 7.
  576. * X - 0, 1, 2, 3, 6, 7.
  577. *
  578. * CALLS OPN.
  579. *
  580. * MACROS CALL.
  581.  
  582.  
  583. CDP SUBR ENTRY/EXIT
  584. SX6 B2
  585. SX7 B0 SET TABLE INDEX
  586. SA6 CDPA
  587. SA7 CDPB
  588. CDP1 SA1 CDPA
  589. SA1 X1
  590. SA2 A1+B1
  591. SA3 CDPB
  592. SB6 X1
  593. SB7 B6+X2
  594. SB2 B6+X3
  595. EQ B2,B7,CDPX IF END OF PROGRAM NAME TABLE - RETURN
  596. SA1 B2
  597. SX6 X3+ENTL
  598. MX0 30
  599. SA6 A3
  600. ZR X1,CDP1 IF ENTRY IS BLANK
  601. CALL OPN,B2 OUTPUT PROGRAM NAME
  602. EQ CDP1 LOOP
  603.  
  604. CDPA DATA 0 ADDRESS OF PROGRAM NAME TABLE POINTER
  605. CDPB DATA 0 TABLE INDEX
  606. SPACE 4
  607. ** CRC - CHECK RESIDENCE CHANGE.
  608. *
  609. * USES A - 1, 2, 3, 6, 7.
  610. * B - 6, 7.
  611. * X - 1, 2, 3, 6, 7.
  612. *
  613. * CALLS OPN.
  614. *
  615. * MACROS CALL, SEARCH.
  616.  
  617.  
  618. CRC SUBR ENTRY/EXIT
  619. SX7 B0 SET INDEX IN OPT
  620. SA7 CRCA
  621. CRC1 SA1 P.OPT CHECK RESIDENCE CHANGE
  622. SA2 L.OPT
  623. SA3 CRCA
  624. SB6 X1
  625. SB7 B6+X2
  626. SB6 B6+X3
  627. SA1 B6
  628. EQ B6,B7,CRCX IF END OF OPT - RETURN
  629. ZR X1,CRC3 IF ENTRY IS BLANK
  630. SEARCH NPT,B6
  631. SA6 CRCC
  632. SA1 P.OPT
  633. SA3 CRCA
  634. IX1 X1+X3
  635. NZ X6,CRC2 IF PROGRAM IN SAME LIBRARY
  636. SEARCH NPT,X1,CRCB
  637. ZR X6,CRC3 IF PROGRAM NOT FOUND
  638. SA6 CRCC
  639. CALL OPN,X6 OUTPUT PROGRAM NAME
  640. CRC2 SA1 P.OPT CLEAR ENTRIES
  641. SA2 CRCC
  642. SA3 CRCA
  643. IX1 X1+X3
  644. MX7 0
  645. SA7 X1
  646. SA7 X2
  647. CRC3 SA1 CRCA ADVANCE INDEX
  648. SX6 X1+ENTL
  649. SA6 A1
  650. EQ CRC1 LOOP
  651.  
  652. CRCA DATA 0 INDEX INTO OLD PROGRAM TABLE
  653. CRCB DATA 77777777777777000077B
  654. CRCC CON 0 NPT ADDRESS
  655. SPACE 4
  656. ** CRP - CHECK REPLACED PROGRAMS.
  657. *
  658. * USES A - 1, 2, 3, 4, 6, 7.
  659. * B - 6, 7.
  660. * X - 0, 1, 2, 3, 4, 6, 7.
  661. *
  662. * CALLS OPN.
  663. *
  664. * MACROS CALL, SEARCH.
  665.  
  666.  
  667. CRP SUBR ENTRY/EXIT
  668. SX7 B0 SET INDEX IN OPT
  669. SA7 CRPA
  670. CRP1 SA1 P.OPT DO LOOP FOR CHECKING FOR REPLACED PROGRAMS
  671. SA2 L.OPT
  672. SA3 CRPA
  673. SB6 X1
  674. SB7 B6+X2
  675. SB6 B6+X3
  676. SA1 B6
  677. EQ B6,B7,CRPX IF END OF OPT - RETURN
  678. ZR X1,CRP4 IF ENTRY IS BLANK
  679. SEARCH NPT,B6
  680. SA1 P.OPT COMPARE CHECKSUMS
  681. SA3 CRPA
  682. IX1 X1+X3
  683. ZR X6,CRP2 IF PROGRAM IS NOT IN SAME LIBRARY
  684. MX0 30
  685. SA3 X1+B1
  686. SA4 X6+B1
  687. BX7 X3-X4
  688. BX7 X0*X7
  689. NZ X7,CRP3 IF CHECKSUM CHANGE
  690. SA3 A3+.RL-.CS
  691. SA4 A4+.RL-.CS
  692. IX7 X4-X3
  693. NZ X7,CRP3 IF LENGTH CHANGE
  694. SA7 A3+.PD-.RL CLEAR PROGRAM NAME AND TYPE
  695. SA7 A4+.PD-.RL
  696. EQ CRP4 PROCESS NEXT RECORD
  697.  
  698. * RECORD NOT IN SAME LIBRARY.
  699.  
  700. CRP2 SEARCH NPT,X1,CRPB
  701. ZR X6,CRP4 IF PROGRAM NOT FOUND
  702. MX0 30
  703. SA1 P.OPT COMPARE CHECKSUMS
  704. SA3 CRPA
  705. IX1 X1+X3
  706. SA3 X1+B1
  707. SA4 X6+B1
  708. BX7 X3-X4
  709. BX7 X0*X7
  710. NZ X7,CRP3 IF CHECKSUM CHANGE
  711. SA3 A3+.RL-.CS
  712. SA4 A4+.RL-.CS
  713. IX7 X4-X3
  714. ZR X7,CRP4 IF NO LENGTH CHANGE
  715. CRP3 CALL OPN,X6 OUTPUT PROGRAM NAME
  716. CRP4 SA1 CRPA ADVANCE INDEX
  717. SX6 X1+ENTL
  718. MX0 30
  719. SA6 A1
  720. EQ CRP1 LOOP
  721.  
  722. CRPA DATA 0 INDEX INTO OLD PROGRAM TABLE
  723. CRPB DATA 77777777777777000077B
  724. CRPC DATA 0 RESIDENCE FLAG
  725. SPACE 4
  726. ** C6S - CONVERT 6 DIGITS WITH LEADING ZERO SUPPRESSION.
  727. *
  728. * ENTRY (B2) = ADDRESS OF RIGHT JUSTIFIED NUMBER.
  729. * (B3) = ADDRESS TO STORE RESULT.
  730. *
  731. * USES A - 1, 2, 3, 4, 6.
  732. * B - 2, 5, 6, 7.
  733. * X - 0, 1, 2, 3, 4, 5, 6.
  734.  
  735.  
  736. C6S SUBR ENTRY/EXIT
  737. SA2 =0.1000000001P48
  738. SA3 =10.0P0
  739. SA4 =1H
  740. SB6 6
  741. SB5 1R0-1R
  742. SA1 B2
  743. SB2 18
  744. PX1 X1
  745. BX6 X4
  746. C6S1 DX4 X1*X2
  747. FX1 X1*X2
  748. SB7 X1
  749. LX6 54
  750. SB2 B2+B6
  751. FX5 X4*X3 CALCULATE REMAINDER DIGIT
  752. SX0 X5+B5
  753. IX6 X0+X6
  754. NZ B7,C6S1 IF NOT ENTIRE NUMBER
  755. LX6 X6,B2 POSITION NUMBER
  756. SA6 B3
  757. EQ C6SX RETURN
  758. SPACE 4
  759. ** LOL - LIST ONE LINE.
  760. *
  761. * USES A - 1, 6.
  762. * X - 1, 2, 6.
  763. *
  764. * CALLS WPH.
  765. *
  766. * MACROS WRITEC.
  767.  
  768.  
  769. LOL SUBR ENTRY/EXIT
  770. SA1 LINE CHECK LINE NUMBER
  771. SX6 X1+B1
  772. SA6 A1
  773. SA1 A1+B1 GET LINE LIMIT
  774. IX6 X6-X1
  775. SX2 O
  776. NG X6,LOL1 IF NOT END OF PAGE
  777. RJ WPH
  778. SX6 X6+2 ADVANCE LINE COUNT
  779. SA6 LINE
  780. WRITEC X2,(=1L )
  781. LOL1 WRITEC X2,OUTPUTB
  782. EQ LOLX RETURN
  783. SPACE 4
  784. ** OPN - OUTPUT PROGRAM NAME.
  785. *
  786. * ENTRY (B2) = ADDRESS OF PROGRAM NAME TABLE ENTRY.
  787. *
  788. * USES A - 1, 2, 3, 4, 6, 7.
  789. * B - 6.
  790. * X - 0, 1, 2, 3, 4, 6, 7.
  791. *
  792. * CALLS C6S, LOL, SFN, WPH.
  793. *
  794. * MACROS CALL, WRITEC.
  795.  
  796.  
  797. OPN SUBR ENTRY/EXIT
  798. SX6 B2
  799. SA6 OPNA
  800. SA1 OPND
  801. ZR X1,OPN2 IF HEADER WRITTEN
  802. SA2 LINE CHECK LINE POSITION
  803. SX2 X2+4
  804. SA1 A2+B1 GET LINE LIMIT
  805. IX6 X2-X1
  806. NG X6,OPN1 IF NOT END OF PAGE
  807. RJ WPH
  808. OPN1 WRITEC O,(=1L )
  809. SA4 OPND GET HEADER MESSAGE ADDRESS
  810. SA3 LINE
  811. BX7 X7-X7
  812. SX6 X3+3 UPDATE LINE COUNT
  813. SA7 A4
  814. SA6 A3
  815. WRITEC X2,X4 WRITE HEADER MESSAGE
  816. WRITEC X2,(=1L )
  817.  
  818. * LIST PROGRAM NAME.
  819.  
  820. OPN2 SA1 OPNA OUTPUT PROGRAM NAME
  821. SA4 X1
  822. MX0 42
  823. BX1 X0*X4
  824. RJ SFN SPACE FILL NAME
  825. SA3 A3
  826. SA6 OUTPUTB+1
  827. MX0 -6
  828. LX7 X3
  829. BX2 -X0*X4
  830. SA1 OPNB+X2 OUTPUT PROGRAM TYPE
  831. SA7 A6-B1
  832. BX6 X1
  833. AX4 6
  834. SA6 A6+B1
  835. MX0 7*6 OUTPUT ULIB NAME
  836. SA1 OPNA
  837. SA5 X1+.UN-.PD
  838. BX1 X0*X5
  839. RJ SFN SPACE FILL ULIB NAME
  840. SA6 A6+B1
  841. MX0 -12
  842. BX7 -X0*X4 OUTPUT LIBRARY NUMBER
  843. SX7 X7+
  844. SA7 OPNC
  845. CALL C6S,A7,A6+B1
  846. SA1 OPNA OUTPUT DATE AND COMMENT
  847. SA1 X1+.CS-.PD X1 = COMMENT INDEX
  848. SA2 A1+.DT-.CS
  849. MX0 -30
  850. LX6 X2
  851. BX4 -X0*X1
  852. SA6 A6+B1
  853. SA2 P.CMT
  854. IX6 X2+X4
  855. AX4 18
  856. SB6 X4
  857. ZR X4,OPN4 IF NO COMMENTS
  858. SA1 X6
  859. OPN3 BX6 X1 MOVE COMMENTS
  860. SB6 B6-B1
  861. SA1 A1+B1
  862. SA6 A6+B1
  863. OPN4 NZ B6,OPN3 LOOP
  864. BX6 X6-X6
  865. SA6 A6+B1
  866. CALL LOL
  867. EQ OPNX RETURN
  868.  
  869. OPNA DATA 0 ADDRESS OF ENTRY
  870.  
  871. OPNB BSS 0
  872. .E ECHO ,RT=("RTMIC")
  873. .A IFC NE,/RT//
  874. DATA H/RT/
  875. .A ELSE
  876. DATA 0 UNDEFINED RECORD TYPE
  877. .A ENDIF
  878. .E ENDD
  879.  
  880. OPNC DATA 0 GROUP NUMBER
  881. OPND CON 0 HEADER MESSAGE ADDRESS
  882. SPACE 4
  883. ** RDF - READ FILES.
  884. *
  885. * BOTH FILES ARE READ SIMULTAINIOUSLY. COMMON ROUTINES
  886. * ARE USED BETWEEN THE TWO READS. IN THESE ROUTINES
  887. * (RDFB) = POINTER TO DATA AREA.
  888. *
  889. * USES A - 1, 2, 3, 4, 5, 6, 7.
  890. * B - 2, 3, 4, 5, 6, 7.
  891. * X - ALL.
  892. *
  893. * CALLS ADD, CCM, CCS, SFN.
  894. *
  895. * MACROS CALL, MESSAGE, READW.
  896.  
  897.  
  898. RDF SUBR ENTRY/EXIT
  899.  
  900. RDF1 EQ RDF3
  901. SA1 RDFA TOGGLE BETWEEN FILE *OLD* AND *NEW*
  902. SA2 A1+B1
  903. SA3 A2+B1
  904. SA4 RDF1
  905. AX3 30
  906. BX7 X4
  907. SB5 X3
  908. SA7 A3
  909. BX6 X1
  910. LX7 X2
  911. SA6 A2
  912. SA7 A1
  913. SA2 X7
  914. SA5 A1
  915. JP B5
  916.  
  917.  
  918. RDF2 SA1 X5+.TL ADVANCE LIBRARY NUMBER
  919. SX6 X1+B1
  920. SA6 A1
  921. RDF3 RJ RDF1 START READ
  922. READW X2,WSA,WSAL
  923. NG X1,RDF16 IF EOF
  924. SA5 RDFA SET EOR INDICATOR
  925. BX6 X1
  926. SA6 RDFC
  927. SB7 WSA
  928. EQ B6,B7,RDF2 IF ZERO LENGTH RECORD
  929.  
  930. * CHECK PROGRAM TYPE AND MAKE ENTRY INTO THE PROGRAM NAME TABLE.
  931.  
  932. SX1 B6 LWA+1 OF DATA READ
  933. SX2 B7 FWA OF BUFFER (WSA)
  934. RJ SRT SET RECORD TYPE
  935. SA6 X5+B1
  936. BX1 X7
  937. BX7 X7-X7 CLEAR CHECKSUM WORD
  938. SA7 A6+B1
  939. MX0 -6 CHECK RECORD TYPE
  940. BX4 -X0*X6
  941. SB4 X4
  942. SB2 ODRT TYPE = OPLD
  943. SA4 X5+.TU
  944. ZR X4,RDF5 IF ULIB .EQ. 0
  945. EQ B4,B2,RDF4 IF REC TYPE .EQ. OPLD
  946. BX7 X4 SET UP ULIB IN TABLE ENTRY
  947. SA7 A7+B1
  948. EQ RDF6 CONTINUE PROCESSING THE ENTRY
  949.  
  950. RDF4 BX7 X7-X7 ZERO OUT ULIB
  951. SA7 A7+B1
  952. SA7 X5+.TU
  953. EQ RDF6 CONTINUE PROCESSING THE ENTRY
  954.  
  955. RDF5 SB2 ULRT CHECK RECORD TYPE
  956. NE B4,B2,RDF6 IF REC TYPE .NE. ULIB
  957. MX0 7*6 SAVE ULIB
  958. BX7 X0*X6
  959. SA7 A7+B1 SET ULIB IN TABLE ENTRY
  960. SA7 X5+.TU
  961. RDF6 RJ SFN SPACE FILL NAME
  962. AX5 54
  963. SB5 X5
  964. SA6 RDFF+X5
  965. MESSAGE A6-B5,B1
  966. SA5 A5
  967. CALL CCM,X5,,WSA
  968. SA5 RDFA
  969. SA1 RDFC
  970. NZ X1,RDF7 IF EOR READ
  971. SX1 WSA+WSAL
  972. RDF7 CALL CCS,X5,B3,X1
  973. SA1 RDFC
  974. NZ X1,RDF11 IF EOR READ
  975.  
  976. * READ REST OF RECORD.
  977.  
  978. RDF8 RJ RDF1
  979. READW X2,WSA,WSAL
  980. BX6 X1 SET INDICATOR
  981. SA6 RDFC
  982. SX4 B6-WSA
  983. ZR X4,RDF11 IF NO DATA
  984. PL X1,RDF9 IF NO EOF
  985. SX1 B6+ SET LWA+1
  986. RDF9 NZ X1,RDF10 IF EOR OR EOF READ
  987. SX1 WSA+WSAL
  988. RDF10 CALL CCS,X5,WSA,X1
  989. SA1 RDFC
  990. ZR X1,RDF8 IF NOT EOR READ
  991.  
  992. * ADD ENTRY TO PROGRAM NAME TABLE.
  993.  
  994. RDF11 SA5 RDFA
  995. SB2 P.CMT
  996. SB3 X5+ENTL+1
  997. SA1 X5+.CL CHECK COMMENT LENGTH
  998. MX7 0
  999. BX6 X1
  1000. ZR X1,RDF15 IF NO COMMENTS
  1001. SA4 N.CMT
  1002. SA2 B2+B1
  1003. BX7 X6-X4 CHECK LENGTH OF PREVIOUS ENTRY
  1004. SA6 A4
  1005. NZ X7,RDF13
  1006. SA3 B2
  1007. SB4 B0
  1008. IX1 X2-X4 (L.CMT) - (N.CMT)
  1009. SB6 X4
  1010. IX7 X3+X1
  1011. RDF12 EQ B4,B6,RDF14 IF SAME COMMENTS
  1012. SA3 B3+B4
  1013. SA4 X7+B4
  1014. BX1 X3-X4 COMPARE COMMENTS
  1015. SB4 B4+B1
  1016. ZR X1,RDF12 IF MATCH
  1017. RDF13 LX6 2
  1018. SA6 A6+B1
  1019. CALL ADD,B2,B3
  1020. RDF14 SA1 A2+B1 SAVE COMMENT TABLE INDEX
  1021. IX7 X2-X1
  1022. LX1 18 INSERT COMMENT LENGTH
  1023. BX7 X1+X7
  1024. RDF15 SB3 B3-ENTL
  1025. SA5 B3+B1 FOLD CHECKSUM
  1026. MX0 -12
  1027. BX1 -X0*X5
  1028. AX5 12
  1029. BX6 -X0*X5
  1030. IX1 X1+X6
  1031. AX5 12
  1032. BX6 -X0*X5
  1033. IX1 X1+X6
  1034. AX5 12
  1035. BX6 -X0*X5
  1036. IX1 X1+X6
  1037. AX5 12
  1038. BX6 -X0*X5
  1039. IX1 X1+X6
  1040. IX6 X1+X0
  1041. BX6 -X0*X6
  1042. LX6 48
  1043. BX6 X6+X7 MERGE FOLDED CHECKSUM AND COMMENT LENGTH
  1044. SA6 A5
  1045. SA5 RDFA
  1046. AX5 30
  1047. CALL ADD,X5,B3
  1048. EQ RDF3 LOOP TO EOF
  1049.  
  1050. * WAIT FOR EOF ON BOTH FILES.
  1051.  
  1052. RDF16 SA1 RDFB
  1053. NZ X1,RDFX IF BOTH FILES FINISHED - RETURN
  1054. SX6 B1 SET EOF FLAG
  1055. SA6 A1
  1056. SA5 RDFA
  1057. AX5 54
  1058. SA1 =H*END FILE.*
  1059. BX6 X1
  1060. SA6 RDFF+X5
  1061. MESSAGE RDFF,1
  1062. RDF17 RJ RDF1 WAIT FOR 2ND FILE TO COMPLETE
  1063. EQ RDF17
  1064.  
  1065. RDFA VFD 6/1,24/P.OPT,30/RDFD
  1066. VFD 6/2,24/P.NPT,30/RDFE
  1067. EQ RDF3
  1068.  
  1069. RDFB DATA 0 EOF INDICATOR
  1070. RDFC DATA 0 EOR INDICATOR
  1071.  
  1072. * FILE PARAMETER AREA.
  1073.  
  1074. RDFD BSS 0 OLD FILE PARAMETER LIST
  1075.  
  1076. LOC 0
  1077. .PN CON OLD OLD FILE FET FET ADDRESS
  1078. .PD VFD 42/,12/,6/ 42/PROGRAM,12/LIB,6/TYPE
  1079. .CS CON 0 30/CHECKSUM,30/COMMENT INDEX
  1080. .UN CON 0 USER LIBRARY NAME
  1081. .RL CON 0 RECORD LENGTH
  1082. .DT CON 0 DATE
  1083. ERRNZ *-ENTL-1 NPT/OPT TABLE LENGTH ERROR
  1084.  
  1085. .CM BSSZ 13 COMMENT TEXT
  1086. .CL CON 0 COMMENT LENGTH
  1087. .TL CON 1 CURRENT LIBRARY NUMBER OF FILE
  1088. .TU CON 0 SAVE AREA FOR CURRENT ULIB
  1089.  
  1090. FPAL BSS 0 FILE PARAMETER LENGTH
  1091. LOC *O
  1092.  
  1093. RDFE BSS 0 NEW FILE PARAMETER LIST
  1094.  
  1095. LOC 0
  1096. .PN CON NEW NEW FILE FET ADDRESS
  1097. .PD VFD 42/,12/,6/ 42/PROGRAM,12/LIB,6/TYPE
  1098. .CS CON 0 30/CHECKSUM,30/COMMENT INDEX
  1099. .UN CON 0 USER LIBRARY NAME
  1100. .RL CON 0 RECORD LENGTH
  1101. .DT CON 0 DATE
  1102. ERRNZ *-ENTL-1 NPT/OPT TABLE LENGTH ERROR
  1103.  
  1104. .CM BSSZ 13 COMMENT TEXT
  1105. .CL CON 0 COMMENT LENGTH
  1106. .TL CON 1 CURRENT LIBRARY NUMBER OF FILE
  1107. .TU CON 0 SAVE AREA FOR CURRENT ULIB
  1108.  
  1109. FPAL BSS 0 FILE PARAMETER LENGTH
  1110. LOC *O
  1111.  
  1112. * DISPLAY MESSAGE.
  1113.  
  1114. RDFF DATA H*READING *
  1115. DATA 10H
  1116. DATA 10H
  1117. DATA 0
  1118. RDA SPACE 4
  1119. ** RDA - READ DATA.
  1120. *
  1121. * PROCESSES CALLS TO READ WORDS (RDW=).
  1122. * DEBLOCKS DATA IF CONTROL WORD READS.
  1123. *
  1124. * USES A - 1, 3, 6, 7.
  1125. * B - 5, 6, 7.
  1126. * X - 1, 3, 4, 6, 7.
  1127. *
  1128. * CALLS RDW=.
  1129.  
  1130.  
  1131. RDA5 SX6 B5-B7 UPDATE WORDS REMAINING
  1132. SA6 A1
  1133. RJ RDW= READ WORDS
  1134.  
  1135. RDA SUBR ENTRY/EXIT
  1136. RDA1 SA1 X2-2 GET NUMBER OF WORDS BEFORE CONTROL WORD
  1137. SB5 X1+
  1138. PL X1,RDA2 IF NOT FIRST READ
  1139. SX7 B7+ SET WORDS NEEDED
  1140. SA7 RDAA
  1141. JP RDA4
  1142.  
  1143. RDA2 GE B5,B7,RDA5 IF ENOUGH DATA TO FILL BUFFER
  1144. SA3 X2-1 CHECK EOR FLAG
  1145. PL X3,RDA3 IF NOT EOR ON FILE
  1146. MX6 1 SET NEW READ FLAG
  1147. SB7 B5+B1 SET WORDS TO READ
  1148. SA6 A3
  1149. SA6 A1
  1150. RJ RDW= READ WORDS
  1151. SA1 B6-B1 CHECK CONTROL WORD
  1152. AX1 48
  1153. SX6 X1-17B
  1154. MX1 -1
  1155. SB6 B6-B1 BACK UP LAST WORD ADDRESS
  1156. ZR X6,RDA IF *EOF* CONTROL WORD
  1157. SX1 B6 SET *EOR* INDICATION
  1158. EQ RDAX RETURN
  1159.  
  1160. RDA3 SX6 B7-B5 SAVE ADDITIONAL WORDS NEEDED
  1161. SA6 RDAA
  1162. SB7 B5+B1 SET WORDS TO TRANSFER
  1163. RJ RDW= READ WORDS
  1164. SB6 B6-1 BACK UP OVER LAST CONTROL WORD
  1165. RDA4 SB7 B1 READ CONTROL WORD
  1166. RJ RDW=
  1167. NG X1,RDA IF EOF/EOI
  1168. SB6 B6-B1 BACK UP WORKING BUFFER
  1169. SA1 B6 CONTROL WORD
  1170. SX7 5
  1171. SX4 X1+4 ROUND UP
  1172. AX1 36 EXTRACT BLOCK SIZE
  1173. SX3 X1
  1174. IX7 X4/X7 WORDS IN BLOCK
  1175. IX6 X7-X3 SAVE EOR FLAG
  1176. SA7 X2-2 STORE WORD COUNT
  1177. SA6 X2-1 EOR FLAG
  1178. SA1 RDAA RESET WORDS NEEDED
  1179. SB7 X1
  1180. JP RDA1 LOOP
  1181.  
  1182. RDAA CON 0
  1183. CDT SPACE 4
  1184. ** CDT - CHECK DEVICE TYPE.
  1185. *
  1186. * ENTRY (X1) = (FET+1).
  1187. *
  1188. * EXIT (X7) = 0, IF CONTROL WORD READ/WRITE NOT SUPPORTED
  1189. * ON DEVICE.
  1190. *
  1191. * USES A - 2.
  1192. * X - 0, 1, 2, 6, 7.
  1193.  
  1194.  
  1195. CDT2 LX1 12 CHECK *TT*
  1196. BX6 -X0*X1
  1197. SX7 X6-2RTT
  1198.  
  1199. CDT SUBR ENTRY/EXIT
  1200. MX0 -12
  1201. PL X1,CDT2 IF ALLOCATABLE
  1202. LX1 12
  1203. SA2 CDTA SEARCH DEVICE TABLE
  1204. SX7 0 ASSUME NO FIND
  1205. CDT1 ZR X2,CDTX IF NOT FOUND - RETURN
  1206. BX6 X1-X2
  1207. AX2 12
  1208. BX6 X2*X6
  1209. SA2 A2+B1
  1210. NZ X6,CDT1 IF NOT MATCH
  1211. SX7 1 INDICATE CONTROL WORD POSSIBLE
  1212. EQ CDTX RETURN
  1213.  
  1214. CDTA VFD 36/,12/7703B,12/4002B
  1215. VFD 36/,12/7703B,12/4102B
  1216. VFD 36/,12/7777B,12/2RMT+4000B
  1217. VFD 36/,12/7777B,12/2RNT+4000B
  1218. VFD 36/,12/7777B,12/2RCT+4000B
  1219. VFD 36/,12/7777B,12/2RAT+4000B
  1220. CON 0
  1221. IDT SPACE 4
  1222. ** IDT - ISSUE UNKNOWN DEVICE MESSAGE.
  1223. *
  1224. * ENTRY (A1) = FET ADDRESS + 1.
  1225. * (X7) = 0.
  1226. *
  1227. * EXIT TO ABT.
  1228. *
  1229. * USES A - 1, 7.
  1230. * B - 4.
  1231. * X - 0, 1, 2, 3, 4, 6, 7.
  1232. *
  1233. * CALLS MSG=.
  1234.  
  1235.  
  1236. IDT MX0 42
  1237. SA1 A1-B1 READ FILE NAME
  1238. MX3 26+10
  1239. BX6 X0*X1
  1240. MX2 6
  1241. LX3 59 POSITION LEGAL CHARACTER MASK
  1242. BX1 X1-X1
  1243. MX0 -6
  1244. IDT1 LX7 6
  1245. BX7 X7+X1 ASSEMBLE FILE NAME
  1246. LX6 6
  1247. BX1 -X0*X6
  1248. SB4 X1 FIND END OF FILE NAME
  1249. LX4 B4,X3
  1250. NG X4,IDT1 IF NOT END OF NAME
  1251. LX7 6
  1252. SX1 1R. ADD *.* TO FILE NAME
  1253. BX7 X7+X1
  1254. + LX7 6 LEFT JUSTIFY ASSEMBLY
  1255. BX6 X2*X7
  1256. ZR X6,* IF NOT LEFT JUSTIFIED
  1257. SA7 IDTB
  1258. MESSAGE IDTA
  1259. CALL ABT
  1260.  
  1261. IDTA DATA 30H UNKNOWN DEVICE TYPE -- LFN =
  1262. IDTB CON 0
  1263. WPH SPACE 4
  1264. ** WPH - WRITE PAGE HEADER.
  1265. *
  1266. * EXIT PAGE HEADER WRITTEN.
  1267. *
  1268. * USES A - 1, 2, 6, 7.
  1269. * X - 0, 1, 2, 6, 7.
  1270. *
  1271. * CALLS C6S, WTW=.
  1272.  
  1273.  
  1274. WPH SUBR ENTRY/EXIT
  1275. SA2 PNUM
  1276. SX6 X2+B1 ADVANCE PAGE NUMBER
  1277. SA6 A2
  1278. CALL C6S,A2,WPHA
  1279. LX6 36
  1280. MX0 -24
  1281. SA1 WPHA+1
  1282. BX6 -X0*X6 INSERT PAGE NUMBER
  1283. IX7 X1+X6
  1284. SA7 CRPG
  1285. WRITEW O,WPHB,WPHD
  1286. SX6 3 SET LINE COUNT
  1287. SA6 LINE
  1288. EQ WPHX RETURN
  1289.  
  1290. WPHA BSS 1 CONVERTED PAGE NUMBER
  1291. CON 6LPAGE
  1292.  
  1293. WPHB DATA H*1 VFYLIB. OLD FILE = XXXXXXX N*
  1294. DATA H*EW FILE = XXXXXXX *
  1295. CRDT CON 0 CURRENT DATE
  1296. CRTM CON 0 CURRENT TIME
  1297. DATA 10H
  1298. CRPG CON 0 CURRENT PAGE
  1299. CON 0
  1300.  
  1301. WPHC DATA H*0 RECORD TYPE ULIB LIB*
  1302. DATA C* DATE COMMENT*
  1303. WPHD EQU *-WPHB
  1304. SPACE 4
  1305. ** SMT - SEARCH MANAGED TABLE.
  1306. *
  1307. * ENTRY (B2) = ADDRESS OF TABLE POINTER.
  1308. * (B3) = ADDRESS OF ENTRY.
  1309. * (B4) = ADDRESS OF MASK.
  1310. * (B5) = INDEX INTO TABLE.
  1311. *
  1312. * EXIT (B6) = ADDRESS OF ADDRESS OF ENTRY IF FOUND.
  1313. * (B6) = ADDRESS OF 0 IF NOT FOUND.
  1314. * (X6) = ADDRESS OF ENTRY, IF FOUND.
  1315. * = 0, IF NOT FOUND.
  1316. *
  1317. * USES A - 1, 2, 3, 4, 5, 6.
  1318. * B - 2, 3, 4, 7.
  1319. * X - ALL.
  1320.  
  1321.  
  1322. SMT SUBR ENTRY/EXIT
  1323. SA1 B2 SET TABLE POINTER
  1324. SA2 A1+B1 SET TABLE LENGTH
  1325. SA3 A2+B1 SET NUMBER OF WORDS/ENTRY
  1326. SA4 B3 (X4) = ENTRY
  1327. SB2 X1 (B2) = FWA TABLE
  1328. SB7 X2+B2 (B7) = LWA TABLE
  1329. SB3 X3 (B3) = WORDS/ENTRY
  1330. SA5 B4 (X5) = MASK
  1331. MX0 7*6
  1332. SMT1 EQ B2,B7,SMT2 IF END OF TABLE
  1333. SA1 B2+B5
  1334. BX6 X4-X1
  1335. BX6 X5*X6
  1336. SB2 B2+B3
  1337. NZ X6,SMT1 IF NOT FOUND
  1338. SA2 A4+2 CHECK ULIB
  1339. SB4 B2-B3
  1340. SA3 B4+2
  1341. BX7 X2-X3
  1342. BX7 X0*X7
  1343. NZ X7,SMT1 IF DIFFERENT ULIB
  1344. SX6 B4
  1345. SA6 B6
  1346. EQ SMTX RETURN
  1347.  
  1348. SMT2 SX6 B0 SET NOT FOUND
  1349. SA6 B6
  1350. EQ SMTX RETURN
  1351.  
  1352. SMTA CON 0
  1353. SPACE 4
  1354. ** TABLE POINTERS.
  1355.  
  1356.  
  1357. TABLE TABLE OPT,ENTL
  1358. TABLE NPT,ENTL
  1359. TABLE CMT,7
  1360. TABLE BUF UNUSED STORAGE TABLE
  1361. COMMON TITLE COMMON DECKS AND STORAGE ALLOCATION.
  1362. SPACE 4
  1363. ** COMMON DECKS.
  1364.  
  1365.  
  1366. *CALL COMCCIO
  1367. *CALL COMCCOD
  1368. *CALL COMCCPT
  1369. *CALL COMCRDW
  1370. *CALL COMCSFN
  1371. *CALL COMCSRT
  1372. *CALL COMCSYS
  1373. *CALL COMCWTC
  1374. *CALL COMCWTW
  1375. PRESET TITLE VFYLIB PRESET.
  1376. PRS SPACE 4,20
  1377. ** PRS - PRESET VFYLIB.
  1378. *
  1379. * ENTRY (A0) - FL.
  1380. *
  1381. * EXIT (LL) = LINE LIMIT.
  1382. * (PD) = PRINT DENSITY.
  1383. * (CFL) = CURRENT FIELD LENGTH.
  1384. * (MFL) = MAXIMUM FIELD LENGTH.
  1385. * (CRDT) - CURRENT DATE.
  1386. * (CRTM) - CURRENT TIME.
  1387. *
  1388. * USES A - 6, 7.
  1389. * B - 6, 7.
  1390. * X - 6, 7.
  1391. *
  1392. * MACROS CLOCK, DATE, GETPP, MEMORY.
  1393.  
  1394. USE // FORCE LITERALS
  1395.  
  1396. PRS SUBR ENTRY/EXIT
  1397. MEMORY CM,MFL,R MAXIMUM FIELD LENGTH
  1398. DATE CRDT SET DATE
  1399. CLOCK CRTM SET TIME
  1400. GETPP BUF,LL,PD GET PAGE SIZE PARAMETERS
  1401. SX7 A0-BUF SET LENGTH OF TABLES
  1402. SX6 A0 CURRENT FIELD LENGTH
  1403. SA7 L.BUF
  1404. SA6 CFL
  1405. EQ PRSX RETURN
  1406. SPACE 4,10
  1407. * COMMON DECKS.
  1408.  
  1409.  
  1410. *CALL COMCCPM
  1411. *CALL COMCSTF
  1412.  
  1413. ERRPL *-OUTB OVERFLOW INTO OUTPUT BUFFER
  1414. BUFFERS SPACE 4,10
  1415. ** BUFFER ALLOCATION.
  1416.  
  1417.  
  1418. OUTPUTB EQU PRS OUTPUT WORKING BUFFER
  1419. OUTPUTL EQU 14
  1420. WSA EQU OUTPUTB+OUTPUTL WORKING BUFFER
  1421. WSAL EQU 1000B LENGTH OF WORKING STORAGE
  1422. OUTB EQU WSA+WSAL OUTPUT BUFFER
  1423. OLDB EQU OUTB+OUTL OLD BUFFER
  1424. NEWB EQU OLDB+OLDL NEW BUFFER
  1425. BUF EQU NEWB+NEWL START OF MANAGED TABLES
  1426. MFL= EQU BUF+MINBL+200000B
  1427. END SPACE 4,10
  1428. END