User Tools

Site Tools


cdc:nos2.source:opl871:libedit

LIBEDIT

Table Of Contents

  • [00009] LIBEDIT - LIBRARY EDITING PROGRAM.
  • [00011] LIBRARY EDITING PROGRAM.
  • [00174] INPUT DIRECTIVES.
  • [00340] TABLE STRUCTURE.
  • [00463] MACRO DEFINITIONS.
  • [00471] CALL - SUBROUTINE CALL.
  • [00497] ADDWRD - ADD WORD TO MANAGED TABLE.
  • [00508] TABLE - DEFINE MANAGED TABLE POINTERS.
  • [00531] SEARCH - SEARCH FOR ENTRY IN MANAGED TABLE.
  • [00551] READW - REDEFINE READ WORDS MACRO TO USE CONTROL WORDS.
  • [00563] WRCW - WRITE WORKING STORAGE WITH CONTROL WORDS.
  • [00576] LIBRARY EDITING PROGRAM.
  • [00866] DIRECTIVE CARD PROCESSING.
  • [00867] RDC - READ DIRECTIVES.
  • [01009] RET - RETURN FOR PROCESSING DUPLICATE FIELD.
  • [01059] ERR - ERROR DETECTED IN DIRECTIVE SCAN.
  • [01122] LST - LIST DIRECTIVE.
  • [01599] SUBROUTINES.
  • [01600] ABT - ABORT JOB.
  • [01611] ADD - ADD WORD(S) TO MANAGED TABLE.
  • [01701] AFN - ASSEMBLE FILE NAME.
  • [01751] APN - ASSEMBLE PROGRAM NAME.
  • [01835] BID - BUILD IMPLIED DELETE TABLE.
  • [02005] CAP - COPY ADDED PROGRAMS.
  • [02061] CCM - COPY COMMENT ONTO FILE *NEW*.
  • [02260] CFN - CONVERT FILE NAME.
  • [02291] CIT - CHECK IGNORE TABLE.
  • [02354] COB - CLEAR OUTPUT BUFFER.
  • [02371] CNO - COPY *NEW* TO *OLD*.
  • [02432] CNR - CHECK NO REPLACE TABLE.
  • [02460] CPL - COPY USER LIBRARY.
  • [02517] CPP - COPY SPECIFIED PROGRAM(S).
  • [02698] CPY - COPY RECORD TO FILE NEW.
  • [02835] CRR - CHECK RECORDS REPLACED.
  • [03042] C6S - CONVERT 6 DIGITS WITH LEADING ZERO SUPPRESSION.
  • [03075] DIS - DISPLAY MESSAGE.
  • [03098] EPN - ENTER PROGRAM NAME IN NEW PROGRAM TABLE.
  • [03115] GUL - GENERATE USER LIBRARY (*LIBGEN* CALL).
  • [03167] ILO - INTERPRET LIST OPTIONS.
  • [03209] LIT - LIST IGNORE TABLE.
  • [03308] LOL - LIST ONE LINE.
  • [03397] MSG - SEND DAYFILE MESSAGE.
  • [03432] IDT - ISSUE INCORRECT DEVICE MESSAGE.
  • [03475] OCC - OUTPUT COMMENT DIRECTIVE.
  • [03534] ODP - OUTPUT DELETED PROGRAM.
  • [03569] OIC - OUTPUT INSERT DIRECTIVE.
  • [03690] ORW - OUTPUT RECORDS WRITTEN ON FILE *NEW*.
  • [03738] OSB - OUTPUT STRING BUFFER.
  • [03784] OZR - OUTPUT ZERO LENGTH RECORD.
  • [03812] RCF - READ ALL CORRECTION FILES.
  • [03951] RFN - REPLACE FILE NAME.
  • [03982] RNP - RENAME PROGRAM.
  • [04025] RWF - REWIND ALL FILES.
  • [04083] RWS - REWIND SEQUENTIAL FILES.
  • [04128] SMT - SEARCH MANAGED TABLE.
  • [04170] STB - SET TITLE BUFFER.
  • [04219] SUL - SKIP USER LIBRARY.
  • [04268] SUM - SET *ULIB* MODE.
  • [04307] VFY - CALL VFYLIB TO VERIFY *OLD* AND *NEW*.
  • [04346] WPD - WRITE PROGRAM DIRECTORY.
  • [04430] BUFFERS.
  • [04584] RDA - READ DATA.
  • [04659] WDA - WRITE DATA WITH CONTROL WORDS.
  • [04724] RCW - RESTORE CONTROL WORD WRITE.
  • [04753] CVD - CHECK DEVICE TYPE.

Source Code

LIBEDIT.txt
  1. IDENT LIBEDIT,LIBEDIT,LIBEDIT
  2. ABS
  3. ENTRY LIBEDIT
  4. ENTRY SSM=
  5. ENTRY MFL=
  6. SYSCOM B1
  7. *COMMENT LIBEDIT - LIBRARY EDITING PROGRAM.
  8. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  9. TITLE LIBEDIT - LIBRARY EDITING PROGRAM.
  10. SPACE 4
  11. *** LIBEDIT - LIBRARY EDITING PROGRAM.
  12. * D. A. CAHLANDER. 69/02/13.
  13. * P. D. HAAS. 73/07/29.
  14. SPACE 4,10
  15. *** LIBEDIT PROVIDES EDITING AND REPLACEMENT OF RECORDS ON
  16. * A BINARY FILE BY RECORDS FROM ONE OR MORE SECONDARY FILES.
  17. SPACE 4
  18. *** COMMAND CALL -
  19. *
  20. * LIBEDIT(P1,P2,P3,P4,.....,PN)
  21. *
  22. * WHERE PARAMETER KEYWORDS ARE ORDER INDEPENDENT,
  23. * AND ARE ONE OR MORE OF THE FOLLOWING -
  24. *
  25. * I OMITTED, USE *INPUT* FOR INPUT DIRECTIVES FILE.
  26. * I , USE *INPUT* FOR INPUT DIRECTIVES FILE.
  27. * I=0 , NO INPUT DIRECTIVE FILE IS TO BE USED.
  28. * I=FN , USE *FN* FOR INPUT DIRECTIVES FILE.
  29. *
  30. * P OMITTED, USE *OLD* FOR OLD FILE.
  31. * P , USE *OLD* FOR OLD FILE.
  32. * P=0 , NO OLD FILE TO BE USED.
  33. * P=FN , USE *FN* FOR OLD FILE.
  34. *
  35. * N OMITTED, USE *NEW* FOR NEW FILE.
  36. * N , USE *NEW* FOR NEW FILE.
  37. * N=FN , USE *FN* FOR NEW FILE.
  38. *
  39. * B OMITTED, USE *LGO* FOR CORRECTION FILE.
  40. * B , USE *LGO* FOR CORRECTION FILE.
  41. * B=0 , NO CORRECTION FILE TO BE USED.
  42. * B=FN , USE *FN* FOR CORRECTION FILE.
  43. *
  44. * L OMITTED, USE *OUTPUT* FOR LISTING FILE.
  45. * L , USE *OUTPUT* FOR LISTING FILE.
  46. * L=0 , NO LISTING FILE TO BE WRITTEN.
  47. * L=FN , USE *FN* FOR LISTING FILE.
  48. *
  49. * LO=E , LIST PROCESSING ERRORS.
  50. * LO=C , LIST INPUT DIRECTIVES.
  51. * LO=M , LIST MODIFICATIONS MADE.
  52. * LO=N , LIST RECORDS WRITTEN TO NEW FILE.
  53. * LO=F , FULL LIST INCLUDING PROCESSING ERRORS, INPUT
  54. * DIRECTIVES, MODIFICATIONS MADE AND RECORDS
  55. * WRITTEN TO NEW FILE.
  56. * (NOTE - ANY COMBINATION MAY BE SPECIFIED FOR *LO*.)
  57. *
  58. * LO OMITTED ---
  59. * LO=EM , TIME SHARING JOB, LISTING FILE ASSIGNED
  60. * TO EQUIPMENT *TT*.
  61. * LO=ECF , ALL OTHER CASES.
  62. *
  63. * U OMITTED, NO USER LIBRARY TO BE GENERATED.
  64. * U , GENERATE USER LIBRARY *ULIB* ON FILE *NEW*.
  65. * U=0 , NO USER LIBRARY TO BE GENERATED.
  66. * U=LN , GENERATE USER LIBRARY *LN* ON FILE *NEW*.
  67. * (NOTE - *LIBGEN* IS CALLED TO GENERATE USER LIBRARY.)
  68. *
  69. * NX OMITTED, PASS *NX=0* TO *LIBGEN*.
  70. * NX , PASS *NX=1* TO *LIBGEN*.
  71. * NX=0 , PASS *NX=0* TO *LIBGEN*.
  72. * NX=N , PASS *NX=N* TO *LIBGEN*.
  73. *
  74. * C OMITTED, DO NOT RECOPY NEW FILE TO OLD FILE.
  75. * C , RECOPY NEW FILE TO OLD FILE AFTER EDITING.
  76. *
  77. * D , SAME AS *NA* (INCLUDED FOR UPWARD COMPATABILITY).
  78. *
  79. * V OMITTED, DO NOT VERIFY OLD FILE AGAINST NEW FILE.
  80. * V , VERIFY NEW FILE AGAINST NEW FILE.
  81. * (NOTE - *VFYLIB* IS CALLED TO PERFORM THE VERIFY.)
  82. *
  83. * NA OMITTED, ABORT ON DIRECTIVE ERRORS.
  84. * NA , DO NOT ABORT ON DIRECTIVE ERRORS.
  85. * (NOTE - TIME SHARING JOBS WITH DIRECTIVE INPUT FILE
  86. * ASSIGNED TO *TT* SET *NA* AUTOMATICALLY.)
  87. *
  88. * NI OMITTED, INSERT NEW RECORDS FROM CORRECTION FILE AT EOF.
  89. * NI , DO NOT INSERT NEW RECORDS AT EOF.
  90. * (NOTE - ONLY THOSE RECORDS NOT RERERENCED BY ANY DIRECTIVE
  91. * ARE ADDED AT EOF. ANY DIRECTIVE SUCH AS *INSERT
  92. * *NOREP, OR *IGNORE TAKES PRECEDENCE.
  93. *
  94. * NR OMITTED, REWIND *OLD* AND *NEW* BEFORE AND AFTER EDITING.
  95. * NR , DO NOT REWIND *OLD* OR *NEW* FILES.
  96. *
  97. * Z OMITTED, NO DIRECTIVE INPUT ON COMMAND.
  98. * Z , GET DIRECTIVE INPUT FROM COMMAND.
  99. * (NOTE - *Z* PARAMETER WILL OVERRIDE *I* PARAMETER.)
  100. *
  101. *
  102. * SINCE THE *U* AND *V* OPTIONS ARE PERFORMED BY LOADING
  103. * DIFFERENT UTILITIES, IF BOTH ARE SPECIFIED, *U* WILL
  104. * TAKE PRECEDENCE.
  105. SPACE 4,10
  106. *** DAYFILE MESSAGES.
  107. *
  108. * * DIRECTIVE ERRORS.* = A *LIBEDIT* DIRECTIVE HAS INCORRECT
  109. * SYNTAX.
  110. *
  111. * * EDITING COMPLETE.* = INFORMATIVE MESSAGE INDICATING THAT
  112. * THE LIBRARY EDITING HAS COMPLETED.
  113. *
  114. * * FILE NAME CONFLICT.* = THE SAME FILE NAME HAS BEEN
  115. * SPECIFIED FOR MORE THAN ONE PARAMETER.
  116. *
  117. * * FILENAM NOT DECLARED NRANDOM.* = AN EOF WAS ENCOUNTERED
  118. * ON THE NONRANDOM FILE, FILENAM.
  119. *
  120. * * INCORRECT DEVICE TYPE - LFN.* = A NON-MASS STORAGE FILE WAS
  121. * INCORRECTLY SPECIFIED AS EITHER THE OLD FILE OR THE
  122. * CORRECTION FILE.
  123. *
  124. * * LIBEDIT ARGUMENT ERROR(S).* = THE *LIBEDIT* COMMAND
  125. * CONTAINS AN INCORRECT PARAMETER.
  126. *
  127. * * LIST OPTION ERROR.* = AN INCORRECT OPTION WAS SPECIFIED
  128. * FOR THE *LO* PARAMETER.
  129. *
  130. * * N DIRECTIVE ERRORS.* = *LIBEDIT* COULD NOT INTERPRET
  131. * N NUMBER OF DIRECTIVES.
  132. *
  133. * * N RECORDS NOT REPLACED.* = AN INFORMATIVE MESSAGE.
  134. * *LIBEDIT* ENCOUNTERED N NUMBER OF RECORDS ON A
  135. * REPLACEMENT FILE THAT WERE NOT NAMED IN THE DIRECTIVES
  136. * AND DID NOT REPLACE OLD FILE RECORDS.
  137. *
  138. * * NO NEW FILE.* = N=0 WAS INCORRECTLY SPECIFIED FOR THE
  139. * *N* PARAMETER.
  140. *
  141. * * OVERLAPPING INSERT OR DELETE.* = *LIBEDIT* ENCOUNTERED AN
  142. * OVERLAP IN THE RECORD NAMES SPECIFIED IN THE
  143. * DIRECTIVES.
  144. *
  145. * * RENAME NOT ALLOWED FOR PROC OR TEXT RECORD.* = ATTEMPT TO
  146. * RENAME A PROC OR TEXT TYPE RECORD WAS NOT ALLOWED.
  147. *
  148. * * REQUIRED FL EXCEEDS VALIDATED LIMIT.* = THE JOB FIELD
  149. * LENGTH REQUIRED FOR *LIBEDIT* IS GREATER THAN THE
  150. * MAXIMUM FOR WHICH THE USER IS VALIDATED.
  151. *
  152. SPACE 4
  153. **** ASSEMBLY CONSTANTS.
  154.  
  155.  
  156. BUFL EQU 4020B MINIMUM BUFFER REQUIRED
  157. DCBL EQU 16 DIRECTIVE BUFFER LENGTH
  158. INPL EQU 2010B *INPUT* *CIO* BUFFER LENGTH
  159. LGOL EQU 10021B *LGO* *CIO* BUFFER LENGTH
  160. NEWL EQU 20041B *NEW* *CIO* BUFFER LENGTH
  161. OLDL EQU 20041B *OLD* *CIO* BUFFER LENGTH
  162. OUTL EQU 4020B *OUTPUT* *CIO* BUFFER LENGTH
  163. SBUFL EQU 4020B *SCR* BUFFER LENGTH
  164. TTYL EQU 301B *TTYOUT* *CIO* BUFFER LENGTH
  165. TWIDE EQU 80+1 WIDTH LIMIT FOR TERMINAL OUTPUT
  166. ODEBL EQU 16
  167.  
  168. ****
  169.  
  170.  
  171. * SPECIAL ENTRY POINT.
  172.  
  173. SSM= EQU 0 SUPPRESS DUMPS OF FIELD LENGTH
  174. TITLE INPUT DIRECTIVES.
  175. *** INPUT DIRECTIVES.
  176. *
  177. * ON ALL DIRECTIVE DESCRIPTIONS, THE PARAMETERS ARE -
  178. * FN FILE NAME.
  179. * NAME RECORD NAME.
  180. * N NUMERIC PARAMETER.
  181. * ABCD ALPHANUMERIC PARAMETER.
  182. * TYPE LIBRARY TYPE - (MAY BE ONE OF THE FOLLOWING)
  183. * *ABS* ABSOLUTE PROGRAM.
  184. * *CAP* FAST DYNAMIC LOAD CAPSULES.
  185. * *OPL* OLD PROGRAM LIBRARY.
  186. * *OPLC* OLD PROGRAM LIBRARY COMMON DECK.
  187. * *OPLD* OPL DIRECTORY.
  188. * *OVL* SCOPE CPU OVERLAY PROGRAM.
  189. * *PP* PERIPHERAL PROCESSOR PROGRAM.
  190. * *PPL* 16-BIT PERIPHERAL PROCESSOR PROGRAM.
  191. * *PPU* 7600 PPU PROGRAM.
  192. * *PROC* PROCEDURE TYPE RECORD.
  193. * *REL* RELOCATABLE CPU PROGRAM.
  194. * *TEXT* UNRECOGNIZED AS A PROGRAM.
  195. * *ULIB* USER LIBRARY.
  196. *
  197. *
  198. * FOR THOSE DIRECTIVES REQUIRING RECORD NAME(S), THE
  199. * FOLLOWING CONVENTIONS ARE USED -
  200. *
  201. * RID RECORD IDENTIFIER
  202. * TYPE/NAME RECORD *NAME* OF TYPE *TYPE*.
  203. * NAME RECORD *NAME*, USING DEFAULT TYPE.
  204. * * EOF (USED ONLY WITH *BEFORE).
  205. *
  206. * GID RECORD GROUP IDENTIFIER
  207. * TYPE/NAME RECORD *NAME* OF TYPE *TYPE*.
  208. * NAME RECORD *NAME*, USING DEFAULT TYPE.
  209. * TYPE1/NAME1- GROUP OF RECORDS STARTING WITH
  210. * TYPE2/NAME2 *RID1* AND ENDING WITH *RID2*.
  211. * TYPE/NAME1- GROUP OF *TYPE* RECORDS STARTING WITH
  212. * NAME2 *NAME1* AND ENDING WITH *NAME2*.
  213. * NAME1-NAME2 GROUP OF DEFAULT TYPE RECORDS STARTING
  214. * WITH *NAME1* AND ENDING WITH *NAME2*.
  215. * TYPE/NAME-* ALL *TYPE* RECORDS STARTING WITH *NAME*
  216. * NAME-* ALL DEFAULT TYPE RECORDS STARTING
  217. * WITH *NAME*.
  218. * TYPE/* ALL RECORDS OF THE SPECIFIED *TYPE*.
  219. * * ALL DEFAULT TYPE RECORDS.
  220. * 0 ZERO LENGTH RECORD (USED ONLY
  221. * WITH *INSERT).
  222. *
  223. *
  224. * DIRECTIVES -
  225. *
  226. * *AFTER RID,GID1,GID2,....GIDN
  227. * *A RID,GID1,GID2,...,GIDN
  228. * *INSERT RID,GID1,GID2,...,GIDN
  229. * *I RID,GID1,GID2,...,GIDN
  230. * INSERT *GID1* THROUGH *GID2* FROM CURRENT CORRECTION
  231. * FILE AFTER *RID* ON FILE *NEW*.
  232. * (NOTE - ANY RECORDS ON *OLD* WITH SAME NAME ARE DELETED.)
  233. *
  234. * *BEFORE RID,GID1,GID2,...,GIDN
  235. * *B RID,GID1,GID2,...,GIDN
  236. * INSERT *GID1* THROUGH *GID2* FROM CURRENT CORRECTION
  237. * FILE BEFORE *RID* ON FILE *NEW*.
  238. * (NOTE - ANY RECORDS ON *OLD* WITH SAME NAME ARE DELETED.)
  239. *
  240. * *DELETE GID1,GID2,...,GIDN
  241. * *D GID1,GID2,...,GIDN
  242. * DELETE *GID1* THROUGH *GIDN*.
  243. *
  244. * *NAME TYPE
  245. * *TYPE TYPE
  246. * CHANGE DEFAULT RECORD TYPE TO *TYPE*.
  247. *
  248. * *ADD LIB,GID1,GID2,...,GIDN.
  249. * ADD *GID1* THROUGH *GIDN* AT END OF LIBRARY *LIB*.
  250. * *LIB* CAN BE ANY OF THE FOLLOWING -
  251. * 1. *DDS* DEADSTART LIBRARY.
  252. * 2. *MOV* MONITOR OVERLAY.
  253. * 3. *RPL* RESIDENT PERIPHERAL OVERLAY.
  254. * 4. *RSL* RESIDENT *SCOPE* LIBRARY.
  255. * 5. *SLD* *SCOPE* LIBRARY DIRECTORY.
  256. * 6. ANY NAME FROM *LIB1* TO *LIB9999*.
  257. * (A LIBRARY IS DEFINED AS A GROUP OF RECORDS
  258. * TERMINATED BY A ZERO-LENGTH RECORD.)
  259. *
  260. * *IGNORE GID1,GID2,...,GIDN
  261. * IGNORE *GID1* THROUGH *GIDN* WHEN READING CORRECTION
  262. * FILE(S). THESE RECORDS ARE NOT REPLACED.
  263. *
  264. * *RENAME RID1,RID2
  265. * CHANGE THE NAME OF *RID1* TO *RID2*.
  266. *
  267. * *REPLACE GID1,GID2,...GIDN
  268. * REPLACE ONLY *GID1* THROUGH *GIDN* WHEN READING CORRECTION
  269. * FILE. THE REST OF THE RECORDS ARE IGNORED.
  270. *
  271. * *LIBGEN UN
  272. * CALL *LIBGEN* AT END OF EDITING TO GENERATE USER LIBRARY
  273. * *UN* ON FILE *NEW*. IF *UN* IS OMITTED,
  274. * USE *UN* = *ULIB*.
  275. * (OVERRIDES *U* PARAMETER IF *UN* IS SPECIFIED).
  276. *
  277. * *OLD FN
  278. * USE *FN* AS OLD FILE (OVERRIDES *P* PARAMETER).
  279. *
  280. * *NEW FN
  281. * USE *FN* AS NEW FILE (OVERRIDES *N* PARAMETER).
  282. *
  283. * *LGO FN1,FN2,...,FNN
  284. * *FILE FN1,FN2,...,FNN
  285. * ADD *FN1* THROUGH *FNN* TO LIST OF CORRECTION FILES.
  286. *
  287. * *NOREP FN1,FN2,...,FNN
  288. * DO NOT REPLACE RECORDS FROM FILES *FN1* THROUGH *FNN*.
  289. *
  290. * *REWIND FN1,FN2,...,FNN
  291. * REWIND *FN1* THROUGH *FN2* BEFORE AND AFTER EDITING.
  292. *
  293. * *BUILD ABCD
  294. * BUILD AN *OPLD* INDEX AT THE END OF FILE *NEW*.
  295. * THE NAME GIVEN TO THIS RECORD IS *ABCD*.
  296. *
  297. * *COMMENT RID,ABCD
  298. * ADDS 70 CHARACTER COMMENT *ABCD* TO THE 7700
  299. * TABLE OF *RID* FROM *OLD* OR CORRECTION FILE.
  300. *
  301. * *DATE RID,ABCD
  302. * ADDS THE CURRENT DATE AND 70 CHARACTER COMMENT *ABCD*
  303. * TO THE 7700 TABLE OF *RID* FROM *OLD* OR CORRECTION FILE.
  304. *
  305. * *LIST FN,ABCD
  306. * CHANGES LISTING FILE TO *FN*, AND LIST OPTIONS TO *ABCD*
  307. * (SEE *LO* PARAMETER). IF EITHER PARAMETER IS OMITTED,
  308. * IT IS NOT CHANGED (OVERRIDES *L* AND *LO* PARAMETERS).
  309. *
  310. * *COPY
  311. * COPY *NEW* TO *OLD* AFTER EDITING
  312. * (EQUIVALENT TO *C* COMMAND PARAMETER).
  313. *
  314. * *DEBUG
  315. * IGNORE SUBSEQUENT DIRECTIVE ERRORS (EQUIVALENT TO
  316. * *NA* PARAMETER, SET AUTOMATICALLY IF OUTPUT ASSIGNED
  317. * TO EQUIPMENT *TT*.
  318. *
  319. * *NOINS
  320. * DO NOT INSERT UNREPLACEABLE RECORDS AT EOF.
  321. * (EQUIVALENT TO *NI* PARAMETER.)
  322. *
  323. * *NOREW
  324. * DO NOT REWIND *OLD* OR *NEW * FILES.
  325. * (EQUIVALENT TO *NR* PARAMETER)
  326. *
  327. * *VERIFY
  328. * *VFYLIB
  329. * VERIFY *NEW* AGAINST *OLD* AFTER EDITING.
  330. * (EQUIVALENT TO *V* PARAMETER, USES *VFYLIB*.)
  331. *
  332. * */ TEXT
  333. * COMMENT CARD, *TEXT* IS COPIED TO LISTING FILE.
  334. *
  335. *
  336. *
  337. * CARDS WITHOUT AN *** IN COLUMN 1 ARE TREATED AS A CONTINUATION
  338. * OF THE PREVIOUS CARD. IF NO CARD PRECEEDS THIS CARD,
  339. * (*BEFORE *,LIB/PN) IS ASSUMED.
  340. TITLE TABLE STRUCTURE.
  341. ** TABLE STRUCTURE.
  342. * ALL TABLES ARE VARIABLE LENGTH, MANAGED TABLES. POINTERS
  343. * TO THE TABLE ABC ARE
  344. * P.ABC = FWA OF TABLE ABC.
  345. * L.ABC = LENGTH OF TABLE ABC.
  346. * N.ABC = NUMBER OF WORDS/ENTRY.
  347. * D.ABC = NUMBER OF WORDS THE LENGTH OF TABLE IS
  348. * INCREASED IF TABLE IS FULL.
  349. *
  350. * FNT - NAME TABLE.
  351. * 42/FILE,18/RANDOM
  352. * 1. FILE = FILE NAME LEFT JUSTIFIED
  353. * 2. RANDOM = 0 IF FILE IS RANDOM.
  354. * RANDOM = CURRENT POSITION IF FILE IS NON RANDOM.
  355. *
  356. * PNT - PROGRAM NAME TABLE.
  357. *
  358. * 42/PROGRAM,18/TYPE
  359. * 42/FILE,18/0
  360. * 60/POSITION
  361. * 1. PROGRAM = PROGRAM NAME LEFT JUSTIFIED.
  362. * 2. TYPE = PROGRAM TYPE.
  363. * 0 = *TEXT*
  364. * 1 = *PP*
  365. * 3 = *REL* RELOCATABLE
  366. * 4 = *OVL* OVERLAY
  367. * 5 = *ULIB* USER LIBRARY
  368. * 6 = *OPL* OLD PROGRAM LIBRARY
  369. * 7 = *OPLC* OLD PROGRAM LIBRARY COMMON DECK
  370. * 8 = *OPLD* OPL DIRECTORY
  371. * 9 = *ABS* ABSOLUTE PROGRAM
  372. * 10 = *PPU* 7600 PPU PROGRAM
  373. * 14 = *CAP* FAST DYNAMIC LOAD CAPSULE
  374. * 16 = *PROC* PROCEDURE TYPE RECORD
  375. * 20 = *PPL* 16-BIT PP PROGRAM
  376. * 3. FILE = CORRECTION FILE NAME.
  377. * 4. POSITION = RANDOM INDEX.
  378. *
  379. * DPT - DELETE PROGRAM TABLE.
  380. *
  381. * 42/PROGRAM1,6/IP,12/TYPE
  382. * 42/PROGRAM2,6/0,12/TYPE
  383. * 1. PROGRAM1 = START OF DELETE.
  384. * 2. PROGRAM2 = END OF DELETE.
  385. * 3. IP = 0, IF DELETE NOT IN PROGRESS.
  386. * = 1, IF DELETE IN PROGRESS.
  387. *
  388. * IDT - IMPLIED DELETE TABLE.
  389. *
  390. * 42/PROGRAM, 18/TYPE
  391. * 42/FILE,18/0
  392. * 1. PROGRAM = PROGRAM DELETED IF PRESENT.
  393. * 2. TYPE = PROGRAM TYPE.
  394. * 3. FILE = CORRECTION FILE NAME.
  395. *
  396. * PIT - PROGRAM IGNORE TABLE.
  397. *
  398. * 42/FILE,18/0
  399. * 42/PROGRAM1,18/TYPE1
  400. * 42/PROGRAM2,18/TYPE2
  401. * 1. FILE = FILE NAME LEFT JUSTIFIED.
  402. * 2. PROGRAM1 = START OF IGNORE.
  403. * 3. PROGRAM2 = END OF IGNORE.
  404. *
  405. *
  406. * RFT - REWIND FILE TABLE.
  407. *
  408. * 42/FILE,18/0
  409. * 1. FILE = FILE NAME LEFT JUSTIFIED.
  410. *
  411. *
  412. * IPT - INSERT PROGRAM TABLE.
  413. *
  414. * 42/PROG1,1/BEFORE,17/TYPE1
  415. * 42/FILE,18/0
  416. * 42/PROG2,18/TYPE2
  417. * 42/PROG3,18/TYPE3
  418. * 1. PROG1 = PROGRAM NAME ON FILE *OLD*.
  419. * PROG1 = LIBRARY NUMBER OF FILE *OLD*.
  420. * 2. BEFORE = 0 IF INSERT AFTER PROG1.
  421. * BEFORE = 1 IF INSERT BEFORE PROG1.
  422. * 3. FILE = CORRECTION FILE NAME.
  423. * 4. PROG2 = PROGRAM NAME FOR START OF INSERT.
  424. * 5. PROG3 = PROGRAM NAME FOR END OF INSERT.
  425. *
  426. *
  427. * CDT - COMMENT AND DATE TABLE.
  428. *
  429. * 42/PROGRAM,1/DATE,17/TYPE
  430. * 60/COMMENT TEXT
  431. * 60/COMMENT TEXT
  432. * 60/COMMENT TEXT
  433. * 60/COMMENT TEXT
  434. * 60/COMMENT TEXT
  435. * 60/COMMENT TEXT
  436. * 60/COMMENT TEXT
  437. * 1. PROGRAM = PROGRAM NAME ON FILE *NEW*.
  438. * 2. DATE = 1 IF DATE IS INSERTED IN 7700 TABLE.
  439. * 3. COMMENT TEXT = 70-CHARACTERS OF TEXT.
  440. *
  441. *
  442. * NRT - NO REPLACE TABLE.
  443. *
  444. * 42/FILE,18/0
  445. * 1. FILE = FILE NAME LEFT JUSTIFIED.
  446. *
  447. *
  448. * NPT - NEW PROGRAM TABLE.
  449. *
  450. * 42/PROGRAM,18/TYPE
  451. * 60/POSITION
  452. * 1. PROGRAM = PROGRAM NAME.
  453. * 2. TYPE = PROGRAM TYPE.
  454. * 3. POSITION = RANDOM FILE INDEX.
  455. *
  456. *
  457. * RNT - RENAME TABLE.
  458. *
  459. * 42/PROG1,18/TYPE1
  460. * 42/PROG2,18/TYPE2
  461. * 1. PROG1 = OLD PROGRAM NAME.
  462. * 2. PROG2 = NEW PROGRAM NAME.
  463. TITLE MACRO DEFINITIONS.
  464. * MACROS.
  465.  
  466. *CALL COMCMAC
  467. *CALL COMCCMD
  468. *CALL COMSSRT
  469. *CALL COMSTCM
  470. SPACE 4
  471. ** CALL - SUBROUTINE CALL.
  472. * THIS MACRO SETS UP A STANDARD CALLING SEQUENCE.
  473. * CALL SUB,P1,P2,P3,P4,P5,P6
  474. * ENTRY SUB = SUBROUTINE NAME.
  475. * PI = ADDRESS OF I-TH PARAMETER.
  476. * PARAMETER ADDRESSES ARE PASSED IN B-REGISTERS (AS IN FORTRAN)
  477. * WITH THE FIRST PARAMETER ADDRESS IN B2, SECOND IN B3, ETC.
  478.  
  479.  
  480. CALL MACRO SUB,P1,P2,P3,P4,P5,P6
  481. IFC NE,$P1$$,1
  482. R= B2,P1
  483. IFC NE,$P2$$,1
  484. R= B3,P2
  485. IFC NE,$P3$$,1
  486. R= B4,P3
  487. IFC NE,$P4$$,1
  488. R= B5,P4
  489. IFC NE,$P5$$,1
  490. R= B6,P5
  491. IFC NE,$P6$$,1
  492. R= B7,P6
  493. ENDIF
  494. RJ SUB
  495. ENDM
  496. SPACE 4
  497. ** ADDWRD - ADD WORD TO MANAGED TABLE.
  498. * THIS MACRO SETS UP A CALL TO ADD AN ENTRY TO A MANAGED TABLE:
  499. * ADDWRD TABLE,ENTRY
  500. * ENTRY TABLE = NAME OF MANAGED TABLE.
  501. * ENTRY = ADDRESS OF ENTRY.
  502.  
  503.  
  504. ADDWRD MACRO TABLE,ENTRY
  505. CALL ADD,P.TABLE,ENTRY
  506. ENDM
  507. SPACE 4
  508. ** TABLE - DEFINE MANAGED TABLE POINTERS.
  509. * MANAGED TABLES HAVE 4 POINTERS ASSOCIATED WITH THEM:
  510. * (P.NAME) = FWA OF MANAGED TABLE.
  511. * (L.NAME) = LENGTH OF MANAGED TABLE.
  512. * (N.NAME) = NUMBER OF WORDS IN AN ENTRY.
  513. * (D.NAME) = NUMBER OF WORDS TABLE LENGTH IS INCREASED AT
  514. * A TIME.
  515. * TABLE NAME,WORD,DELTA
  516. * ENTRY NAME = NAME OF TABLE.
  517. * WORD = NUMBER OF WORDS/ENTRY.
  518. * DELTA = SIZE OF TABLE INCREASE (NUMBER OF ENTRIES).
  519.  
  520.  
  521. TABLE MACRO NAME,WORD,DELTA
  522. LOCAL NW,DW
  523. NW SET WORD 1
  524. DW SET DELTA 4
  525. P.NAME VFD 42D/0L_NAME,18D/BUF
  526. L.NAME VFD 60D/0
  527. N.NAME VFD 60D/NW
  528. D.NAME VFD 60D/NW*DW
  529. ENDM
  530. SPACE 4
  531. ** SEARCH - SEARCH FOR ENTRY IN MANAGED TABLE.
  532. * THIS MACRO SETS UP A CALL TO SEARCH FOR AN ENTRY
  533. * IN A MANAGED TABLE
  534. * SEARCH TABLE,ENTRY,MASK,INDEX,RETURN
  535. * ENTRY TABLE = NAME OF MANAGED TABLE.
  536. * ENTRY = ADDRESS OF ENTRY.
  537. * MASK = ADDRESS OF SEARCH MASK.
  538. * INDEX = INDEX INTO TABLE.
  539. * RETURN = ADDRESS OF RETURN PARAMETER.
  540.  
  541.  
  542. SEARCH MACRO TABLE,ENTRY,MASK,INDEX,RETURN
  543. SB2 P.TABLE
  544. SB3 ENTRY
  545. SB4 MASK =77777777777777777777B
  546. SB5 INDEX B0
  547. SB6 RETURN SMTA
  548. RJ SMT
  549. ENDM
  550. READW SPACE 4
  551. ** READW - REDEFINE READ WORDS MACRO TO USE CONTROL WORDS.
  552.  
  553.  
  554. PURGMAC READW
  555.  
  556. READW MACRO F,S,N
  557. R= B6,S
  558. R= B7,N
  559. R= X2,F
  560. RJ RDA
  561. ENDM
  562. WRCW SPACE 4
  563. ** WRCW - WRITE WORKING STORAGE WITH CONTROL WORDS.
  564.  
  565.  
  566. WRCW MACRO F,S,N,E
  567. R= B6,S
  568. R= B7,N
  569. R= X2,F
  570. RJ WDA
  571. IFC NE,*E**,2
  572. + NZ B7,*+1
  573. - RJ WDA
  574. ENDM
  575. TITLE
  576. ** LIBEDIT - LIBRARY EDITING PROGRAM.
  577. *
  578. * 1. FILE INPUT IS READ TO DETERMINE DIRECTIVES.
  579. * 2. ALL FILES WITH REWIND SELECTED ARE REWOUND.
  580. * 3. ALL CORRECTION FILES ARE READ TO DETERMINE PROGRAM
  581. * NAMES AND BUILD AN INDEX.
  582. * 4. CORRECTION FILES WITH REWIND SELECTED ARE REWOUND.
  583. * 5. FILE OLD IS READ.
  584. * 6. INSERT BEFORE IS CHECKED.
  585. * 7. IMPLIED DELETE IS CHECKED.
  586. * 8. REPLACEMENT IS CHECKED.
  587. * 9. INSERT AFTER IS CHECKED.
  588. * 10. FILE NEW IS WRITTEN.
  589. * 11. REPEAT STEPS 5.-11.
  590. * 12. COPY ADDED PROGRAMS ONTO *NEW*, IF APPLICABLE.
  591. * 13. REWIND ALL FILES WITH REWIND SELECTED.
  592. * 14. CALL *VFYLIB* IF VERIFY REQUESTED.
  593. * 15. CALL *LIBGEN* IF USER LIBRARY REQUESTED.
  594.  
  595.  
  596. ORG 104B
  597.  
  598. LIBEDIT BSS 0 ENTRY
  599. SB1 1 (B1) = CONSTANT ONE
  600. RJ PRS PRESET
  601. RJ RDC READ DIRECTIVES
  602. CALL RWF REWIND ALL FILES
  603. CALL RCF READ ALL CORRECTION FILES
  604. CALL RWS REWIND SEQUENTIAL CORRECTION FILES
  605. CALL BID BUILD IMPLIED DELETE TABLE
  606. SA2 CCPY
  607. SA1 P SET *OLD* IN HEADER
  608. NZ X2,LIB0 IF *C* OPTION
  609. SA2 CULB
  610. SA1 N SET *NEW* IN HEADER
  611. ZR X2,LIB0 IF NO *U* OPTION
  612. SA1 GULF SET *NEW* IN HEADER
  613. LIB0 MX0 42
  614. BX6 X0*X1
  615. SA6 LIBF+3
  616. SB6 B0+
  617. CALL STB,LIBF SET TITLE OF PAGE
  618. SB6 B1
  619. CALL STB,LIBG
  620. WRITECW N,* SET FILE STATUS
  621. SA4 N+4
  622. AX4 18
  623. SX6 X4 SET SECTOR WORD COUNT
  624. SA1 OLD
  625. SA6 N-1
  626. ZR X1,LIB19 IF NO FILE *OLD*
  627. OPEN A1,READNR,R
  628. SA1 P+1 CHECK DEVICE TYPE
  629. RJ CVD
  630. ZR X7,IDT IF INCORRECT DEVICE
  631. READCW P,17B
  632. LIB1 READW P,WSA,WSAL
  633. BX6 X1 SET EOR INDICATOR
  634. SA6 LIBA
  635. PL X1,LIB2 IF NOT EOF ON FILE *OLD*
  636. SB5 WSA
  637. EQ B5,B6,LIB19 IF NO DATA READ
  638. EQ LIB2.1 PROCESS DATA
  639.  
  640. LIB2 SA1 LIBA CHECK EOR INDICATOR
  641. NG X1,LIB19 IF EOF ON FILE OLD
  642. LIB2.1 SB6 WSA
  643. SB7 X1+
  644. EQ B6,B7,LIB17 IF 0-LENGTH RECORD
  645. SA1 P-LWP LWA+1 OF DATA TRANSFERED FROM OLD FILE
  646. SX2 WSA
  647. RJ SRT SET RECORD TYPE
  648. SA6 LIBB
  649. SA6 LIBH
  650. MX0 -18 CREATE -TYPE/*- PSEUDO-ENTRY
  651. SX7 1R*
  652. BX6 -X0*X6 EXTRACT RECORD TYPE
  653. LX7 54
  654. BX7 X7+X6 MERGE TYPE AND -*-
  655. SA7 LIBB+2
  656. SX3 X6-ODRT
  657. SA2 CULB
  658. BX4 X3+X2
  659. ZR X4,LIB19 IF OPLD AND NOT *ULIB* MODE
  660. ZR X2,LIB2.3 IF NOT *ULIB* MODE
  661. SA1 LIBA
  662. ZR X3,LIB2.2 IF OPLD
  663. SX4 X6-ULRT
  664. NZ X4,LIB2.3 IF NOT *ULIB* RECORD
  665. LIB2.2 NZ X1,LIB1 IF END OF RECORD
  666. READW P,WSA,WSAL
  667. EQ LIB2.2 SKIP RECORD
  668.  
  669. * CHECK INSERT BEFORE.
  670.  
  671. LIB2.3 SA1 LIBB SET SEARCH NAME
  672. MX6 1
  673. LX6 18
  674. BX6 X6+X1
  675. SA6 A1+B1
  676. LIB3 SEARCH IPT,(LIBB+1)
  677. ZR X6,LIB4 IF NO MORE INSERT BEFORE
  678. SA1 P.IPT SET IPT INDEX
  679. SX1 X1
  680. IX6 X6-X1
  681.  
  682. * INSERT PROGRAMS BEFORE SPECIFIED PROGRAM.
  683.  
  684. CALL CPP,X6
  685. EQ LIB3 CHECK FOR ANOTHER INSERT
  686.  
  687. * CHECK FOR DELETE.
  688.  
  689. LIB4 SEARCH DPT,LIBN,LIBP SEARCH FOR DELETE IN PROGRESS
  690. NZ X6,LIB6 IF DELETE IN PROGRESS
  691. SEARCH DPT,LIBB
  692. NZ X6,LIB5 IF START OF DELETE
  693. SEARCH DPT,LIBB+2 CHECK FOR -TYPE/*-
  694. SX7 X6
  695. BX6 X6-X6
  696. NZ X7,LIB6 IF DELETING ALL OF THIS TYPE
  697. SEARCH IDT,LIBB
  698. ZR X6,LIB9 IF PROGRAM IS NOT INSERTED
  699. SX6 B0
  700. EQ LIB6 ISSUE OUTPUT MESSAGE
  701.  
  702. LIB5 SA1 X6+B1 CHECK FOR /*DELETE NAME-*/ FORM
  703. SA2 LIBB+2
  704. BX7 X1-X2
  705. NZ X7,LIB5.1 IF NORMAL DELETE RANGE
  706. BX7 X1
  707. SA7 X6 UPDATE *DPT*
  708. BX6 X6-X6
  709. EQ LIB6 CONTINUE PROCESSING
  710.  
  711. LIB5.1 SA1 LIBP SET START OF DELETE
  712. SA2 X6
  713. BX7 -X1*X2
  714. SA3 LIBN
  715. BX7 X3+X7
  716. SA7 X6
  717. LIB6 SA6 LIBC SET DPT ADDRESS
  718. CALL ODP,LIBB OUTPUT DELETED PROGRAM
  719.  
  720. * SKIP RECORD FROM FILE *OLD*.
  721.  
  722. CALL DIS,LIBB,(=H*SKIPPING *)
  723. SA1 LIBA
  724. LIB7 NZ X1,LIB8 IF EOR OR EOF
  725. READW OLD,WSA,WSAL
  726. EQ LIB7 LOOP TO END OF RECORD
  727. LIB8 CALL SUL,LIBB,LIBA
  728. SA1 LIBC CHECK FOR END OF DELETE
  729. ZR X1,LIB16 IF IMPLIED DELETE
  730. SA2 X1+B1
  731. SA3 LIBB
  732. BX6 X2-X3
  733. NZ X6,LIB16 IF NOT END OF DELETE
  734. SX6 7777B DELETE FLAG
  735. SA6 X1 CLEAR DPT ENTRY
  736. SA6 X1+B1
  737. EQ LIB16 CHECK INSERT AFTER
  738.  
  739. * CHECK FOR REPLACEMENT.
  740.  
  741. LIB9 SEARCH PNT,LIBB
  742. ZR X6,LIB12 IF NO REPLACEMENT
  743. SA1 P.PNT
  744. SX1 X1
  745. IX6 X6-X1
  746. SA6 LIBE
  747. CALL CNR,X6 CHECK FOR NO REPLACE
  748. NZ X6,LIB9 IF NO REPLACE
  749. CALL DIS,LIBB,(=H*REPLACING *)
  750. SA1 LIBE
  751. CALL CPY,X1 COPY REPLACEMENT RECORD
  752. CALL ORW,(=8HREPLACED),LGO
  753. SA1 LIBA
  754. NZ X1,LIB11 IF EOR ON PREVIOUS READ
  755. LIB10 READW OLD,WSA,WSAL SKIP RECORD ON *OLD*
  756. LIB11 ZR X1,LIB10 IF NOT EOR
  757. CALL SUL,LIBB,LIBA
  758. EQ LIB16 CHECK INSERT AFTER
  759.  
  760. * COPY FROM *OLD* TO *NEW*.
  761.  
  762. LIB12 CALL DIS,LIBB,(=H*COPYING *)
  763. CALL CCM,WSA,LIBB
  764. SB6 X6
  765. SA1 LIBA CHECK FOR EOR
  766. NZ X1,LIB14 IF EOR/EOF/EOI
  767. LIB13 SB7 WSA+WSAL
  768. WRCW N,B6,B7-B6
  769. READW OLD,WSA,WSAL
  770. SB6 WSA
  771. ZR X1,LIB13 IF NOT EOR/EOF/EOI
  772. LIB14 SA1 P-LWP LWA + 1 OF DATA TRANSFERED
  773. SB7 X1
  774. WRCW N,B6,B7-B6,R WRITE LAST PORTION OF RECORD
  775. SA1 N-2
  776. NG X1,LIB15 IF *WRITECW* NOT DISABLED
  777. RJ RCW
  778.  
  779. LIB15 ADDWRD NPT,NIND
  780. CALL ORW,(=1H ),OLD
  781. CALL CPL,LIBB,LIBA
  782.  
  783. * CHECK INSERT AFTER.
  784.  
  785. LIB16 SEARCH IPT,LIBB
  786. ZR X6,LIB2 IF NO INSERT
  787. SA1 P.IPT SET IPT INDEX
  788. SX1 X1
  789. IX6 X6-X1
  790.  
  791. * INSERT PROGRAMS AFTER SPECIFIED PROGRAM.
  792.  
  793. CALL CPP,X6
  794. EQ LIB16 LOOP
  795.  
  796. * PROCESS ZERO LENGTH RECORD.
  797.  
  798. LIB17 SEARCH IPT,LIBI
  799. ZR X6,LIB18 IF NO ADD
  800. SA1 P.IPT SET IPT INDEX
  801. SX1 X1
  802. IX6 X6-X1
  803. CALL CPP,X6
  804. EQ LIB17 LOOP
  805.  
  806. LIB18 SB2 =0 ENTER ZERO LENGTH RECORD NAME AND TYPE
  807. RJ EPN
  808. ADDWRD NPT,NIND
  809. WRCW N,B0,B0 WRITE ZERO LENGTH RECORD
  810. SA1 LIBI INCREMENT LIBRARY NUMBER
  811. SX6 B1
  812. LX6 42
  813. IX6 X6+X1
  814. SA6 A1
  815. CALL OZR,(=1H ),OLD,(=2H00)
  816. JP LIB1 READ NEXT RECORD
  817.  
  818. * CHECK INSERT BEFORE EOF.
  819.  
  820. LIB19 SEARCH IPT,LIBD,(=77777777777777400000B)
  821. ZR X6,LIB20 IF NO INSERT
  822. SA1 P.IPT SET IPT INDEX
  823. SX1 X1
  824. IX6 X6-X1
  825.  
  826. * INSERT PROGRAM(S) BEFORE EOF.
  827.  
  828. CALL CPP,X6
  829. EQ LIB19 CHECK FOR ANOTHER INSERT
  830.  
  831. * PROCESS EOF ON FILE OLD.
  832.  
  833. LIB20 RJ CAP COPY ADDED PROGRAMS
  834. SB2 LIBH
  835. SA1 LIBA GET EOR INDICATOR
  836. RJ WPD WRITE PROGRAM DIRECTORY
  837. CALL RWF REWIND FILES
  838. CALL CRR CHECK RECORDS REPLACED
  839. CALL CNO COPY NEW TO OLD
  840. MESSAGE (=C* EDITING COMPLETE.*),,R
  841. RETURN S RETURN SCRATCH FILE
  842. SA1 OUTPUT+2 CLOSE OUT FILE *OUTPUT*
  843. SA2 A1+B1
  844. BX6 X1-X2
  845. ZR X6,LIB21 IF NO OUTPUT
  846. WRITER OUTPUT,R
  847. LIB21 RJ GUL GENERATE USER LIBRARY
  848. RJ VFY VERIFY *OLD* AND *NEW*
  849. ENDRUN
  850.  
  851.  
  852. LIBA DATA 0 EOR INDICATOR
  853. LIBB DATA 0 PROGRAM NAME
  854. DATA 0 PROGRAM NAME WITH INSERT BEFORE SET
  855. BSSZ 1 TYPE/* PSUEDO-ENTRY
  856. LIBC DATA 0 ADDRESS OF DPT ENTRY
  857. LIBD VFD 42/1L*,1/1,17/
  858. LIBE DATA 0 PROGRAM NAME TABLE INDEX
  859. LIBF DATA C* RECORDS WRITTEN ON FILE XXX*
  860. LIBG DATA H* RECORD TYPE FILE *
  861. DATA C* DATE COMMENT*
  862. LIBH DATA 0 OPL DIRECTORY NAME
  863. LIBI DATA 1S42 LIBRARY NUMBER
  864. LIBN VFD 42/0,6/1,12/0 DELETE IN PROGRESS FLAG
  865. LIBP VFD 42/0,6/77B,12/0 DELETE IN PROGRESS MASK
  866. TITLE DIRECTIVE CARD PROCESSING.
  867. ** RDC - READ DIRECTIVES.
  868.  
  869.  
  870. RDC SUBR ENTRY/EXIT
  871. SA1 INPUT CHECK FOR NO INPUT FILE
  872. SA2 CZOP CHECK FOR *Z* OPTION
  873. NZ X2,RDC1 IF *Z* OPTION SELECTED
  874. ZR X1,RDC12 IF NO INPUT FILE
  875. SA1 TTYI
  876. NZ X1,RDC0.1 IF NOT TTY INPUT
  877. WRITEC TTYOUT,(=C*ENTER DIRECTIVES -*)
  878. RDC0.1 READ I
  879. RDC1 READH I,DCB,DCBL
  880. SB2 DCB UNPACK DIRECTIVE COMMAND BUFFER
  881. SB3 DCB+DCBL
  882. SB4 DSB
  883. MX0 54
  884. NZ X1,RDC12 IF END-OF-RECORD
  885. RDC2 SB5 B4+10
  886. SA1 B2
  887. RDC3 LX1 6
  888. BX6 -X0*X1
  889. SA6 B4
  890. SB4 B4+B1
  891. NE B4,B5,RDC3 LOOP FOR 10 CHARACTERS
  892. SB2 B2+B1
  893. SX6 B0
  894. NE B2,B3,RDC2 LOOP FOR END OF BUFFER
  895. SB4 DSB SUPPRESS TRAILING BLANKS
  896. RDC4 SA6 B5
  897. EQ B4,B5,RDC5 IF START OF BUFFER
  898. SB5 B5-B1
  899. SA1 B5
  900. SX6 X1-1R
  901. ZR X6,RDC4 IF CHARACTER IS * *
  902.  
  903. * ASSEMBLE DIRECTIVE AND GO TO DIRECTIVE PROCESSOR.
  904.  
  905. RDC5 SX6 DSB SET COLUMN POINTER AT COLUMN 1
  906. SA6 RDCA
  907. SA1 X6 CHECK COLUMN 1
  908. SA3 A1+B1 CHECK COLUMN 2
  909. SX2 X1-1R*
  910. NZ X2,RDC11 IF NOT *** IN COLUMN 1
  911. SX6 X3-1R/
  912. ZR X6,LST IF COMMENT TEXT
  913. CALL AFN,RDCA,RDCB
  914. SA1 RDCA IGNORE TRAILING BLANKS
  915. SA2 X1
  916. + SA2 A2+B1
  917. SX6 X2-1R
  918. ZR X6,*-1 LOOP
  919. SX6 A2-B1
  920. SA6 B2
  921. SA1 RDCC SEARCH FOR LEGAL DIRECTIVE
  922. SA2 RDCB
  923. RDC6 ZR X1,RDC14 IF DIRECTIVE INCORRECT
  924. MX0 42
  925. BX6 X1-X2
  926. BX6 X0*X6
  927. SX7 X1
  928. LX7 30
  929. SA1 A1+B1
  930. NZ X6,RDC6 LOOP
  931. SA7 SDA SET DIRECTIVE ADDRESS
  932. LX7 30
  933. SX6 X7+COPY
  934. ZR X6,COPY IF *COPY DIRECTIVE
  935. SX6 X7+DEBUG
  936. ZR X6,DEBUG IF *DEBUG DIRECTIVE
  937. SX6 X7+VFYLIB
  938. ZR X6,VFYLIB IF *VFYLIB DIRECTIVE
  939. SX6 X7+LSTDR
  940. ZR X6,LSTDR IF *LIST DIRECTIVE
  941. SX6 X7+NOREW
  942. ZR X6,NOREW IF *NOREW DIRECTIVE
  943. SX6 X7+NOINS
  944. ZR X6,NOINS IF *NOINS DIRECTIVE
  945. SX6 X7+LIBGEN
  946. ZR X6,LIBGEN IF *LIBGEN DIRECTIVE
  947.  
  948. ** PROCESS DIRECTIVE.
  949.  
  950. RDC7 SA1 RDCA CHECK SERARATOR CHARACTER
  951. SA2 X1
  952. SB5 X2+B1
  953. SA1 =20000000000005000000B
  954. LX7 X1,B5
  955. NG X7,ERR9 IF CHARACTER = EOL */* *-*
  956. SA3 SDA
  957. RDC8 PL X3,RDC9 IF LIBRARY/PROGRAM TO BE ASSEMBLED
  958. CALL AFN,RDCA,RDCD
  959. SA3 SDA
  960. BX3 -X3
  961. AX3 30
  962. SB7 X3
  963. EQ RDC10 CHECK FILE NAME
  964.  
  965. RDC9 CALL APN,RDCA,RDCD
  966. SA3 SDA
  967. AX3 30
  968. SB7 X3
  969. RDC10 MX0 42 CHECK FILE NAME
  970. SA1 RDCD
  971. BX1 X0*X1
  972. SX7 =C* REQUIRED PARAMETER(S) NOT SPECIFIED.*
  973. ZR X1,ERR IF FILE NAME = 0
  974. SA1 RDCA
  975. SA2 X1+ (X2) = CHARACTER
  976. SB5 X2-1R, (B5) = CHARACTER - *,*
  977. JP B7 GO TO DIRECTIVE PROCESSOR.
  978.  
  979. * PROCESS DIRECTIVE CONTINUATION.
  980.  
  981. RDC11 SX6 DSB-1 SET STRING BUFFER POINTER
  982. SA6 RDCA
  983. SA3 SDA
  984. EQ RDC8 CHECK DIRECTIVE FORMAT
  985.  
  986. * END OF DIRECTIVES. CHECK FOR ERRORS.
  987.  
  988. RDC12 RETURN TTYOUT
  989. RJ SUM SET *ULIB* MODE
  990. SA1 TTYI
  991. SA2 RDCF
  992. ZR X1,RDCX IF TTY INPUT
  993. ZR X2,RDCX IF NO DIRECTIVE ERRORS
  994. MESSAGE (=C* DIRECTIVE ERRORS.*),3
  995. SA1 CDOP
  996. NZ X1,RDCX IF DEBUG OPTION ON
  997. RJ ABT ABORT
  998.  
  999. RDC14 SX7 =C* UNRECOGNIZED KEYWORD IN DIRECTIVE.*
  1000. EQ ERR LIST ERROR MESSAGE
  1001. SPACE 4
  1002. ** SET NEW DIRECTIVE ADDRESS.
  1003. * RJ SDA TO SET NEW ADDRESS. LIBRARY/PROGRAM WILL
  1004. * BE ASSEMBLED.
  1005.  
  1006.  
  1007. SDA EQ INS5 PROCESS NEXT FIELD
  1008. SPACE 4
  1009. ** RET - RETURN FOR PROCESSING DUPLICATE FIELD.
  1010.  
  1011.  
  1012. RET SA1 RDCA CHECK SEPARATOR CHARACTER
  1013. SA2 X1
  1014. ZR X2,LST IF END-OF-LINE
  1015. SB5 X2-1R
  1016. ZR B5,LST IF CHARACTER = * *
  1017. EQ RDC7 IF MORE PARAMETERS
  1018.  
  1019. RDCA VFD 60/DSB DIRECTIVE STRING BUFFER POINTER
  1020. RDCB DATA 0 DIRECTIVE
  1021.  
  1022. RDCC VFD 42/0LAFTER,18/INSERT
  1023. VFD 42/0LA,18/INSERT
  1024. VFD 42/0LADD,18/-ADP
  1025. VFD 42/0LBEFORE,18/BEFORE
  1026. VFD 42/0LB,18/BEFORE
  1027. VFD 42/0LBUILD,18/BUILD
  1028. VFD 42/0LCOMMENT,18/COMMENT
  1029. VFD 42/0LCOPY,18/-COPY
  1030. VFD 42/0LDATE,18/DATE
  1031. VFD 42/0LDEBUG,18/-DEBUG
  1032. VFD 42/0LDELETE,18/DELETE
  1033. VFD 42/0LD,18/DELETE
  1034. VFD 42/0LFILE,18/-FILE
  1035. VFD 42/0LIGNORE,18/IGNORE
  1036. VFD 42/0LINSERT,18/INSERT
  1037. VFD 42/0LI,18/INSERT
  1038. VFD 42/0LLIBGEN,18/-LIBGEN
  1039. VFD 42/0LLIST,18/-LSTDR
  1040. VFD 42/0LLGO,18/-FILE
  1041. VFD 42/0LNAME,18/-NAME
  1042. VFD 42/0LNEW,18/-NEWF
  1043. VFD 42/0LNOINS,18/-NOINS
  1044. VFD 42/0LNOREP,18/-NOREP
  1045. VFD 42/0LNOREW,18/-NOREW
  1046. VFD 42/0LOLD,18/-OLDF
  1047. VFD 42/0LRENAME,18/RENAME
  1048. VFD 42/0LREPLACE,18/REPLACE
  1049. VFD 42/0LREWIND,18/-REWIND
  1050. VFD 42/0LTYPE,18/-NAME
  1051. VFD 42/0LVERIFY,18/-VFYLIB
  1052. VFD 42/0LVFYLIB,18/-VFYLIB
  1053. VFD 60/0
  1054.  
  1055. RDCD DATA 0 ASSEMBLED NAME
  1056. RDCE DATA 0LTEXT DEFAULT RECORD TYPE
  1057. RDCF DATA 0 DIRECTIVE ERROR COUNT
  1058. SPACE 4
  1059. ** ERR - ERROR DETECTED IN DIRECTIVE SCAN.
  1060. *
  1061. * ENTRY (X7) = 0 IF NO EXTRA ERROR MESSAGE TO BE ISSUED.
  1062. * (X7) = ADDRESS OF EXPLANATORY ERROR MESSAGE.
  1063.  
  1064.  
  1065. ERR SA1 TTYI
  1066. SA7 ERRB SAVE ERROR MESSAGE ADDRESS
  1067. ZR X1,ERR2 IF TTY INPUT
  1068. SA1 =10H ERROR*
  1069. BX6 X1
  1070. SA6 OUTPUTB
  1071. CALL LOL LIST ONE LINE
  1072. WRITEC OUTPUT,(=C* *)
  1073. SA1 RDCF INCREMENT ERROR COUNT
  1074. SX6 X1+B1
  1075. SA6 A1
  1076. SA1 ERRB
  1077. ERR1 ZR X1,RDC1 IF NO ERROR MESSAGE TO BE ISSUED
  1078. WRITEC OUTPUT,X1
  1079. EQ RDC1 READ NEXT DIRECTIVE
  1080.  
  1081. ERR2 SX2 1R BLANK FILL LINE
  1082. SB6 OUTPUTB+1
  1083. SB7 OUTPUTB+DCBL+1
  1084. SA1 B6
  1085. MX0 54
  1086. ERR3 BX6 X1
  1087. SA6 A1
  1088. EQ B6,B7,ERR5 IF END OF LINE
  1089. SA1 B6
  1090. SB6 B6+B1
  1091. SB5 10D
  1092. ERR4 ZR B5,ERR3 IF END OF WORD
  1093. LX0 6
  1094. LX2 6
  1095. BX6 -X0*X1
  1096. SB5 B5-B1
  1097. NZ X6,ERR4 IF CHARACTER .NE. 00
  1098. BX1 X1+X2
  1099. EQ ERR4 LOOP
  1100.  
  1101. ERR5 WRITEW TTYOUT,ERRA,ERRAL
  1102. WRITEH TTYOUT,OUTPUTB+1,DCBL
  1103. SA1 ERRB
  1104. ZR X1,ERR1 IF NO EXPLANATORY MESSAGE
  1105. WRITEC TTYOUT,X1
  1106. WRITEC TTYOUT,ERRC
  1107. SA1 TTYO
  1108. ZR X1,RDC1 IF TTY OUTPUT
  1109. SA1 ERRB
  1110. EQ ERR1 ISSUE EXPLANATION
  1111.  
  1112. ERR9 SX7 =C* -- UNRECOGNIZED SEPARATOR CHARACTER.*
  1113. EQ ERR ISSUE ERROR MESSAGE
  1114.  
  1115.  
  1116. ERRA DATA 22HINCORRECT DIRECTIVE -
  1117. ERRAL EQU *-ERRA
  1118.  
  1119. ERRB CON 0
  1120. ERRC DATA C* (CORRECTED DIRECTIVE MAY BE RE-ENTERED...)*
  1121. SPACE 4
  1122. ** LST - LIST DIRECTIVE.
  1123. *
  1124. * USES A - 1, 6.
  1125. * X - 1, 2, 6.
  1126.  
  1127.  
  1128. LST SA1 =10H
  1129. BX6 X1
  1130. SA6 OUTPUTB
  1131. SA1 LIST
  1132. SX2 4B
  1133. BX1 X1*X2
  1134. ZR X1,RDC1 IF DIRECTIVE LIST OPTION OFF
  1135. CALL LOL LIST ONE LINE
  1136. EQ RDC1 LOOP TO READ NEXT DIRECTIVE
  1137. SPACE 4
  1138. ** *ADD LIB,LIB1/PN1
  1139. *
  1140. * ADD PROGRAM(S) AT END OF SPECIFIED LIBRARY.
  1141. * ENTRY (X2) = SEPARATOR CHARACTER.
  1142.  
  1143.  
  1144. ADP SA1 RDCD CHECK LIBRARY NAME
  1145. SA3 ADPA
  1146. MX0 42
  1147. ADP1 BX3 X3-X1
  1148. BX6 -X0*X3
  1149. ZR X6,ADP3 IF NO MATCH ON LIBRARY NAME
  1150. BX7 X0*X3
  1151. SA3 A3+B1
  1152. NZ X7,ADP1 IF NOT FOUND
  1153. ADP2 LX6 42 SET LIBRARY NUMBER
  1154. SA6 A1
  1155. EQ INSERT PROCESS INSERT
  1156.  
  1157. ADP3 MX0 18
  1158. BX7 X0*X3
  1159. NZ X7,ADP4 IF NOT *LIBN..N*
  1160. BX5 -X0*X1
  1161. LX5 18
  1162. SB7 B1+ SET DECIMAL BASE
  1163. RJ DXB CONVERT DECIMAL TO BINARY
  1164. SA2 RDCA RESTORE SEPARATOR CHARACTER
  1165. SA2 X2+ (X2) = CHARACTER
  1166. ZR X4,ADP2 IF CORRECT CONVERSION
  1167. ADP4 SX7 =C* UNRECOGNIZED LIBRARY NAME.*
  1168. EQ ERR ISSUE ERROR MESSAGE
  1169.  
  1170.  
  1171. ADPA BSS 0
  1172. CON 0LDDS+1
  1173. CON 0LIDS+2
  1174. CON 0LMOV+3
  1175. CON 0LRPL+4
  1176. CON 0LRSL+5
  1177. CON 0LSLD+6
  1178. ADPB CON 0LLIB
  1179. SPACE 4
  1180. ** *BEFORE LIB1/PN1,LIB2/PN2-LIB3/PN3,LIB4/PN4
  1181. *
  1182. * INSERT PROGRAM(S) BEFORE SPECIFIED PROGRAM.
  1183. * ENTRY (X2) = SEPARATOR CHARACTER.
  1184.  
  1185.  
  1186. BEFORE MX6 1 SET INSERT BEFORE FLAG
  1187. LX6 18
  1188. EQ INS1
  1189. SPACE 4
  1190. ** *BUILD PN
  1191. *
  1192. * BUILD A DIRECTORY OF FILE *NEW* WITH NAME *PN*.
  1193.  
  1194.  
  1195. BUILD SA1 RDCD
  1196. BX6 X1
  1197. SA6 NPLN
  1198. EQ LST
  1199. SPACE 4
  1200. ** *COMMENT LIB/PN COMMENT
  1201. *
  1202. * ADD A 70-CHARACTER COMMENT TO THE 7700 TABLE OF THE
  1203. * SPECIFIED RECORD.
  1204.  
  1205.  
  1206. COMMENT SX6 B0
  1207. COM1 SA1 RDCD SET PROGRAM NAME
  1208. SB5 X2-1R CHECK SEPARATOR
  1209. ZR B5,COM2 IF CHARACTER = * *
  1210. SB5 X2-1R,
  1211. ZR B5,COM2 IF CHARACTER = *,*
  1212. NZ X2,ERR9 IF NOT EOL
  1213. COM2 BX6 X6+X1
  1214. SA1 RDCA
  1215. SA2 X1+B1
  1216. SA6 COMA
  1217. SB2 COMA
  1218. SB3 COMA+7
  1219. COM3 SX6 B0 ASSEMBLE COMMENT
  1220. SB7 60
  1221. SB2 B2+B1
  1222. COM4 SB7 B7-6
  1223. LX6 6
  1224. BX6 X6+X2
  1225. ZR X2,COM6 IF END-OF-LINE
  1226. LX6 6
  1227. SA2 A2+B1
  1228. SB7 B7-6
  1229. NZ X2,COM5 IF NOT END-OF-LINE
  1230. SX2 1R
  1231. COM5 BX6 X6+X2
  1232. SA2 A2+B1
  1233. NZ B7,COM4 LOOP FOR 1 WORD
  1234. COM6 LX6 X6,B7 STORE 10-CHARACTERS OF COMMENT
  1235. SA6 B2
  1236. NE B2,B3,COM3 LOOP FOR 7 WORDS
  1237. ADDWRD CDT,COMA
  1238. EQ LST LIST DIRECTIVE
  1239.  
  1240. COMA VFD 42/,1/,17/ 42/PROGRAM,1/DATE,17/TYPE
  1241. DATA 0 420/COMMENT
  1242. DATA 0
  1243. DATA 0
  1244. DATA 0
  1245. DATA 0
  1246. DATA 0
  1247. DATA 0
  1248. SPACE 4
  1249. ** *COPY
  1250. *
  1251. * COPY FILE *NEW* TO FILE *OLD* AFTER EDITING.
  1252.  
  1253.  
  1254. COPY SX6 B1 SET COPY FLAG
  1255. SA6 CCPY
  1256. EQ LST
  1257. SPACE 4
  1258. ** *DATE LIB/PN COMMENT
  1259. *
  1260. * ADD A 70-CHARACTER COMMENT AND THE DATE TO THE 7700
  1261. * TABLE OF THE SPECIFIED PROGRAM.
  1262.  
  1263.  
  1264. DATE MX6 1 SET DATE FLAG
  1265. LX6 18
  1266. EQ COM1 GO ASSEMBLE COMMENT
  1267. DEBUG SPACE 4,10
  1268. ** *DEBUG
  1269. *
  1270. * IGNORE SUBSEQUENT DIRECTIVE ERRORS.
  1271.  
  1272.  
  1273. DEBUG SX6 B1+ SET DEBUG FLAG
  1274. SA6 CDOP
  1275. EQ LST LIST DIRECTIVE
  1276. SPACE 4
  1277. ** *DELETE LIB1/PN1,LIB2/PN2-LIB3/PN3
  1278. *
  1279. * DELETE SELECTED PROGRAM(S) FROM FILE *OLD*.
  1280. * ENTRY (X2) = SEPARATOR CHARACTER.
  1281.  
  1282.  
  1283. DELETE SB5 X2-1R-
  1284. SA1 RDCD SET DELETE START AND STOP
  1285. BX6 X1
  1286. SA6 DELA
  1287. SA6 A6+B1
  1288. NZ B5,DEL1 IF NO CONTINUATION FIELD
  1289.  
  1290. * ASSEMBLE SECOND FIELD
  1291.  
  1292. CALL APN,RDCA,(DELA+1)
  1293. DEL1 ADDWRD DPT,DELA
  1294. EQ RET RETURN
  1295.  
  1296.  
  1297. DELA VFD 42/,6/,12/ 42/PROGRAM,6/IP,12/TYPE
  1298. VFD 42/,6/,12/ 42/PROGRAM,6/0,12/TYPE
  1299. SPACE 4
  1300. ** *FILE FN,FN,FN
  1301. *
  1302. * DECLARE ADDITIONAL CORRECTION FILES.
  1303.  
  1304.  
  1305. FILE SA1 RDCD
  1306. BX6 X1
  1307. SA6 LGO.
  1308. SEARCH FNT,RDCD,FILA
  1309. NZ X6,RET IF FILE IN FNT
  1310. ADDWRD FNT,RDCD
  1311. EQ RET RETURN
  1312.  
  1313.  
  1314. FILA DATA 77777777777777000000B
  1315. SPACE 4
  1316. ** *IGNORE LIB/PN
  1317. * *IGNORE LIB1/PN1-LIB2/PN2
  1318. *
  1319. * IGNORE PROGRAM(S) WHEN CORRECTION FILE IS READ.
  1320. * ENTRY (X2) = SEPARATOR CHARACTER.
  1321.  
  1322.  
  1323. IGNORE SA1 LGO. SET CORRECTION FILE NAME
  1324. SA3 RDCD SET PROGRAM NAME
  1325. BX6 X1
  1326. LX7 X3
  1327. SA6 IGNA
  1328. SA7 A6+B1
  1329. SA7 A7+B1
  1330. SB5 X2-1R- CHECK FOR CONTINUATION FIELD
  1331. NZ B5,IGN1 IF NO CONTINUATION FIELD
  1332.  
  1333. * ASSEMBLE SECOND FIELD.
  1334.  
  1335. CALL APN,RDCA,(IGNA+2)
  1336. IGN1 ADDWRD PIT,IGNA
  1337. EQ RET RETURN
  1338.  
  1339.  
  1340. IGNA VFD 42/,18/ 42/FILE,18/
  1341. VFD 42/,18/ 42/PROGRAM,18/TYPE
  1342. VFD 42/,18/ 42/PROGRAM,18/TYPE
  1343. SPACE 4
  1344. ** *INSERT LIB1/PN1,LIB2/PN2,LIB3/PN3
  1345. *
  1346. * INSERT PROGRAMS AFTER SPECIFIED PROGRAM.
  1347. * ENTRY (X2) = SEPARATOR CHARACTER.
  1348.  
  1349. INSERT SX6 B0 SET INSERT AFTER FLAG
  1350. INS1 SB5 X2-1R,
  1351. ZR B5,INS2 IF SEPARATOR = *,*
  1352. SB5 X2-1R
  1353. NZ B5,ERR9 IF SEPARATOR NOT * * OR *,*
  1354. INS2 SA1 RDCA CHECK FOR SECOND FIELD
  1355. SA3 X1+1
  1356. SX7 =C* RECORD(S) TO BE INSERTED NOT SPECIFIED.*
  1357. ZR X3,ERR IF NO SECOND FIELD
  1358. SA3 RDCD SET INSERT POINT
  1359. BX6 X6+X3
  1360. SA6 INSA
  1361.  
  1362. * ASSEMBLE PROGRAM NAME OF START.
  1363.  
  1364. CALL APN,RDCA,(INSA+2)
  1365. INS3 SB5 X2-1R-
  1366. SA1 INSA+2
  1367. SA4 LGO. SET FILE NAME
  1368. LX7 X4
  1369. SA7 A1-B1
  1370. BX6 X1
  1371. SA6 A1+B1
  1372. NZ B5,INS4 IF NO CONTINUATION FIELD
  1373.  
  1374. * PROCESS CONTINUATION FIELD
  1375.  
  1376. CALL APN,RDCA,(INSA+3)
  1377. INS4 ADDWRD IPT,INSA
  1378. RJ SDA SET DIRECTIVE ADDRESS AND READ NEXT FIELD
  1379.  
  1380. * PROCESS NEXT FIELD.
  1381.  
  1382. INS5 SA3 RDCD
  1383. BX6 X3
  1384. SA6 INSA+2
  1385. EQ INS3 LOOP TO END OF CARD
  1386.  
  1387.  
  1388. INSA VFD 42/1L*,1/1,17/ 42/PROG1,1/BEFORE,17/TYPE1
  1389. VFD 42/,18/ 42/FILE,18/
  1390. VFD 42/,18/ 42/PROG2,18/TYPE2
  1391. VFD 42/,18/ 42/PROG3,18/TYPE3
  1392. LIBGEN SPACE 4,10
  1393. ** *LIBGEN UN
  1394. *
  1395. * SET *ULIB* MODE, CALLING *LIBGEN* AFTER EDITING
  1396. * TO GENERATE A USER LIBRARY *UN* ON FILE *NEW*.
  1397. * IF *UN* IS OMITTED, *UN* = *ULIB* IS USED.
  1398.  
  1399.  
  1400. LIBGEN SA1 RDCA
  1401. SA2 X1+
  1402. ZR X2,LIBG2 IF EOL
  1403. SB5 X2+1
  1404. SA2 =20000000000005000000B
  1405. LX7 X2,B5
  1406. NG X7,ERR9 IF ERROR
  1407. SB2 RDCA
  1408. SB3 RDCD
  1409. RJ AFN ASSEMBLE *UN* NAME
  1410. SA1 RDCD
  1411. MX0 42
  1412. BX6 X0*X1
  1413. ZR X1,LIBG2 IF NULL *UN* NAME
  1414. LIBG1 SA6 CULB
  1415. EQ LST LIST DIRECTIVE
  1416. LIBG2 SA1 LIBGA
  1417. BX6 X1
  1418. EQ LIBG1 LIST DIRECTIVE
  1419.  
  1420.  
  1421. LIBGA VFD 24/4LULIB,36/0 DEFAULT USER LIBRARY NAME
  1422. LSTDR SPACE 4,10
  1423. ** *LIST LFN,OPT
  1424. *
  1425. * DECLARE LISTING FILE AND LIST OPTIONS.
  1426.  
  1427.  
  1428. LSTDR SA1 RDCA CHECK SEPARATOR CHARACTER
  1429. SA2 X1
  1430. SB5 X2+B1
  1431. SA2 =20000000000005000000B
  1432. LX7 X2,B5
  1433. NG X7,ERR9 IF ERROR
  1434. SB2 RDCA
  1435. SB3 RDCD
  1436. RJ AFN ASSEMBLE LIST FILE NAME
  1437. MX0 42
  1438. SA1 RDCD
  1439. BX6 X1*X0
  1440. ZR X6,LSTDR1 IF FILE NAME NULL
  1441. SA1 FLST+/FLST/OUTPUT
  1442. RJ RFN REPLACE FILE NAME
  1443. LSTDR1 SA1 RDCA
  1444. SA2 X1+
  1445. ZR X2,LST IF EOL
  1446. SB2 RDCA
  1447. SB3 RDCD
  1448. RJ AFN ASSEMBLE LIST OPTIONS
  1449. SA2 RDCD
  1450. SA1 LIST
  1451. MX0 42
  1452. BX1 X2*X0
  1453. ZR X1,LST IF LIST OPTIONS NULL
  1454. RJ ILO INTERPRET LIST OPTIONS
  1455. SX7 =C* UNRECOGNIZED LIST OPTION(S).*
  1456. NZ X1,ERR IF ERRORS
  1457. EQ LST LIST DIRECTIVE
  1458. SPACE 4
  1459. ** *NAME LIB
  1460. *
  1461. * SET DEFAULT LIBRARY NAME.
  1462.  
  1463.  
  1464. NAME SA1 RDCD CHECK LIBRARY NAME
  1465. SA2 NAMA
  1466. NAM1 ZR X2,NAM2 IF INCORRECT LIBRARY
  1467. BX6 X1-X2
  1468. SA2 A2+B1
  1469. NZ X6,NAM1 IF NOT FOUND
  1470. BX6 X1
  1471. SA6 RDCE
  1472. EQ LST LIST LINE
  1473.  
  1474. NAM2 SX7 =C* UNRECOGNIZED RECORD TYPE.*
  1475. EQ ERR ISSUE ERROR MESSAGE
  1476.  
  1477.  
  1478. NAMA BSS 0
  1479. .E ECHO ,RT=("RTMIC")
  1480. .A IFC NE,/RT//
  1481. DATA L/RT/
  1482. .A ELSE
  1483. DATA 1
  1484. .A ENDIF
  1485. .E ENDD
  1486. DATA 0
  1487. NEWF SPACE 4,10
  1488. ** *NEW FN
  1489. *
  1490. * CHANGE/SPECIFY NAME OF *NEW* FILE.
  1491.  
  1492.  
  1493. NEWF SA1 FLST+/FLST/NEW
  1494. NEW1 SA2 RDCD GET FILE NAME
  1495. BX6 X2
  1496. RJ RFN REPLACE FILE NAME
  1497. EQ LST LIST DIRECTIVE
  1498. NOINS SPACE 4,10
  1499. ** *NOINS
  1500. *
  1501. * SET NO INSERT OF NEW RECORDS.
  1502.  
  1503.  
  1504. NOINS SX6 B1+
  1505. SA6 CADD SET NO INSERT AT EOF
  1506. EQ LST LIST DIRECTIVE
  1507. NOREP SPACE 4,10
  1508. ** *NOREP FN,FN,FN
  1509. *
  1510. * DO NOT REPLACE RECORDS FROM FILE *FN*.
  1511.  
  1512.  
  1513. NOREP SEARCH NRT,RDCD
  1514. NZ X6,RET IF FILE IN NRT
  1515. ADDWRD NRT,RDCD
  1516. EQ RET RETURN
  1517. NOREW SPACE 4,10
  1518. ** *NOREW
  1519. *
  1520. * SET NO REWIND OF FILES.
  1521.  
  1522.  
  1523. NOREW SX6 B1+
  1524. SA6 CREW SET NO REWIND FLAG
  1525. EQ LST LIST DIRECTIVE
  1526. OLDF SPACE 4,10
  1527. ** *OLD FN
  1528. *
  1529. * CHANGE/SPECIFY NAME OF OLD FILE.
  1530.  
  1531.  
  1532. OLDF SA1 FLST+/FLST/OLD
  1533. EQ NEW1 PROCESS FILE NAME
  1534. SPACE 4
  1535. ** *RENAME LIB1/PN1,PN2
  1536. *
  1537. * CHANGE THE NAME OF PROGRAM *PN1* TO *PN2*.
  1538. * ENTRY (B5) = (SEPARATOR CHARACTER - *,*).
  1539.  
  1540.  
  1541. RENAME SA3 RDCD SET REPLACE NAME
  1542. BX6 X3
  1543. SA6 RENA
  1544. ZR B5,REN1 IF SEPARATOR = *,*
  1545. SB5 X2-1R
  1546. NZ B5,ERR9 IF SEPARATOR NOT *,* OR * *
  1547. REN1 SEARCH RNT,A6
  1548. SX7 =C* RECORD ALREADY RENAMED.*
  1549. NZ X6,ERR IF NAME IN RNT
  1550. CALL AFN,RDCA,(RENA+1)
  1551. MX0 42
  1552. SA3 RENA
  1553. SA4 A3+B1
  1554. BX6 -X0*X3
  1555. BX6 X4+X6
  1556. SA6 A4
  1557. ADDWRD RNT,RENA
  1558. EQ LST LIST LINE
  1559.  
  1560. RENA VFD 42/,18/ 42/PRG1,18/LIB1
  1561. VFD 42/,18/ 42/PRG1,18/LIB1
  1562. SPACE 4
  1563. ** *REPLACE LIB1/PN1,LIB2/PN2-LIB3/PN3
  1564. *
  1565. * REPLACE PROGRAM(S) FROM FILE *OLD* WITH PROGRAMS FROM
  1566. * THE CURRENT CORRECTION FILE.
  1567. * ENTRY (X2) = SEPARATOR CHARACTER.
  1568.  
  1569.  
  1570. REPLACE SA3 RDCD SET REPLACE NAME
  1571. BX6 X3
  1572. SA6 INSA
  1573. SEARCH NRT,(LGO.)
  1574. NZ X6,REP1 IF FILE IN NRT
  1575. SB3 LGO.
  1576. ADDWRD NRT,B3
  1577. REP1 SA1 RDCA
  1578. SA2 X1
  1579. EQ INS5 ASSEMBLE AS INSERT
  1580. SPACE 4
  1581. ** *REWIND FN,FN,FN
  1582. *
  1583. * REWIND FN BEFORE AND AFTER EDITING.
  1584.  
  1585.  
  1586. REWIND SEARCH RFT,RDCD
  1587. NZ X6,RET IF IN RFT TABLE
  1588. ADDWRD RFT,RDCD
  1589. EQ RET
  1590. VFYLIB SPACE 4,10
  1591. ** *VFYLIB
  1592. *
  1593. * CALL *VFYLIB* AFTER EDITING.
  1594.  
  1595.  
  1596. VFYLIB SX6 B1+ SET *VFYLIB* FLAG
  1597. SA6 CVFY
  1598. EQ LST LIST DIRECTIVE
  1599. TITLE SUBROUTINES.
  1600. ** ABT - ABORT JOB.
  1601.  
  1602.  
  1603. ABT SUBR ENTRY/EXIT
  1604. SA1 OUTPUT+2 CLOSE OUT FILE *OUTPUT*
  1605. SA2 A1+B1
  1606. BX6 X1-X2
  1607. ZR X6,ABT1 IF NO OUTPUT
  1608. WRITER OUTPUT,R
  1609. ABT1 ABORT
  1610. SPACE 4
  1611. ** ADD - ADD WORD(S) TO MANAGED TABLE.
  1612. *
  1613. * ENTRY (B2) = ADDRESS OF TABLE POINTER.
  1614. * (B3) = FWA OF ENTRY.
  1615.  
  1616.  
  1617. ADD SUBR ENTRY/EXIT
  1618. ADD1 SA1 B2 SET TABLE ADDRESS
  1619. SA2 B2+B1
  1620. SA3 A2+B1
  1621. SA4 A3+B1
  1622. SA5 A4+B1
  1623. IX7 X2-X5
  1624. SB6 X1
  1625. SX6 B6+X7
  1626. SB7 X4 (B7) = NUMBER OF WORDS TO MOVE
  1627. ZR X6,ADD3 IF NO ROOM FOR ENTRY
  1628. SA1 B3 STORE ENTRY
  1629. ADD2 BX7 X1
  1630. SA7 B6+X2
  1631. SX2 X2+B1
  1632. SA1 A1+B1
  1633. SX3 X3-1
  1634. NZ X3,ADD2 LOOP FOR ENTIRE ENTRY
  1635. BX7 X2
  1636. SA7 A2
  1637. EQ ADDX RETURN
  1638.  
  1639. * NO ROOM FOR ENTRY. MOVE OTHER TABLES UP TO MAKE ROOM FOR
  1640. * ENTRY.
  1641.  
  1642. ADD3 SA1 P.BUF
  1643. SA2 L.BUF
  1644. IX6 X2-X4
  1645. PL X6,ADD4 IF ENOUGH FL
  1646. SX6 B0 CLEAR STATUS WORD
  1647. SA6 ADDA
  1648. MX6 29
  1649. SA6 A6+B1
  1650. MEMORY CM,ADDA,R
  1651. MEMORY CM,ADDB,R
  1652. SA1 ADDA GET PRESENT FL
  1653. AX1 30
  1654. SA2 A1+B1 GET MAXIMUM FL
  1655. AX2 30
  1656. SX6 X1+1000B ADD INCREMENT
  1657. IX2 X2-X6
  1658. PL X2,ADD3.1 IF NOT BEYOND MAXIMUM FL
  1659. MESSAGE (=C* REQUIRED FL EXCEEDS VALIDATED LIMIT.*)
  1660. CALL ABT ABORT JOB
  1661.  
  1662. ADD3.1 LX6 30 BUILD STATUS WORD
  1663. SA6 FL
  1664. MEMORY CM,FL,R REQUEST ADDITIONAL FL
  1665. SA2 L.BUF UPDATE SPARE BUFFER LENGTH
  1666. SX6 X2+1000B
  1667. SA6 A2
  1668. EQ ADD3 TRY AGAIN
  1669.  
  1670. ADD4 SB5 X1 (B5) = LWA OF MOVE
  1671. SB6 X5 (B6) = FWA OF MOVE
  1672. SA6 A2
  1673. SB4 A1
  1674. ADD5 SA1 B4 INCREMENT TABLE POINTERS
  1675. SB4 B4-4
  1676. IX7 X1+X4
  1677. SA7 A1
  1678. NE B4,B2,ADD5 LOOP
  1679. SA2 B5
  1680. EQ B5,B6,ADD1 JUMP IF NO DATA TO MOVE
  1681. + SA1 A2-B1 MOVE TABLES
  1682. SA2 A1-B1
  1683. SB5 B5-2
  1684. BX6 X1
  1685. LX7 X2
  1686. SA6 A1+B7
  1687. SA7 A2+B7
  1688. NE B5,B6,*-2
  1689. SX7 B0 CLEAR NEW AREA
  1690. SB7 B6+B7
  1691. + SA7 B6
  1692. SB6 B6+B1
  1693. NE B6,B7,*
  1694. EQ ADD1 MAKE ENTRY
  1695.  
  1696.  
  1697. ADDA CON 0
  1698. ADDB VFD 30/-1,30/0
  1699. ERRNZ ADDB-ADDA-1
  1700. AFN SPACE 4,14
  1701. ** AFN - ASSEMBLE FILE NAME.
  1702. *
  1703. * CHARACTER MASK:
  1704. * EOL = 2000 0000 0000 0000 0000
  1705. * *-* = 0000 0000 0000 0400 0000
  1706. * */* = 0000 0000 0000 0100 0000
  1707. * * * = 0000 0000 0000 0002 0000
  1708. * *,* = 0000 0000 0000 0001 0000
  1709. * ENTRY (B2) = ADDRESS OF STRING BUFFER POINTER.
  1710. * (B3) = ADDRESS TO STORE FILE NAME.
  1711. * EXIT (B2) = ADDRESS OF UPDATED STRING BUFFER POINTER.
  1712. *
  1713. * USES A - 1, 2, 6.
  1714. * X - 0, 1, 2, 6, 7.
  1715. * B - 4, 5, 7.
  1716.  
  1717.  
  1718. AFN SUBR ENTRY/EXIT
  1719. SA1 B2
  1720. SB4 X1+B1
  1721. SB7 60
  1722. SX6 B0
  1723. AFN1 SA1 B4 READ CHARACTER
  1724. SB5 X1+B1
  1725. SA2 =20000000000005030000B
  1726. LX2 X2,B5
  1727. NG X2,AFN2 IF CHARACTER = EOL */* *,* *-*
  1728. LX6 6
  1729. BX6 X6+X1
  1730. SB4 B4+B1
  1731. SB7 B7-6
  1732. EQ AFN1 LOOP FOR NEXT CHARACTER
  1733.  
  1734. AFN2 LX2 X6,B7 STORE FILE NAME
  1735. MX0 42
  1736. BX6 X0*X2
  1737. BX2 -X0*X2
  1738. SX7 =C* FILE NAME TOO LONG.*
  1739. NZ X2,ERR IF FILE NAME, DIRECTIVE .GT. 7 CHARACTERS
  1740. SA6 B3
  1741. AX6 42 CHECK FOR FILE NAME (*)
  1742. SX6 X6-1L*
  1743. NZ X6,AFN3 IF NOT MAIN CORRECTION FILE
  1744. SA1 LGO
  1745. BX6 X0*X1
  1746. SA6 A6
  1747. AFN3 SX6 B4 STORE STRING POINTER
  1748. SA6 B2
  1749. EQ AFNX RETURN
  1750. APN SPACE 4,10
  1751. ** APN - ASSEMBLE PROGRAM NAME.
  1752. *
  1753. * ASSEMBLE ENTRY OF TYPE *LIB/PN,*
  1754. * ENTRY (B2) = ADDRESS OF STRING BUFFER POINTER.
  1755. * (B3) = ADDRESS TO RETURN ENTRY.
  1756. * EXIT (X2) = SEPARATOR CHARACTER
  1757. *
  1758. * USES A - 1, 2, 6, 7.
  1759. * X - 0, 1, 2, 6, 7.
  1760. * B - 4, 5, 7.
  1761.  
  1762.  
  1763. APN SUBR ENTRY/EXIT
  1764. SA1 B2
  1765. SB4 X1+B1 (B4) = STRING BUFFER POINTER
  1766. SA1 RDCE SET DEFAULT LIBRARY
  1767. BX7 X1
  1768. SA7 APNA
  1769. SX6 B0
  1770. SB7 60
  1771.  
  1772. * ASSEMBLE FIRST ENTRY.
  1773.  
  1774. APN1 SA2 B4
  1775. SB5 X2-1R/
  1776. ZR B5,APN2 IF CHARACTER = */*
  1777. SA1 =20000000000004030000B
  1778. SB5 X2+B1
  1779. LX1 X1,B5
  1780. NG X1,APN4 IF CHARACTER = EOL *-* * * *,*
  1781. LX6 6
  1782. SB7 B7-6
  1783. IX6 X6+X2
  1784. SB4 B4+B1
  1785. EQ APN1 LOOP
  1786.  
  1787. * CHARACTER = */* SET LIBRARY NAME. ASSEMBLE PROGRAM NAME.
  1788.  
  1789. APN2 LX6 X6,B7
  1790. SA6 APNA
  1791. SX6 B0
  1792. SB7 60
  1793. SB4 B4+B1
  1794. APN3 SA2 B4
  1795. SB5 X2-1R/
  1796. ZR B5,ERR9 IF CHARACTER = */*
  1797. SA1 =20000000000004030000B
  1798. SB5 X2+B1
  1799. LX1 X1,B5
  1800. NG X1,APN4 IF CHARACTER = EOL *-* * * *,*
  1801. LX6 6
  1802. IX6 X6+X2
  1803. SB7 B7-6
  1804. SB4 B4+B1
  1805. EQ APN3 LOOP
  1806.  
  1807. * CHARACTER = EOL *-* * * *,*. STORE PROGRAM NAME.
  1808.  
  1809. APN4 SA1 APNA CHECK LIBRARY TYPE
  1810. SA2 NAMA
  1811. APN5 ZR X2,NAM2 IF INCORRECT LIBRARY
  1812. BX7 X1-X2
  1813. SA2 A2+B1
  1814. NZ X7,APN5 IF NOT FOUND
  1815. BX7 X1 SET DEFAULT TYPE
  1816. SA7 RDCE
  1817. MX0 42 SET PROGRAM AND LIBRARY NAMES
  1818. LX2 X6,B7
  1819. BX6 X0*X2
  1820. BX2 -X0*X2
  1821. SX7 =C* FILE NAME TOO LONG.*
  1822. NZ X2,ERR IF FILE NAME .GT. 7 CHARACTERS
  1823. SX7 A2-NAMA-1
  1824. BX7 X6+X7
  1825. SA7 B3
  1826. SA2 B4
  1827. SX6 B4
  1828. SA6 B2
  1829. SX6 X2
  1830. EQ APNX RETURN
  1831.  
  1832.  
  1833. APNA DATA 0 LIBRARY NAME
  1834. SPACE 4
  1835. ** BID - BUILD IMPLIED DELETE TABLE.
  1836. *
  1837. * THE INSERT PROGRAM TABLE IS SCANNED TO DETERMINE WHICH
  1838. * PROGRAMS ARE TO BE INSERTED. EACH PROGRAM TO BE INSERTED
  1839. * IS ADDED TO THE IMPLIED DELETE TABLE.
  1840.  
  1841.  
  1842. BID SUBR ENTRY/EXIT
  1843. CALL LIT LIST IGNORE TABLE
  1844. SA6 BIDE SET ERROR COUNT
  1845. SX6 B0 SET IPT INDEX
  1846. SA6 BIDA
  1847. BID1 SA1 P.IPT
  1848. SA2 L.IPT
  1849. SA3 BIDA
  1850. BX6 X2-X3
  1851. ZR X6,BID8 IF END OF INSERT PROGRAM TABLE
  1852. SB6 X1
  1853. SB6 B6+X3 (B6) = IPT ADDRESS
  1854. SA4 B6+B1 SET IPT ENTRY
  1855. SA5 A4+B1
  1856. BX6 X4
  1857. LX7 X5
  1858. SA6 BIDB
  1859. SA7 A6+B1
  1860. AX7 42
  1861. SX7 X7-1L0
  1862. ZR X7,BID6 IF ZERO-LENGTH RECORD INSERT
  1863. SA4 A5+B1
  1864. BX6 X4
  1865. SA6 A7+B1
  1866. SB7 B0 SEARCH PNT FOR START OF INSERT
  1867. SA1 P.PNT
  1868. SA2 L.PNT
  1869. SB5 X1
  1870. SB6 X2
  1871. SA5 BIDB
  1872. MX0 42
  1873. BID2 EQ B6,B7,BID5 IF END OF PNT
  1874. SB7 B7+B1
  1875. SA1 B5+B7 CHECK FILE NAME
  1876. SB7 B7+2
  1877. BX6 X1-X5
  1878. BX6 X0*X6
  1879. NZ X6,BID2 IF FILE NAME NOT FOUND
  1880. SA4 BIDB+1 CHECK PROGRAM NAME
  1881. BX6 X4
  1882. AX6 42
  1883. SX1 X6-1L*
  1884. SB7 B7-3
  1885. ZR X1,BID7 IF ENTIRE FILE INSERT
  1886. BID3 EQ B6,B7,BID5 IF END OF PNT
  1887. SA1 B5+B7
  1888. SA2 A1+B1
  1889. BX6 X2-X5
  1890. BX6 X0*X6
  1891. NZ X6,BID5 IF END OF FILE
  1892. SB7 B7+3
  1893. BX6 X1-X4
  1894. NZ X6,BID3 IF FIRST PROGRAM NOT FOUND
  1895.  
  1896. * FIRST PROGRAM FOUND, MAKE ENTRIES IN IMPLIED DELETE TABLE.
  1897.  
  1898. SX6 B7-3
  1899. BID4 SA6 BIDC
  1900. SA1 P.PNT
  1901. SB5 X1
  1902. SA2 B5+X6
  1903. SA3 A2+B1
  1904. BX6 X2
  1905. LX7 X3
  1906. SA6 BIDD
  1907. SA7 A6+B1
  1908. ADDWRD IDT,A6
  1909. SA1 P.PNT
  1910. SA2 L.PNT
  1911. SA3 BIDC
  1912. SB5 X1
  1913. SB6 X2
  1914. SB7 X3
  1915. SA5 BIDB CHECK FILE
  1916. SA4 BIDB+2 CHECK FOR LAST PROGRAM
  1917. MX0 42
  1918. SA1 B5+B7
  1919. BX6 X1-X4
  1920. ZR X6,BID6 IF LAST PROGRAM FOUND
  1921. SB7 B7+3
  1922. BX6 X4
  1923. AX6 42
  1924. SX1 X6-1L*
  1925. ZR X1,BID7 IF ADD FULL FILE
  1926. SB4 B5+B7 CHECK FILE OF NEXT ENTRY IN THE PNT
  1927. SA1 B4+B1
  1928. EQ B6,B7,BID5 IF END OF PNT
  1929. BX6 X1-X5
  1930. BX7 X0*X6
  1931. SX6 B7
  1932. ZR X7,BID4 IF FILE CONTINUES
  1933.  
  1934. * AN ERROR HAS BEEN DETECTED. OUTPUT INCORRECT DIRECTIVE.
  1935.  
  1936. BID5 CALL OIC,BIDA
  1937. SA1 BIDE INCREMENT ERROR COUNT
  1938. SX6 X1+B1
  1939. SA6 A1
  1940.  
  1941. * END OF INSERT SCAN. LOOP FOR NEXT INSERT CARD.
  1942.  
  1943. BID6 SA1 BIDA
  1944. SX6 X1+4
  1945. SA6 A1
  1946. EQ BID1 LOOP
  1947.  
  1948. * ADD ENTIRE FILE TO IDT.
  1949.  
  1950. BID7 EQ B6,B7,BID6 IF END OF PNT
  1951. SA1 B5+B7 SET IDT ENTRY
  1952. SA2 A1+B1
  1953. SA5 BIDB
  1954. SA4 A5+B1
  1955. BX6 X1
  1956. LX7 X2
  1957. SA6 BIDD
  1958. SA7 A6+B1
  1959. MX0 42
  1960. BX6 X5-X2
  1961. BX6 X0*X6
  1962. NZ X6,BID6 IF END OF FILE
  1963. BX6 X4-X1
  1964. BX6 -X0*X6
  1965. SB7 B7+3
  1966. NZ X6,BID7 IF NOT CORRECT PROGRAM TYPE
  1967. SX7 B7
  1968. SA7 BIDC
  1969. ADDWRD IDT,A6 ADD ENTRY TO IDT
  1970. SA1 P.PNT
  1971. SA2 L.PNT
  1972. SA3 BIDC
  1973. SB5 X1
  1974. SB6 X2
  1975. SB7 X3
  1976. EQ BID7 LOOP
  1977.  
  1978. * CHECK ERROR COUNT.
  1979.  
  1980. BID8 SA1 BIDE
  1981. ZR X1,BIDX IF NO ERRORS
  1982. SA1 TTYI
  1983. ZR X1,BIDX IF TTY INPUT
  1984. CALL C6S,BIDE,BIDF
  1985. CALL MSG,BIDF,(=C* DIRECTIVE ERROR(S).*)
  1986. SA1 CDOP CHECK *NA* OPTION
  1987. NZ X1,BIDX IF NO ABORT
  1988. CALL ABT ABORT JOB
  1989. *
  1990.  
  1991. BIDA DATA 0 INSERT PROGRAM TABLE INDEX
  1992.  
  1993. BIDB VFD 42/,18/ IPT ENTRY - 42/FILE,18/0
  1994. VFD 42/,18/ 42/PROG1,18/LIB1
  1995. VFD 42/,18/ 42/PROG2,18/LIB2
  1996.  
  1997. BIDC DATA 0 PROGRAM NAME TABLE INDEX
  1998.  
  1999. BIDD VFD 42/,18/ IDT ENTRY - 42/PROG,18/LIB
  2000. VFD 42/,18/ 42/FILE,18/POSITION
  2001.  
  2002. BIDE DATA 0 ERROR COUNT
  2003. BIDF DATA 0 ERROR COUNT (DISPLAY CODE)
  2004. CAP SPACE 4,10
  2005. ** CAP - COPY ADDED PROGRAMS.
  2006. *
  2007. * COPY NEW RECORDS (THOSE NOT ON FILE *OLD*) ONTO
  2008. * THE END OF FILE *NEW* (JUST BEFORE EOF).
  2009. *
  2010. * ENTRY (CADD) = 0 IF RECORDS TO BE INSERTED AT EOF.
  2011. *
  2012. * EXIT RECORDS WRITTEN TO FILE *NEW*.
  2013. *
  2014. * USES A - 1, 2, 3, 4, 6.
  2015. * X - 1, 2, 3, 4, 6.
  2016. * B - 2, 3, 6, 7.
  2017. *
  2018. * CALLS CPY, DIS, ORW.
  2019. *
  2020. * MACROS SEARCH.
  2021.  
  2022.  
  2023. CAP SUBR ENTRY/EXIT
  2024. SA1 CADD
  2025. NZ X1,CAPX IF NO INSERT AT EOF
  2026. SX6 B0+
  2027. SA6 CAPA
  2028. CAP1 SA1 P.PNT
  2029. SA2 L.PNT
  2030. SA3 CAPA
  2031. SB6 X2
  2032. SB7 X3
  2033. CAP2 EQ B6,B7,CAPX IF END OF ADD
  2034. SA4 X1+B7 CHECK PNT ENTRY
  2035. SB7 B7+3
  2036. ZR X4,CAP2 IF RECORD REPLACED
  2037. SX6 B7
  2038. SA6 A3
  2039. BX6 X4
  2040. SA1 A4+B1
  2041. SA6 CAPB
  2042. BX6 X1
  2043. SA6 A6+B1
  2044. SEARCH NRT,(A4+B1),(=77777777777777000000B)
  2045. NZ X6,CAP1 IF FILE A NO REPLACE FILE
  2046. SB2 CAPB
  2047. SB3 =H* ADDING*
  2048. RJ DIS
  2049. SA1 CAPA
  2050. SB2 X1-3
  2051. RJ CPY COPY NEW RECORD
  2052. SB2 =5HADDED
  2053. SB3 CAPB+1
  2054. RJ ORW
  2055. EQ CAP1 GET NEXT RECORD
  2056.  
  2057.  
  2058. CAPA BSS 1 PNT INDEX
  2059. CAPB BSS 2 PNT ENTRY
  2060. SPACE 4
  2061. ** CCM - COPY COMMENT ONTO FILE *NEW*.
  2062. *
  2063. * ENTRY (B2) = ADDRESS OF WORKING STORAGE.
  2064. * (B3) = ADDRESS OF PROGRAM NAME.
  2065. *
  2066. * EXIT (X6) = ADDRESS OF TEXT FWA.
  2067. *
  2068. * USES X - 0, 1, 2, 3, 5, 6, 7.
  2069. * A - 1, 2, 3, 5, 6, 7.
  2070. * B - 2, 3, 4, 5, 6, 7.
  2071. *
  2072. * CALLS COB, CPT, EPN, RNP.
  2073. *
  2074. * MACROS CALL, SEARCH, WRITE, WRITECW.
  2075.  
  2076.  
  2077. CCM SUBR ENTRY/EXIT
  2078. SX6 B2 SAVE WORKING STORAGE ADDRESS
  2079. SA6 CCMA
  2080. SA1 B3 SET PROGRAM NAME
  2081. BX6 X1
  2082. SA6 CCMC
  2083. CALL COB CLEAR OUTPUT BUFFER
  2084. SA1 CCMC
  2085. MX0 42
  2086. BX6 X0*X1
  2087. SA6 OUTPUTB+1
  2088. SA2 X1+NAMA
  2089. BX6 X2
  2090. SA6 A6+B1
  2091. SX6 B0 CLEAR COMMENT/DATE BUFFER
  2092. SA6 OUTPUTB+4
  2093. SB7 7
  2094. CCM1 SA6 A6+B1
  2095. SB7 B7-B1
  2096. NZ B7,CCM1 IF NOT END OF BUFFER
  2097. SEARCH CDT,B3,(=77777777777777377777B)
  2098. SA1 CCMA
  2099. ZR X6,CCM14 IF NO COMMENT OR DATE
  2100. SA2 CCMC CHECK RECORD TYPE
  2101. SB3 X2
  2102. ERRNZ TXRT CODE ASSUMES VALUE
  2103. SB2 X2-PRRT+TXRT CHECK FOR TYPE *PROC*
  2104. ZR B3,CCM14 IF TYPE *TEXT*
  2105. ZR B2,CCM14 IF TYPE *PROC*
  2106. SB6 X1
  2107. SB5 X6
  2108. SB3 5 COPY WORDS 3 - 7 OF 7700 TABLE
  2109. SB2 2
  2110. CCM2 SB2 B2+B1
  2111. SA1 B6+B2
  2112. BX6 X1
  2113. SA6 CCMB+B2
  2114. SB3 B3-B1
  2115. NZ B3,CCM2 IF MORE WORDS TO COPY
  2116. SA1 B5+B1 COPY COMMENT
  2117. SX2 -7
  2118. CCM3 BX6 X1
  2119. SA6 A6+B1
  2120. MX7 -12
  2121. BX7 -X7*X1
  2122. ZR X7,CCM4 IF END OF DATA
  2123. SA1 A1+B1
  2124. SX2 X2+B1
  2125. NZ X2,CCM3 IF NOT END OF TABLE
  2126. CCM4 BX6 X6-X6 SET TO CLEAR COMMENT FIELD
  2127. SB3 CCMB+CCMBL-1 LWA OF COMMENT FIELD
  2128. CCM5 SB2 A6 CHECK FOR END OF COMMENT FIELD
  2129. GE B2,B3,CCM6 IF AT END OF COMMENT FIELD
  2130. SA6 A6+B1
  2131. EQ CCM5 LOOP TO END OF PREFIX TABLE
  2132.  
  2133. CCM6 SA1 DATE. COPY DATE
  2134. BX6 X1
  2135. SA6 CCMB+2
  2136. SA1 B6 CHECK FOR 7700 TABLE
  2137. MX0 6
  2138. BX1 X1-X0
  2139. AX1 36
  2140. SB3 X1+B1 SET 7700 TABLE LENGTH
  2141. SB4 X1
  2142. AX1 12
  2143. NZ X1,CCM7 IF NO 7700 TABLE
  2144. SB6 B6+B3 SET TEXT ADDRESS
  2145. SA2 A1+B1 SET PROGRAM NAME
  2146. SA1 B5
  2147. LX1 42
  2148. NG X1,CCM7 IF DATE FLAG SET
  2149. SA1 A2+B1 SET OLD DATE
  2150. SX6 B0
  2151. SA6 CCMB+2
  2152. BX6 X1
  2153. LE B4,B1,CCM7 IF 1 WORD 7700 TABLE
  2154. SA6 A6+
  2155. CCM7 SX6 B6+ SAVE TEXT FWA
  2156. SA6 CCMA
  2157. SB7 X4-OPRT CHECK FOR OPL/OPLC RECORD TYPE
  2158. ZR B7,CCM8 IF OPL
  2159. NE B7,B1,CCM9 IF NOT OPLC
  2160. ERRNZ OPRT+1-OCRT CODE ASSUMES VALUE
  2161. CCM8 SA1 B6-B1
  2162. BX6 X1
  2163. SA6 CCMB+16B
  2164. CCM9 SX6 B0
  2165. SX6 B0 CLEAR COMMENT
  2166. SA6 B5
  2167. SB7 7
  2168. CCM10 SA6 A6+B1
  2169. SB7 B7-B1
  2170. NZ B7,CCM10 IF NOT END OF COMMENT FIELD
  2171. CALL RNP,CCMC,(CCMB+1)
  2172. MX0 42 SET NAME IN 7700 TABLE
  2173. BX6 X0*X6
  2174. SA6 CCMB+1
  2175. CALL EPN,CCMC ENTER PROGRAM NAME
  2176. WRITECW N,R
  2177. WRITE X2,*
  2178. SA1 SC
  2179. BX6 X6-X6
  2180. LX1 30
  2181. SA6 N-2 DISABLE CONTROL WORD WRITE
  2182. BX7 X1
  2183. SA7 N+6 STORE SECTOR COUNT
  2184. WRITEW NEW,CCMB,CCMBL WRITE 17-WORD 7700 TABLE
  2185. SB6 CCMB+10B COPY COMMENT TO OUTPUT
  2186. SA1 CCMB+2 COPY DATE FIRST
  2187. MX2 -12
  2188. SB7 CCMB+16B
  2189. SB5 OUTPUTB+4
  2190. CCM11 BX6 X1
  2191. SA1 B6
  2192. SB6 B6+B1
  2193. SA6 B5
  2194. BX3 -X2*X6
  2195. ZR X3,CCM12 IF END OF DATA
  2196. SB5 B5+B1
  2197. NE B6,B7,CCM11 IF NOT END OF DATA
  2198. CCM12 EQ B6,B7,CCM13 IF END OF BUFFER
  2199. SX6 B0
  2200. SB5 B5+B1
  2201. SA6 B5
  2202. SB6 B6+B1
  2203. EQ CCM12 CONTINUE TO END OF BUFFER
  2204.  
  2205. CCM13 SA1 CCMA
  2206. SX6 X1
  2207. EQ CCMX RETURN
  2208.  
  2209. CCM14 SA1 CCMA
  2210. SA2 X1 CHECK FOR 7700 TABLE
  2211. MX0 6
  2212. BX2 X2-X0
  2213. AX2 48
  2214. NZ X2,CCM15 IF NO 7700 TABLE
  2215. CALL RNP,CCMC CHECK FOR RENAME
  2216. SA5 CCMA
  2217. SB2 CCMC
  2218. BX6 X0*X6 STORE NAME IN PREFIX TABLE
  2219. SA6 X5+B1
  2220. RJ EPN ENTER PROGRAM NAME
  2221. SA3 OUTPUTB+3
  2222. BX6 X3 SET (A6) FOR *CPT* CALL
  2223. SA1 X5
  2224. SA6 A3
  2225. RJ CPT COPY PREFIX TABLE
  2226. BX6 X5
  2227. EQ CCMX RETURN
  2228.  
  2229. CCM15 SB2 CCMC
  2230. RJ RNP CHECK FOR RENAME
  2231. SA2 CCMC
  2232. SA5 CCMA
  2233. SB2 X2
  2234. ERRNZ TXRT CODE ASSUMES VALUE
  2235. NE B2,B1,CCM16 IF NOT TYPE *PP*
  2236. ERRNZ TXRT+1-PPRT CODE ASSUMES VALUE
  2237. MX0 18
  2238. CCM16 SB4 B2+TXRT-PRRT CHECK FOR TYPE *PROC*
  2239. ZR B2,CCM17 IF TYPE *TEXT*
  2240. ZR B4,CCM17 IF TYPE *PROC*
  2241. SA3 X5
  2242. BX6 X0*X6
  2243. BX3 -X0*X3
  2244. BX6 X3+X6
  2245. SA6 X5
  2246. CCM17 SB2 A2
  2247. RJ EPN ENTER PROGRAM NAME
  2248. BX6 X5
  2249. EQ CCMX RETURN
  2250.  
  2251.  
  2252. CCMA DATA 0 ADDRESS OF WORKING STORAGE
  2253.  
  2254. CCMB DATA 77000016000000000000B
  2255. BSSZ 16B
  2256. CCMBL EQU *-CCMB
  2257.  
  2258. CCMC DATA 0 PROGRAM NAME AND TYPE
  2259. CFN SPACE 4,10
  2260. ** CFN - CONVERT FILE NAME.
  2261. *
  2262. * CONVERT LEFT JUSTIFIED FILE NAME INTO A STRING IN
  2263. * THE STRING BUFFER.
  2264. * ENTRY (B2) = ADDRESS OF FILE NAME.
  2265. *
  2266. * USES A - 1, 2, 6.
  2267. * X - 0, 1, 2, 5, 6.
  2268. * B - 6.
  2269.  
  2270.  
  2271. CFN SUBR ENTRY/EXIT
  2272. SA1 B2
  2273. MX0 42
  2274. SA2 SBP
  2275. BX5 X0*X1
  2276. NZ X5,CFN1 IF NOT ZERO FILE NAME
  2277. SX5 3R(0)
  2278. BX5 -X0*X5
  2279. LX5 -18
  2280. CFN1 SB6 X2
  2281. MX0 54
  2282. + LX5 6
  2283. BX6 -X0*X5
  2284. SA6 B6
  2285. SB6 B6+B1
  2286. NZ X6,*-1
  2287. SX6 B6-B1
  2288. SA6 A2
  2289. EQ CFNX RETURN
  2290. CIT SPACE 4,15
  2291. ** CIT - CHECK IGNORE TABLE.
  2292. *
  2293. * SEARCH THE PROGRAM IGNORE TABLE FOR CURRENT FILE.
  2294. * CHECK FOR IGNORING, START OF IGNORE, OR END OF IGNORE.
  2295. * DELETE ENTRY IN IGNORE TABLE ON END OF IGNORE.
  2296. * ENTRY (B2) = ADDRESS OF FILE NAME.
  2297. * (B3) = ADDRESS OF PROGRAM NAME.
  2298. * EXIT (X6) = 0 IF PROGRAM IS IGNORED.
  2299. *
  2300. * USES A - 1, 2, 3, 4, 5.
  2301. * X - 1, 2, 3, 4, 5, 6, 7.
  2302. * B - 6, 7.
  2303.  
  2304.  
  2305. CIT SUBR ENTRY/EXIT
  2306. SX6 B1 CLEAR IGNORE PROGRAM FLAG
  2307. SA1 P.PIT CHECK FILE NAME IN IGNORE TABLE
  2308. SA2 L.PIT
  2309. SB6 X1
  2310. SB7 X2+B6
  2311. SA4 B2 (X4) = FILE NAME
  2312. SA5 B3 (X5) = PROGRAM NAME
  2313. CIT1 EQ B6,B7,CITX IF END OF IGNORE TABLE
  2314. SA1 B6
  2315. BX7 X1-X4
  2316. SB6 B6+3
  2317. NZ X7,CIT1 LOOP IF FILE IS NOT CURRENT FILE
  2318. SA2 A1+B1 CHECK PROGRAM NAME
  2319. SA3 A2+B1
  2320. SX1 1R* BUILD TYPE/*
  2321. SX7 X5 PROPOGATE TYPE
  2322. LX1 54
  2323. BX1 X7+X1
  2324. ZR X2,CIT3 IF IGNORE-ALL IN PROGRESS
  2325. BX7 X5-X2
  2326. BX1 X2-X1
  2327. ZR X7,CIT4 IF TYPE/NAME MATCHES TABLE
  2328. ZR X1,CIT2 IF TABLE ENTRY IS THIS TYPE/*
  2329. AX1 18
  2330. NZ X1,CIT1 IF TABLE ENTRY NOT ANOTHER TYPE/*
  2331. BX7 X5-X3 CHECK END OF IGNORE GROUP
  2332. NZ X7,CIT1 IF NOT END
  2333. CIT2 SX6 B0 SET IGNORE PROGRAM FLAG
  2334. BX7 X5-X3
  2335. NZ X7,CIT1 IF NOT END OF IGNORE
  2336. SA7 A1 CLEAR IGNORE ENTRY
  2337. SA7 A7+1
  2338. SA7 A3
  2339. EQ CIT1 LOOP
  2340.  
  2341. * CHECK FOR IGNORING ALL RECORDS OF ANOTHER TYPE.
  2342.  
  2343. CIT3 BX7 X1-X3
  2344. ZR X7,CIT2 IF IGNORING ALL OF THIS TYPE
  2345. AX7 18
  2346. NZ X7,CIT2 IF NOT IGNORING ALL OF DIFFERENT TYPE
  2347. JP CIT1 LOOP
  2348.  
  2349. * SET IGNORE-ALL FLAG.
  2350.  
  2351. CIT4 SA7 A2
  2352. JP CIT2 GO IGNORE THIS RECORD
  2353. SPACE 4
  2354. ** COB - CLEAR OUTPUT BUFFER.
  2355. *
  2356. * USES X - 1, 6.
  2357. * A - 1, 6.
  2358. * B - 6, 7.
  2359.  
  2360.  
  2361. COB SUBR ENTRY/EXIT
  2362. SA1 =1H
  2363. SB6 OUTPUTB
  2364. SB7 OUTPUTB+DCBL+1
  2365. BX6 X1
  2366. COB1 SA6 B6
  2367. SB6 B6+B1
  2368. NE B6,B7,COB1 LOOP TO END OF BUFFER
  2369. EQ COBX RETURN
  2370. CNO SPACE 4,15
  2371. ** CNO - COPY *NEW* TO *OLD*.
  2372. *
  2373. * PERFORMS *C* OR *COPY OPTION.
  2374. *
  2375. * USES X - 1, 2, 3, 6, 7.
  2376. * A - 1, 3, 6, 7.
  2377. * B - 6, 7.
  2378. *
  2379. * CALLS DIS, SRT.
  2380. *
  2381. * MACROS READCW, READW, REWIND, WRCW, WRITECW.
  2382.  
  2383.  
  2384. CNO SUBR ENTRY/EXIT
  2385. SA1 CCPY CHECK COPY FLAG
  2386. ZR X1,CNO IF NO COPY
  2387. READCW N,17B
  2388. SA3 P+4
  2389. MX7 60
  2390. AX3 18
  2391. SA7 N-2 SET FIRST READ FLAG
  2392. SA7 P-2
  2393. SX6 X3 STORE PRU SIZE
  2394. SA6 A7+B1
  2395. WRITECW A6+B1,* SET FILE STATUS
  2396. CNO1 READW NEW,WSB,WSBL
  2397. NG X1,CNO4 IF EOF
  2398. SB6 WSB
  2399. SB7 X1
  2400. EQ B6,B7,CNO3 IF NO DATA
  2401. BX6 X1
  2402. SA6 CNOA
  2403. SA1 X2-LWP LWA+1 OF DATA TRANSFERED
  2404. SX2 WSB
  2405. RJ SRT SET RECORD TYPE
  2406. SA6 CNOB
  2407. CALL DIS,CNOB,(=H*RECOPYING *)
  2408. SA1 CNOA
  2409. NZ X1,CNO3 IF EOR
  2410. CN02 WRCW P,WSB,WSBL
  2411. READW NEW,WSB,WSBL
  2412. ZR X1,CN02 IF NOT EOR
  2413. NG X1,CNO4 IF EOF
  2414. CNO3 WRCW P,WSB,X1-WSB,R
  2415. EQ CNO1 LOOP TO EOF
  2416.  
  2417. CNO4 SX6 X1+2
  2418. ZR X6,CNO5 IF *EOI*
  2419. MX7 4
  2420. LX7 4+48
  2421. SA7 WDAA+1 SET LEVEL 17 EOR
  2422. WRCW P,0,0
  2423. CNO5 WRITECW P,R FLUSH BUFFER
  2424. REWIND OLD
  2425. REWIND NEW
  2426. EQ CNOX RETURN
  2427.  
  2428.  
  2429. CNOA DATA 0 EOR INDICATOR
  2430. CNOB DATA 0 PROGRAM NAME
  2431. SPACE 4
  2432. ** CNR - CHECK NO REPLACE TABLE.
  2433. *
  2434. * ENTRY (B2) = PROGRAM NAME TABLE INDEX.
  2435. * EXIT (X6) " 0 IF PROGRAM IS IN A NO REPLACE FILE.
  2436. * (X6) = 0 IF PROGRAM IS NOT IN A NO REPLACE FILE.
  2437. *
  2438. * USES A - 1, 2, 6, 7.
  2439. * X - 1, 2, 6, 7.
  2440. * B - 4, 6.
  2441.  
  2442.  
  2443. CNR SUBR ENTRY/EXIT
  2444. SA1 P.PNT
  2445. SB4 B2+X1
  2446. SX6 B2
  2447. SA6 CNRA
  2448. SEARCH NRT,(B4+B1),(=77777777777777000000B)
  2449. ZR X6,CNRX IF NOT IN NO REPLACE TABLE
  2450. SA1 P.PNT DELETE PROGRAM FROM PNT
  2451. SA2 CNRA
  2452. SB6 X1
  2453. SX7 B0
  2454. SA7 B6+X2
  2455. EQ CNRX RETURN
  2456.  
  2457.  
  2458. CNRA DATA 0 PROGRAM NAME TABLE INDEX
  2459. SPACE 4,15
  2460. ** CPL - COPY USER LIBRARY.
  2461. *
  2462. * ENTRY (B2) = ADDRESS OF PROGRAM TYPE.
  2463. * (B3) = ADDRESS TO RETURN STATUS OF NEXT READ.
  2464. * USES A - 1, 2, 6.
  2465. * X - 1, 2, 5, 6, 7.
  2466. * B - 6, 7.
  2467. *
  2468. * CALLS SRT.
  2469. *
  2470. * MACROS READW,WRCW.
  2471.  
  2472.  
  2473. CPL4 READW P,WSA,WSAL
  2474. CPL5 SA2 CPLA
  2475. BX6 X1 RETURN RECORD STATUS
  2476. SA6 X2
  2477.  
  2478. CPL SUBR ENTRY/EXIT
  2479. SA1 B2
  2480. SX6 B3
  2481. SX7 X1-ULRT
  2482. SA6 CPLA
  2483. NZ X7,CPL4 IF NOT *ULIB*
  2484. SX6 0
  2485. SA6 CPLB
  2486. CPL1 READW P,WSA,WSAL
  2487. NG X1,CPL5 IF EOF
  2488. SB6 WSA
  2489. SB7 X1
  2490. EQ B6,B7,CPL3 IF ZERO LENGTH RECORD
  2491. BX5 X1
  2492. SA1 X2-LWP LWA+1 OF DATA TRANSFERED
  2493. SX2 WSA
  2494. RJ SRT SET RECORD TYPE
  2495. SA6 CPLB
  2496.  
  2497. * COPY FROM *OLD* TO *NEW*.
  2498.  
  2499. BX7 X5
  2500. SA2 A6-B1
  2501. BX1 X5
  2502. SA7 X2
  2503. NZ X5,CPL3 IF EOR ON PREVIOUS READ
  2504. CPL2 WRCW N,WSA,WSAL
  2505. READW OLD,WSA,WSAL
  2506. ZR X1,CPL2 IF NOT EOR
  2507. CPL3 WRCW N,WSA,X1-WSA,R
  2508. SA2 CPLB
  2509. SB7 X2-ODRT
  2510. NZ B7,CPL1 LOOP TO END OF USER LIBRARY
  2511. EQ CPL4
  2512.  
  2513.  
  2514. CPLA BSSZ 2
  2515. CPLB EQU CPLA+1
  2516. SPACE 4
  2517. ** CPP - COPY SPECIFIED PROGRAM(S).
  2518. *
  2519. * COPY RECORDS FROM FILE TO *NEW*.
  2520. * ENTRY (B2) = IPT INDEX.
  2521. *
  2522. * USES A - 1, 2, 3, 4, 5, 6, 7.
  2523. * X - ALL.
  2524. * B - 2, 3, 4, 5, 6, 7.
  2525. *
  2526. * CALLS CPY, DIS, OIC, ORW.
  2527. *
  2528. * MACROS CALL, MESSAGE, WRCW.
  2529.  
  2530.  
  2531. CPP SUBR ENTRY/EXIT
  2532. SA1 P.IPT
  2533. SX6 B2
  2534. SA6 CPPA
  2535. SX5 B2+X1
  2536. SA5 X5+B1 SET FILE NAME
  2537. SA2 A5+B1 SET FIRST PROGRAM
  2538. SA3 A2+B1 SET LAST PROGRAM
  2539. BX6 X5
  2540. LX7 X2
  2541. SA6 CPPB
  2542. SA7 A6+B1
  2543. BX6 X3
  2544. SA6 A7+B1
  2545.  
  2546. * CHECK FOR 0-LENGTH RECORD INSERT.
  2547.  
  2548. AX2 42
  2549. SX2 X2-1L0
  2550. ZR X2,CPP4 IF 0-LENGTH RECORD
  2551.  
  2552. * SEARCH PNT FOR START OF INSERT
  2553.  
  2554. SB7 B0
  2555. SA1 P.PNT
  2556. SA2 L.PNT
  2557. SB5 X1
  2558. ZR X2,CPP2 IF EMPTY PNT
  2559. SB6 X2
  2560. MX0 42
  2561. SB4 3
  2562. SB3 B5+B7
  2563. SA1 B3+B1 CHECK FILE NAME
  2564. + EQ B6,B7,CPP2 IF END OF PNT
  2565. BX6 X1-X5
  2566. SB7 B7+B4
  2567. BX6 X0*X6
  2568. SA1 A1+B4
  2569. NZ X6,*-1 IF FILE NAME NOT FOUND
  2570. SB7 B7-B4
  2571. SA4 A5+B1 CHECK PROGRAM NAME
  2572. BX6 X4
  2573. AX6 42
  2574. SX1 X6-1L*
  2575. ZR X1,CPP3 IF ENTIRE FILE INSERT
  2576. + EQ B6,B7,CPP2 IF END OF PNT
  2577. SA1 B5+B7
  2578. SA2 A1+B1
  2579. BX6 X2-X5
  2580. BX6 X0*X6
  2581. NZ X6,CPP2 IF END OF FILE
  2582. SB7 B7+B4
  2583. BX6 X1-X4
  2584. NZ X6,*-2 LOOP FOR FIRST PROGRAM
  2585. SX6 B7-B4 SET PNT INDEX
  2586. SA6 CPPC
  2587.  
  2588. * FIRST PROGRAM FOUND, START COPY.
  2589.  
  2590. CPP1 SA1 CPPC
  2591. SA2 P.PNT
  2592. IX3 X1+X2
  2593. CALL DIS,X3,(=H*INSERTING *)
  2594. SA1 CPPC
  2595. CALL CPY,X1
  2596. CALL ORW,(=8HINSERTED),CPPB
  2597. SA1 P.PNT CHECK FOR END OF COPY
  2598. SA2 L.PNT
  2599. SA3 CPPC
  2600. SB5 X1
  2601. SB6 X2
  2602. SB4 3
  2603. SA5 CPPB CHECK FILE
  2604. SA1 A5+B1 CHECK PROGRAM NAME
  2605. SA4 A1+B1
  2606. MX0 42
  2607. SB7 X3+B4
  2608. BX6 X1-X4
  2609. ZR X6,CPP5 IF LAST PROGRAM FOUND RETURN
  2610. BX6 X4
  2611. AX6 42
  2612. SX1 X6-1L*
  2613. ZR X1,CPP3 IF ADD FULL FILE
  2614. SB2 B5+B7 CHECK FILE OF NEXT ENTRY IN THE PNT
  2615. SA1 B2+B1
  2616. EQ B6,B7,CPP2 IF END OF PNT
  2617. BX6 X1-X5
  2618. SX7 B7
  2619. SA7 CPPC
  2620. SA1 B2 SET CURRENT PROGRAM NAME
  2621. BX7 X1
  2622. SA7 A5+B1
  2623. BX6 X0*X6
  2624. ZR X6,CPP1 IF FILE CONTINUES
  2625.  
  2626. * AN ERROR HAS BEEN DETECTED. SEND MESSAGE AND ABORT.
  2627.  
  2628. CPP2 CALL OIC,CPPA OUTPUT INSERT DIRECTIVE
  2629. SA1 TTYI
  2630. ZR X1,CPP5 IF TERMINAL INPUT
  2631. MESSAGE (=C*OVERLAPPING INSERT OR DELETE.*)
  2632. SA1 CDOP CHECK *NA* OPTION
  2633. NZ X1,CPP5 RETURN IF NO ABORT
  2634. CALL ABT ABORT JOB
  2635.  
  2636. * ADD ENTIRE FILE TO FILE NEW.
  2637.  
  2638. CPP3 EQ B6,B7,CPP5 RETURN IF END OF PNT
  2639. SX6 B7
  2640. SA2 B5+B7 CHECK PROGRAM TYPE
  2641. SA6 CPPC
  2642. SA5 CPPB CHECK FILE NAME
  2643. SA4 A5+B1
  2644. SA1 A2+B1
  2645. BX7 X1-X5
  2646. BX7 X0*X7
  2647. NZ X7,CPP5 RETURN IF END OF FILE
  2648. BX7 X2-X4
  2649. BX7 -X0*X7
  2650. SB7 B7+B4
  2651. NZ X7,CPP3 IF NOT CORRECT PROGRAM TYPE
  2652. ZR X2,CPP3 IF PROGRAM ALREADY INSERTED
  2653. SA1 P.PNT
  2654. IX3 X6+X1
  2655. CALL DIS,X3,(=H*INSERTING *)
  2656. SA1 CPPC
  2657. CALL CPY,X1 COPY RECORD
  2658. CALL ORW,(=8HINSERTED),CPPB
  2659. SA1 P.PNT
  2660. SA2 L.PNT
  2661. SA3 CPPC
  2662. SB5 X1
  2663. SB6 X2
  2664. SB4 3
  2665. MX0 42
  2666. SB7 X3+B4
  2667. EQ CPP3 LOOP
  2668.  
  2669. * WRITE 0-LENGTH RECORD.
  2670.  
  2671. CPP4 SB2 =0 ENTER ZERO LENGTH RECORD
  2672. RJ EPN
  2673. ADDWRD NPT,NIND
  2674. WRCW N,B0,B0 WRITE ZERO LENGTH RECORD
  2675. CALL OZR,(=8HINSERTED),(=1H ),(=2H00)
  2676.  
  2677. * CLEAR IPT ENTRY.
  2678.  
  2679. CPP5 SA1 P.IPT
  2680. SA2 CPPA
  2681. SB5 X1
  2682. SX6 B0
  2683. SA6 B5+X2
  2684. SA6 A6+B1
  2685. SA6 A6+B1
  2686. SA6 A6+B1
  2687. EQ CPPX RETURN
  2688.  
  2689.  
  2690. CPPA DATA 0 INSERT PROGRAM TABLE INDEX
  2691.  
  2692. CPPB VFD 42/,18/ FILE NAME
  2693. VFD 42/,18/ FIRST PROGRAM
  2694. VFD 42/,18/ LAST PROGRAM
  2695.  
  2696. CPPC DATA 0 PROGRAM NAME TABLE INDEX
  2697. SPACE 4
  2698. ** CPY - COPY RECORD TO FILE NEW.
  2699. *
  2700. * ENTRY (B2) = PNT INDEX.
  2701. *
  2702. * USES A - 1, 2, 3, 4, 5, 6, 7.
  2703. * X - 1, 2, 3, 4, 5, 6, 7.
  2704. * B - 2, 4, 5, 6.
  2705. *
  2706. * CALLS ABT, CCM, COB, MSG, RCW, SFN.
  2707. *
  2708. * MACROS BKSP, CALL, READ, READCW, READW, RECALL, WRCW.
  2709.  
  2710.  
  2711. CPY SUBR ENTRY/EXIT
  2712. CALL COB CLEAR OUTPUT BUFFER
  2713. SX6 B2
  2714. SA1 P.PNT SET PROGRAM NAME
  2715. SA4 B2+X1
  2716. ZR X4,CPY IF PROGRAM ALREADY REPLACED
  2717. SA6 CPYA
  2718. SA5 A4+B1
  2719. BX6 X4
  2720. LX7 X5
  2721. SA6 CPYB
  2722. SA7 LGO
  2723. SA7 A6+B1
  2724. SA4 A5+B1 SET RANDOM ADDRESS
  2725. BX6 X4
  2726. SX7 B0
  2727. SA6 S+6
  2728. SA7 CW
  2729.  
  2730. * COPY RECORD.
  2731.  
  2732. READ S READ FILE *S*
  2733. READW S,WSB,WSBL
  2734. NG X1,CPY11 IF END OF FILE
  2735. SX6 X1
  2736. SA6 CPYD
  2737. CALL CCM,WSB,CPYB
  2738. SA1 CPYB
  2739. SB2 X1
  2740. ERRNZ TXRT CODE ASSUMES VALUE
  2741. NZ B2,CPY1 IF NOT TEXT
  2742. SA3 WSB CHECK FIRST WORD OF TEXT RECORD
  2743. MX7 6
  2744. BX7 X3-X7
  2745. AX7 48
  2746. ZR X7,CPY1 IF 7700 TABLE PRESENT
  2747. SA1 X6 REMOVE BLANKS FROM RECORD NAME
  2748. RJ SFN GENERATE MASK OF BLANKS
  2749. BX7 X7*X1 REMOVE BLANKS
  2750. SX6 A1 RESTORE X6
  2751. SA7 A1
  2752. CPY1 SA3 SC
  2753. SA1 CPYD
  2754. BX7 X3 SET RANDOM ADDRESS
  2755. SB6 X6
  2756. SA7 NIND+1
  2757. NZ X1,CPY3 IF EOR SENSED
  2758. SB7 WSB+WSBL
  2759. WRCW N,B6,B7-B6
  2760. CPY2 READW S,WSB,WSBL
  2761. SB6 WSB
  2762. NZ X1,CPY3 IF EOR SENSED
  2763. WRCW N,B6,WSBL
  2764. EQ CPY2 CONTINUE READ
  2765. CPY3 SB7 X1
  2766. WRCW N,B6,B7-B6,R
  2767. SA1 CPYB CHECK PROGRAM TYPE
  2768. SB4 X1-ULRT
  2769. NZ B4,CPY9 IF NOT USER LIBRARY
  2770.  
  2771. * COPY USER LIBRARY.
  2772.  
  2773. SX6 1
  2774. SA6 CW SET CONTROL WORD READ FLAG
  2775. READCW S,17B
  2776. CPY4 READW S,WSB,WSBL
  2777. PL X1,CPY5 IF NOT EOF
  2778. BKSP S,R
  2779. EQ CPY9 CLEAR PROGRAM NAME
  2780. CPY5 SB6 WSB
  2781. SB7 X1
  2782. EQ B6,B7,CPY8 IF 0-LENGTH RECORD
  2783. SX6 X1
  2784. SA6 CPYD
  2785. SA1 X2-LWP LWA+1 OF DATA TRANSFERED
  2786. SX2 WSB
  2787. RJ SRT SET RECORD TYPE
  2788. SA6 CPYB
  2789. SA1 CPYD
  2790. EQ CPY7 CHECK FOR EOR
  2791.  
  2792. CPY6 WRCW N,WSB,WSBL
  2793. READW S,WSB,WSBL
  2794. CPY7 ZR X1,CPY6 IF NOT EOR
  2795. CPY8 WRCW N,WSB,X1-WSB,R
  2796. SA2 CPYB
  2797. SX6 X2-ODRT
  2798. NZ X6,CPY4 IF NOT END OF USER LIBRARY
  2799. RECALL S
  2800. SA3 S+2
  2801. BX7 X3 SET BUFFER EMPTY
  2802. SA7 A3+B1
  2803.  
  2804. * CLEAR PROGRAM NAME.
  2805.  
  2806. CPY9 SA1 N-2
  2807. NG X1,CPY10 IF CONTROL WORD WRITE ENABLED
  2808. RJ RCW
  2809.  
  2810. CPY10 ADDWRD NPT,NIND WRITE NEW INDEX
  2811. SA1 P.PNT CLEAR PROGRAM NAME
  2812. SA2 CPYA
  2813. SB5 X1
  2814. SX6 B0
  2815. SA6 B5+X2
  2816. SX7 B1
  2817. SA7 CW
  2818. EQ CPYX RETURN
  2819.  
  2820. * END OF FILE DETECTED. ABORT JOB.
  2821.  
  2822. CPY11 CALL MSG,(CPYB+1),(=C* NOT DECLARED NRANDOM.*)
  2823. SA1 CDOP CHECK *NA* OPTION
  2824. NZ X1,CPY9 IF NO ABORT
  2825. CALL ABT
  2826.  
  2827.  
  2828. CPYA DATA 0 PNT INDEX
  2829.  
  2830. CPYB VFD 42/,18/ PROGRAM NAME
  2831. VFD 42/,18/ FILE AND POSITION
  2832.  
  2833. CPYD DATA 0 EOR INDICATION
  2834. CRR SPACE 4,10
  2835. ** CRR - CHECK RECORDS REPLACED.
  2836. *
  2837. * USES A - ALL.
  2838. * X - ALL.
  2839. * B - 2, 3, 6, 7.
  2840. *
  2841. * CALLS ABT, CFN, COB, C6S, MST, LOL, OCC, OIC, OSB, STB.
  2842. *
  2843. * MACROS CALL, SEARCH.
  2844.  
  2845.  
  2846. CRR SUBR ENTRY/EXIT
  2847. CALL STB,CRRC SET TITLE BUFFER
  2848. SB6 B0+
  2849. CALL STB,CRRD
  2850. SB6 B1
  2851. SX6 B0
  2852. SA6 CRRA
  2853. CRR1 SA1 P.PNT CHECK PROGRAM NAME TABLE
  2854. SA2 L.PNT
  2855. SA3 CRRA
  2856. SB6 X2
  2857. SB7 X3
  2858. CRR2 EQ B6,B7,CRR3 IF END OF PNT
  2859. SA4 X1+B7 CHECK PNT ENTRY
  2860. SB7 B7+3
  2861. ZR X4,CRR2 IF PROGRAM REPLACED
  2862. SX6 B7
  2863. SA6 A3
  2864. SEARCH NRT,(A4+B1),(=77777777777777000000B)
  2865. NZ X6,CRR1 IF FILE IN NO REPLACE TABLE
  2866. SA1 CRRB INCREMENT ERROR COUNT
  2867. SX6 X1+B1
  2868. SA6 A1
  2869. CALL COB CLEAR OUTPUT BUFFER
  2870. SA1 CRRA OUTPUT RECORD, TYPE, AND FILE
  2871. SA2 P.PNT
  2872. SB6 X1-3
  2873. SA1 B6+X2
  2874. SA2 A1+B1
  2875. MX0 42
  2876. BX6 X0*X1
  2877. BX7 X0*X2
  2878. SA6 OUTPUTB+1
  2879. SA3 X1+NAMA
  2880. BX6 X3
  2881. SA6 A6+B1
  2882. SA7 A6+B1
  2883. CALL LOL LIST ONE LINE
  2884. EQ CRR1 LOOP TO END OF PNT
  2885.  
  2886. * CHECK DELETE PROGRAM TABLE.
  2887.  
  2888. CRR3 SB6 B0+ SET TITLE
  2889. CALL STB,CRRF
  2890. SB6 B1+
  2891. CALL STB,CRRG
  2892. SX6 B0
  2893. SA6 CRRA
  2894.  
  2895. * OUTPUT ERROR MESSAGE.
  2896.  
  2897. SA1 CRRB
  2898. BX6 X1
  2899. SA6 CRRB+2
  2900. ZR X1,CRR4 IF NO ERRORS
  2901. CALL C6S,CRRB,CRRA
  2902. CALL MSG,CRRA,(=C* RECORD(S) NOT REPLACED.*)
  2903. SX6 B0
  2904. SA6 CRRA
  2905. SA6 CRRB
  2906. CRR4 CALL COB CLEAR OUTPUT BUFFER
  2907. SA1 P.DPT
  2908. SA2 L.DPT
  2909. SA3 CRRA
  2910. SB6 X2
  2911. SB7 X3
  2912. SX0 7777B DELETE FLAG
  2913. CRR5 EQ B6,B7,CRR7 IF END OF DPT
  2914. SA4 X1+B7
  2915. BX5 X0-X4 COMPARE WITH DELETE FLAG
  2916. SB7 B7+2
  2917. ZR X5,CRR5 IF PROGRAM DELETED
  2918. MX5 -12 CHECK FOR -TYPE/*-
  2919. LX4 12
  2920. BX5 -X5*X4
  2921. LX4 -12
  2922. SX5 X5-1R**100B
  2923. ZR X5,CRR5 IF -TYPE/*- ENTRY
  2924. SA1 CRRB INCREMENT ERROR COUNT
  2925. SX6 X1+B1
  2926. SA6 A1
  2927. SA5 A4+B1 SET DELETE ENTRY
  2928. SA1 LIBP ISOLATE RECORD NAME
  2929. BX6 -X1*X4
  2930. MX0 -12 ISOLATE RECORD TYPE
  2931. BX4 -X0*X4
  2932. LX7 X5
  2933. SA6 CRRE
  2934. SA7 A6+B1
  2935. SX6 B7
  2936. SA6 A3
  2937. SA1 =10H*DELETE
  2938. BX7 X1
  2939. SA7 OUTPUTB+1
  2940. CALL CFN,(X4+OICD)
  2941. CALL CFN,CRRE OUTPUT PROGRAM NAME
  2942. SA1 CRRE CHECK FOR END OF DELETE
  2943. SA2 A1+B1
  2944. BX6 X1-X2
  2945. ZR X6,CRR6 IF FIRST PROGRAM = LAST PROGRAM
  2946. CALL CFN,(=1L-)
  2947. SA2 CRRE+1 OUTPUT LIBRARY NAME
  2948. CALL CFN,(X2+OICD)
  2949. CALL CFN,(CRRE+1)
  2950. CRR6 CALL OSB OUTPUT STRING BUFFER
  2951. EQ CRR4 LOOP TO END OF DPT
  2952.  
  2953. ** CHECK INSERT PROGRAM TABLE.
  2954.  
  2955. CRR7 SA1 CRRB SAVE ERROR COUNT
  2956. SA2 A1+B1
  2957. IX6 X1+X2
  2958. SA6 A2
  2959. SX6 B0
  2960. SA6 A1
  2961. SA6 CRRA
  2962. CRR8 SA1 P.IPT
  2963. SA2 L.IPT
  2964. SA3 CRRA
  2965. SB6 X2
  2966. SB7 X3
  2967. CRR9 EQ B6,B7,CRR10 IF END OF INSERT PROGRAM TABLE
  2968. SA4 X1+B7
  2969. SB7 B7+4
  2970. ZR X4,CRR9 IF PROGRAMS INSERTED
  2971. SX6 B7
  2972. SA6 A3
  2973. SX6 X6-4
  2974. SA6 CRRH
  2975. CALL OIC,A6 OUTPUT INSERT DIRECIVE
  2976. SA2 CRRB INCREMENT ERROR COUNT
  2977. SX6 X2+B1
  2978. SA6 A2
  2979. EQ CRR8 LOOP TO END OF IPT
  2980.  
  2981. ** CHECK COMMENT/DATE TABLE.
  2982.  
  2983. CRR10 SA1 CRRB SAVE ERROR COUNT
  2984. SA2 A1+B1
  2985. IX6 X1+X2
  2986. SA6 A2
  2987. SX6 B0
  2988. SA6 A1
  2989. SA6 CRRA
  2990. CRR11 SA1 P.CDT
  2991. SA2 L.CDT
  2992. SA3 CRRA
  2993. SB6 X2
  2994. SB7 X3
  2995. CRR12 EQ B6,B7,CRR13 IF END OF COMMENT/DATE TABLE
  2996. SA4 X1+B7 CHECK ENTRY
  2997. SB7 B7+8
  2998. ZR X4,CRR12 IF COMMENT PROCESSED
  2999. SX6 B7
  3000. SA6 A3
  3001. CALL OCC,(B7-8) OUTPUT COMMENT DIRECTIVE
  3002. SA2 CRRB
  3003. SX6 X2+B1
  3004. SA6 A2
  3005. EQ CRR11 LOOP TO END OF CDT
  3006.  
  3007. ** OUTPUT ERROR MESSAGE.
  3008.  
  3009. CRR13 SA1 CRRB
  3010. SA2 A1+B1
  3011. IX6 X1+X2
  3012. SA6 A1
  3013. SA3 A2+B1
  3014. IX3 X6+X3
  3015. ZR X3,CRRX IF NO ERRORS
  3016. ZR X6,CRR14 IF ALL DIRECTIVES PROCESSED
  3017. SA1 TTYI
  3018. ZR X1,CRRX IF TTY INPUT
  3019. CALL C6S,CRRB,CRRA
  3020. CALL MSG,CRRA,(=C* DIRECTIVE ERROR(S).*)
  3021. CRR14 SA1 CDOP CHECK D OPTION
  3022. NZ X1,CRRX IF NO ABORT
  3023. CALL ABT ABORT JOB
  3024.  
  3025.  
  3026. CRRA DATA 0 TABLE INDEX
  3027.  
  3028. CRRB DATA 0 ERROR COUNT
  3029. DATA 0
  3030. DATA 0
  3031.  
  3032. CRRC DATA C* ERROR DIRECTORY - RECORDS NOT REPLACED.*
  3033. CRRD DATA C* RECORD TYPE FILE*
  3034.  
  3035. CRRE VFD 42/,18/ DPT ENTRY - 42/PROG1,18/LIB1
  3036. VFD 42/,18/ 42/PROG2,18/LIB2
  3037.  
  3038. CRRF DATA C* ERROR DIRECTORY - DIRECTIVES NOT PERFORMED.*
  3039. CRRG DATA C* *
  3040. CRRH DATA 0 INSERT PROGRAM TABLE INDEX
  3041. SPACE 4
  3042. ** C6S - CONVERT 6 DIGITS WITH LEADING ZERO SUPPRESSION.
  3043. *
  3044. * ENTRY (B2) = ADDRESS OF RIGHT JUSTIFIED NUMBER.
  3045. * (B3) = ADDRESS TO STORE RESULT.
  3046. *
  3047. * USES X - 0, 1, 2, 3, 4, 5, 6.
  3048. * A - 1, 2, 3, 6.
  3049. * B - 2, 7.
  3050.  
  3051.  
  3052. C6S SUBR ENTRY/EXIT
  3053. SA2 =0.1000000001P48
  3054. SA3 =10.0P0
  3055. SA4 =1H
  3056. SB6 6
  3057. SB5 1R0-1R
  3058. SA1 B2
  3059. SB2 18
  3060. PX1 X1
  3061. BX6 X4
  3062. C6S1 DX4 X1*X2
  3063. FX1 X1*X2
  3064. SB7 X1
  3065. LX6 54
  3066. SB2 B2+B6
  3067. FX5 X4*X3 CALCULATE REMAINDER DIGIT
  3068. SX0 X5+B5
  3069. IX6 X0+X6
  3070. NZ B7,C6S1 IF NOT ENTIRE NUMBER
  3071. LX6 X6,B2 POSITION NUMBER
  3072. SA6 B3
  3073. EQ C6SX RETURN
  3074. SPACE 4
  3075. ** DIS - DISPLAY MESSAGE.
  3076. *
  3077. * ENTRY (B2) = ADDRESS OF PROGRAM NAME.
  3078. * (B3) = ADDRESS OF MESSAGE.
  3079. *
  3080. * USES A - 1, 2, 6, 7.
  3081. * X - 0, 1, 2, 6, 7.
  3082.  
  3083.  
  3084. DIS SUBR ENTRY/EXIT
  3085. SA1 B2
  3086. SA2 B3
  3087. MX0 42
  3088. BX6 X2
  3089. BX7 X0*X1
  3090. SA6 DISA
  3091. SA7 A6+B1
  3092. MESSAGE A6,1
  3093. EQ DISX RETURN
  3094.  
  3095.  
  3096. DISA BSS 2
  3097. SPACE 4
  3098. ** EPN - ENTER PROGRAM NAME IN NEW PROGRAM TABLE.
  3099. *
  3100. * ENTRY (B2) = ADDRESS OF PROGRAM NAME AND TYPE.
  3101. *
  3102. * USES A - 1, 6, 7.
  3103. * X - 1, 6, 7.
  3104.  
  3105.  
  3106. EPN SUBR ENTRY/EXIT
  3107. SA1 B2
  3108. BX6 X1
  3109. SA6 NIND
  3110. SA1 SC
  3111. LX7 X1 SET RELATIVE SECTOR ADDRESS
  3112. SA7 A6+B1
  3113. EQ EPNX RETURN
  3114. GUL SPACE 4,15
  3115. ** GUL - GENERATE USER LIBRARY (*LIBGEN* CALL).
  3116. *
  3117. * SET UP CALLING PARAMETERS AND CALL *LIBGEN*
  3118. * PROGRAM (OVERLAYING PRESENT *LIBEDIT* ROUTINE)
  3119. * TO GENERATE USER LIBRARY.
  3120. *
  3121. * ENTRY (GULC) THRU (GULJ) SET UP FOR CALL.
  3122. *
  3123. * EXIT TO *LIBGEN*.
  3124. *
  3125. * MACROS MESSAGE, OVERLAY, RECALL, SETLOF.
  3126.  
  3127.  
  3128. GUL SUBR ENTRY/EXIT
  3129. SA1 CULB
  3130. ZR X1,GULX IF NO *U* OPTION
  3131. RECALL OUTPUT
  3132. MESSAGE (=C* LIBGEN*),1
  3133. RECALL S
  3134. RECALL OLD
  3135. RECALL NEW
  3136. SA1 GULC MOVE PARAMETERS TO ARGR
  3137. BX6 X1
  3138. SA6 ARGR
  3139. GUL2 ZR X6,GUL3 IF END OF MOVE
  3140. SA1 A1+B1
  3141. BX6 X1
  3142. SA6 A6+1
  3143. EQ GUL2 MOVE NEXT ARGUMENT
  3144.  
  3145. GUL3 SX7 A6-ARGR
  3146. SA2 FL
  3147. SA7 ACTR SET NUMBER OF PARAMETERS
  3148. LX2 30
  3149. SA0 X2+
  3150. SETLOF =0 CLEAR LIST OF FILES POINTER
  3151. OVERLAY GULA,,SYSTEM
  3152. PS
  3153.  
  3154.  
  3155. GULA VFD 36/6LLIBGEN,24/0
  3156.  
  3157. GULC VFD 42/0LF,18/1R=
  3158. GULD VFD 42/0LZZZZZG2,18/0
  3159. VFD 42/0LP,18/1R=
  3160. GULF VFD 42/0LNEW,18/0
  3161. VFD 42/0LN,18/1R=
  3162. GULH VFD 42/0LULIB,18/0
  3163. VFD 42/0LNX,18/1R=
  3164. GULJ VFD 42/0L0,18/0
  3165. CON 0 END OF ARGUMENTS FOR *LIBGEN*
  3166. ILO SPACE 4,10
  3167. ** ILO - INTERPRET LIST OPTIONS.
  3168. *
  3169. * ENTRY (A1) = ADDRESS OF OPTION WORD.
  3170. * (X1) = LIST OPTIONS.
  3171. *
  3172. * EXIT ((A1)) = INTERPRETTED LIST OPTIONS.
  3173. * (X1) = 0 IF NO ERROR.
  3174. *
  3175. * USES X - 0, 1, 2, 3, 4, 6.
  3176. * A - 2, 6.
  3177.  
  3178.  
  3179. ILO4 SA6 A1+ SET LIST OPTIONS
  3180.  
  3181. ILO SUBR ENTRY/EXIT
  3182. SX6 B0+ INITIALIZE INTERPRETTED LIST OPTIONS
  3183. MX0 6
  3184. ILO1 SA2 ILOA-1
  3185. BX4 X0*X1
  3186. ILO2 SA2 A2+B1
  3187. ZR X2,ILO3 IF END OF OPTIONS
  3188. BX2 X4-X2
  3189. BX3 X0*X2
  3190. NZ X3,ILO2 IF NO MATCH
  3191. SX3 X2
  3192. BX6 X3+X6
  3193. BX1 -X0*X1
  3194. ZR X1,ILO4 IF ALL OPTIONS PROCESSED
  3195. LX1 6
  3196. EQ ILO1 PROCESS NEXT OPTION
  3197.  
  3198. ILO3 SX1 B1+ SET ERROR
  3199. EQ ILOX RETURN
  3200.  
  3201.  
  3202. ILOA CON 1LF+17B FULL
  3203. CON 1LC+4B DIRECTIVES
  3204. CON 1LM+2B SHORT
  3205. CON 1LE+1B ERRORS
  3206. CON 1LN+10B RECORDS WRITTEN
  3207. CON 0
  3208. LIT SPACE 4,15
  3209. ** LIT - LIST IGNORE TABLE.
  3210. *
  3211. * EXIT (X6) = ERROR COUNT.
  3212. *
  3213. * USES A - 1, 2, 3, 6, 7.
  3214. * X - 1, 2, 3, 6, 7.
  3215. * B - 2.
  3216. *
  3217. * CALLS CFN, COB, LOL, OSB.
  3218. *
  3219. * MACROS CALL, WRITEC.
  3220.  
  3221.  
  3222. LIT SUBR ENTRY/EXIT
  3223. LIT1 SA1 P.PIT
  3224. SA2 L.PIT
  3225. SA3 LITA PIT INDEX
  3226. BX6 X2-X3
  3227. NZ X6,LIT2 IF NOT END OF TABLE
  3228. SA1 LITB ERROR COUNT
  3229. BX6 X1
  3230. EQ LITX RETURN
  3231.  
  3232. LIT2 IX1 X1+X3
  3233. SA2 X1
  3234. NZ X2,LIT4 IF ENTRY NOT PROCESSED
  3235. LIT3 SA3 LITA ADVANCE PIT INDEX
  3236. SX6 X3+3
  3237. SA6 LITA
  3238. EQ LIT1 LOOP
  3239.  
  3240. * LIST UNPROCESSED ENTRY.
  3241.  
  3242. LIT4 BX6 X2 COPY IPT ENTRY
  3243. SA1 A2+B1
  3244. SA6 LITC
  3245. BX7 X1
  3246. SA2 A1+B1
  3247. SA7 A6+B1
  3248. BX6 X2
  3249. SA6 A7+B1
  3250. SX1 1R*
  3251. LX1 54
  3252. ZR X7,LIT5 IF START OF IGNORE FOUND
  3253. BX6 X6-X1
  3254. AX6 18
  3255. NZ X6,LIT6 IF NOT IGNORE ALL OF TYPE
  3256. LIT5 BX7 X7-X1
  3257. AX7 18
  3258. ZR X7,LIT3 IF IGNORE TO END OF FILE
  3259. LIT6 CALL COB CLEAR OUTPUT BUFFER
  3260. WRITEC OUTPUT,(=C* *)
  3261. SA1 =H/ *ERROR* DIRECTIVE CANNOT BE PERFORMED./
  3262. SB2 4
  3263. BX6 X1
  3264. SA6 OUTPUTB
  3265. LIT7 SA1 A1+B1
  3266. SB2 B2-B1
  3267. BX6 X1
  3268. SA6 A6+B1
  3269. NZ B2,LIT7 IF NOT 4 WORDS
  3270. CALL LOL LIST ONE LINE
  3271. CALL COB CLEAR OUTPUT BUFFER
  3272. SA2 =5H*FILE LIST FILE NAME
  3273. BX6 X2
  3274. SA6 OUTPUTB+1
  3275. CALL CFN,LITC OUTPUT FILE NAME
  3276. CALL OSB OUTPUT STRING BUFFER
  3277. SA2 =7H*IGNORE OUTPUT IGNORE CARD
  3278. SA1 LITC+1
  3279. BX6 X2
  3280. SA6 OUTPUTB+1
  3281. NZ X1,LIT8 IF IGNORE NOT STARTED
  3282. CALL CFN,(=6LTEXT/,)
  3283. EQ LIT9 OUTPUT PROGRAM NAME
  3284. LIT8 CALL CFN,X1+OICD
  3285. CALL CFN,LITC+1 OUTPUT PROGRAM NAME
  3286. SA1 LITC+1 CHECK SINGLE IGNORE
  3287. SA2 A1+B1
  3288. BX6 X1-X2
  3289. ZR X6,LIT10 IF FIRST PROGRAM = LAST PROGRAM
  3290. LIT9 CALL CFN,(=1L-)
  3291. SA2 LITC+2 OUTPUT LIBRARY NAME
  3292. CALL CFN,X2+OICD
  3293. CALL CFN,LITC+2
  3294. LIT10 CALL OSB OUTPUT STRING BUFFER
  3295. SA1 LITB ADVANCE ERROR COUNT
  3296. SX6 X1+B1
  3297. SA6 A1
  3298. EQ LIT3 LOOP
  3299.  
  3300.  
  3301. LITA CON 0 PIT INDEX
  3302. LITB CON 0 ERROR COUNT
  3303.  
  3304. LITC VFD 42/,18/ PIT ETRY - 42/FILE,18/
  3305. VFD 42/,18/ 42/PROG1,18/LIB1
  3306. VFD 42/,18/ 42/PROG2,18/LIB2
  3307. LOL SPACE 4,20
  3308. ** LOL - LIST ONE LINE.
  3309. *
  3310. * ENTRY (OUTPUTB) = LINE TO BE WRITTEN.
  3311. * (LINE) = LINE NUMBER.
  3312. * (BRFM) = 1 IF BRIEF MODE SET (NO TITLE).
  3313. * (PAGE) = PAGE NUMBER.
  3314. * (LL) = PAGE LINE LIMIT.
  3315. * (PD) = PRINT DENSITY FORMAT CONTROL.
  3316. * (PDFLG) = 1 IF FORMAT CONTROL NOT WRITTEN.
  3317. *
  3318. * EXIT LINE AND PAGE NUMBER UPDATED.
  3319. *
  3320. * USES A - 1, 2, 3, 6.
  3321. * X - 0, 1, 2, 3, 6.
  3322. * B - 2, 5, 6, 7.
  3323. *
  3324. * CALLS C6S.
  3325. *
  3326. * MACROS CALL, WRITEC, WRITEH.
  3327.  
  3328.  
  3329. LOL SUBR ENTRY/EXIT
  3330. SA1 LINE CHECK LINE NUMBER
  3331. SX6 X1+B1
  3332. SA6 A1
  3333. SA3 A1+B1 GET LINE LIMIT
  3334. ERRNZ LL-LINE-1 CODE DEPENDS ON CONSECUTIVE LOCATIONS
  3335. IX6 X6-X3
  3336. NG X6,LOL1 IF NOT END OF PAGE
  3337. SX6 B0 RESET LINE COUNT
  3338. SA6 A1
  3339. SA3 TTYO
  3340. NZ X3,LOL0 IF NOT TTY OUTPUT
  3341. SA1 BRFM
  3342. NZ X1,LOL1 IF BRIEF MODE SET
  3343. WRITEH OUTPUT,TITA,TITAL TITLE LINE
  3344. WRITEH OUTPUT,TITE,TITEL SUBTITLE
  3345. WRITEC OUTPUT,(=C* *)
  3346. EQ LOL1 CONTINUE
  3347.  
  3348. LOL0 SA2 PAGE
  3349. SX6 X2+B1
  3350. SA6 A2
  3351. CALL C6S,PAGE,LOLA
  3352. SA1 TITD INSERT PAGE NUMBER
  3353. LX6 36
  3354. MX0 24
  3355. BX1 X0*X1
  3356. BX6 -X0*X6
  3357. BX6 X6+X1
  3358. SA6 A1
  3359. SA3 PDFLG FLAG THAT FORMAT CONTROL WAS WRITTEN
  3360. BX7 X7-X7
  3361. SA7 A3
  3362. WRITEW O,A3-B1,X3 CONDITIONALLY WRITE FORMAT EFFECTOR
  3363. ERRNZ PDFLG-PD-1 CODE DEPENDS ON CONSECUTIVE LOCATIONS
  3364. WRITEC OUTPUT,(=C*1*)
  3365. WRITEH OUTPUT,TITA,TITE-TITA WRITE TITLE LINE
  3366. WRITEC OUTPUT,(=C* *)
  3367. WRITEH OUTPUT,TITE,TITF-TITE WRITE SUBTITLE LINE
  3368. WRITEC OUTPUT,(=C* *)
  3369. SX6 5 RESET LINE COUNT
  3370. SA6 LINE
  3371. LOL1 SX2 1R BLANK FILL LINE
  3372. SB6 OUTPUTB
  3373. SB7 OUTPUTB+DCBL+1
  3374. SA1 B6
  3375. MX0 54
  3376. LOL2 BX6 X1
  3377. SA6 A1
  3378. EQ B6,B7,LOL4 IF END-OF-LINE
  3379. SA1 B6
  3380. SB6 B6+B1
  3381. SB5 10
  3382. LOL3 ZR B5,LOL2 IF END-OF-WORD
  3383. LX0 6
  3384. LX2 6
  3385. BX6 -X0*X1
  3386. SB5 B5-B1
  3387. NZ X6,LOL3 IF CHARACTER .NE. 00
  3388. BX1 X1+X2
  3389. EQ LOL3 LOOP
  3390.  
  3391. LOL4 WRITEH OUTPUT,OUTPUTB,DCBL+1
  3392. EQ LOLX RETURN
  3393.  
  3394.  
  3395. LOLA VFD 60/ PAGE NUMBER (DISPLAY CODE)
  3396. MSG SPACE 4,10
  3397. ** MSG - SEND DAYFILE MESSAGE.
  3398. *
  3399. * ENTRY (B2) = ADDRESS OF PROGRAM NAME.
  3400. * (B3) = ADDRESS OF MESSAGE.
  3401. *
  3402. * USES A - 1, 2, 6.
  3403. * X - 0, 1, 2, 3, 4, 6.
  3404. *
  3405. * MACROS MESSAGE.
  3406.  
  3407.  
  3408. MSG SUBR ENTRY/EXIT
  3409. MX0 42
  3410. SA1 B3
  3411. SA2 B2
  3412. BX3 X0*X2
  3413. BX1 -X0*X1
  3414. BX6 X3+X1
  3415. MX0 6
  3416. SA6 B3
  3417. SX4 1R
  3418. LX0 24
  3419. LX4 18
  3420. BX1 X0*X6
  3421. NZ X1,MSG2 IF NO BLANKS
  3422. MSG1 IX6 X6+X4 BLANK FILL FILE NAME
  3423. LX0 6
  3424. LX4 6
  3425. BX1 X0*X6
  3426. ZR X1,MSG1
  3427. SA6 B3
  3428. MSG2 MESSAGE B3,,R SEND MESSAGE TO DAYFILE
  3429. EQ MSGX RETURN
  3430.  
  3431. IDT SPACE 4
  3432. ** IDT - ISSUE INCORRECT DEVICE MESSAGE.
  3433. *
  3434. * ENTRY (A1) = FET ADDRESS + 1.
  3435. * (X7) = 0.
  3436. *
  3437. * EXIT TO ABT.
  3438. *
  3439. * USES A - 1, 7.
  3440. * B - 4.
  3441. * X - 0, 1, 2, 3, 4, 6, 7.
  3442. *
  3443. * CALLS MSG=.
  3444.  
  3445.  
  3446. IDT MX0 42
  3447. SA1 A1-B1 READ FILE NAME
  3448. MX3 26+10
  3449. BX6 X0*X1
  3450. MX2 6
  3451. LX3 59 POSITION LEGAL CHARACTER MASK
  3452. BX1 X1-X1
  3453. MX0 -6
  3454. IDT1 LX7 6
  3455. BX7 X7+X1 ASSEMBLE FILE NAME
  3456. LX6 6
  3457. BX1 -X0*X6
  3458. SB4 X1 FIND END OF FILE NAME
  3459. LX4 B4,X3
  3460. NG X4,IDT1 IF NOT END OF NAME
  3461. LX7 6
  3462. SX1 1R. ADD *.* TO FILE NAME
  3463. BX7 X7+X1
  3464. + LX7 6 LEFT JUSTIFY ASSEMBLY
  3465. BX6 X2*X7
  3466. ZR X6,* IF NOT LEFT JUSTIFIED
  3467. SA7 IDTB
  3468. MESSAGE IDTA
  3469. CALL ABT
  3470.  
  3471.  
  3472. IDTA DATA 30H UNKNOWN DEVICE TYPE -- LFN =
  3473. IDTB CON 0
  3474. SPACE 4
  3475. ** OCC - OUTPUT COMMENT DIRECTIVE.
  3476. *
  3477. * ENTRY (B2) = INDEX IN COMMENT/DATE TABLE.
  3478. * USES A - 1, 5, 6.
  3479. * X - 0, 1, 5, 6, 7.
  3480. * B - 4, 6, 7.
  3481. *
  3482. * CALLS CFN, OSB.
  3483. *
  3484. * MACROS CALL.
  3485.  
  3486.  
  3487. OCC SUBR ENTRY/EXIT
  3488. SA1 P.CDT
  3489. SX6 X1+B2
  3490. SA6 OCCA
  3491. SA2 =1H
  3492. BX6 X2
  3493. SA6 OUTPUTB
  3494. SA1 X1+B2 SET *DATE OR *COMMENT
  3495. LX1 60-17
  3496. SX7 B1
  3497. BX6 X7*X1
  3498. SA2 OCCB+X6
  3499. BX6 X2
  3500. SA6 A6+B1
  3501. AX1 -17+60 OUTPUT LIBRARY NAME
  3502. CALL CFN,(X1+OICD)
  3503. SA1 OCCA OUTPUT PROGRAM NAME
  3504. CALL CFN,X1
  3505. CALL CFN,(=1L ) OUTPUT BLANK
  3506. SA1 OCCA OUTPUT COMMENT
  3507. SB6 X1
  3508. MX0 54
  3509. SB7 B6+8
  3510. SA1 SBP SET STRING BUFFER POINTER
  3511. SB4 X1
  3512. OCC1 SB6 B6+B1 DISASSEMBLE COMMENT INTO STRING BUFFER
  3513. EQ B6,B7,OCC3 IF END OF COMMENT
  3514. SA5 B6
  3515. SB5 B4+10
  3516. OCC2 EQ B4,B5,OCC1 IF END OF WORD
  3517. LX5 6
  3518. BX6 -X0*X5
  3519. SA6 B4
  3520. SB4 B4+B1
  3521. NZ X6,OCC2 IF NOT END OF COMMENT
  3522. OCC3 SX6 B0 SET END OF BUFFER
  3523. SA6 B4
  3524. SX7 B4
  3525. SA7 A1
  3526. CALL OSB OUTPUT STRING BUFFER
  3527. EQ OCCX RETURN
  3528.  
  3529.  
  3530. OCCA VFD 60/ COMMENT ADDRESS
  3531. OCCB DATA 10H*COMMENT
  3532. DATA 10H*DATE
  3533. SPACE 4
  3534. ** ODP - OUTPUT DELETED PROGRAM.
  3535. *
  3536. * ENTRY (B2) = ADDRESS OF PROGRAM NAME.
  3537. *
  3538. * USES A - 1, 2, 6, 7.
  3539. * X - 0, 1, 2, 3, 6, 7.
  3540. * B - 2.
  3541. *
  3542. * CALLS COB, ORW.
  3543. *
  3544. * MACROS CALL.
  3545.  
  3546.  
  3547. ODP SUBR ENTRY/EXIT
  3548. CALL COB CLEAR OUTPUT BUFFER
  3549. MX0 42
  3550. SA1 B2 SET PROGRAM NAME
  3551. SA2 X1+NAMA
  3552. BX1 X0*X1
  3553. SX3 1R) ADD *)* AT END OF NAME
  3554. MX0 54
  3555. + LX3 54
  3556. LX0 54
  3557. BX7 -X0*X1
  3558. BX6 X1+X3
  3559. NZ X7,*-1 LOOP FOR END OF NAME
  3560. SA6 OUTPUTB+1
  3561. LX7 X2
  3562. SA7 A6+B1
  3563. SB2 =9HDELETED-(
  3564. CALL ORW,B2,OLD
  3565. EQ ODPX RETURN
  3566. OIC SPACE 4,15
  3567. ODPL BSS 0
  3568. SPACE 4
  3569. ** OIC - OUTPUT INSERT DIRECTIVE.
  3570. *
  3571. * OUTPUT AN INSERT DIRECTIVE THAT CAN NOT BE FOLLOWED.
  3572. *
  3573. * ENTRY (B2) = ADDRESS OF INSERT PROGRAM TABLE INDEX.
  3574. *
  3575. * USES A - 1, 2, 3, 4, 5, 6, 7.
  3576. * X - ALL.
  3577. * B - 2, 5, 6, 7.
  3578. *
  3579. * CALLS CFN, LOL.
  3580. *
  3581. * MACROS CALL.
  3582.  
  3583.  
  3584. OIC SUBR ENTRY/EXIT
  3585. SA2 B2
  3586. SA1 P.IPT
  3587. SB6 X1
  3588. SA4 B6+X2
  3589. SA5 A4+B1
  3590. BX6 X4
  3591. LX7 X5
  3592. SA6 OICA
  3593. SA7 A6+B1
  3594. SA4 A5+B1
  3595. SA5 A4+B1
  3596. BX6 X4
  3597. LX7 X5
  3598. SA6 A7+B1
  3599. SB6 OICB *DIRECTIVE CAN NOT BE PERFORMED.*
  3600. SB7 OICB+OICBL
  3601. SB5 OUTPUTB
  3602. SA7 A6+B1
  3603. SB5 B6-B5
  3604. + SA1 B6
  3605. BX6 X1
  3606. SA6 B6-B5
  3607. SB6 B6+B1
  3608. NE B6,B7,*-1
  3609. CALL LOL LIST ONE LINE
  3610. SA1 =10H
  3611. BX6 X1
  3612. SA6 OUTPUTB
  3613. SA1 =10H*FILE
  3614. BX6 X1
  3615. SA6 A6+B1
  3616. SB2 OICA+1 CONVERT FILE NAME
  3617. CALL CFN,B2
  3618. CALL OSB OUTPUT STRING BUFFER
  3619. SA1 OICA CHECK FOR *REPLACE* *INSERT* OR *BEFORE*
  3620. SA3 OICA+2
  3621. BX7 X1-X3
  3622. SA2 =10H*REPLACE
  3623. SX6 B1
  3624. BX3 X1
  3625. LX1 60-17
  3626. ZR X7,OIC1 IF *REPLACE*
  3627. BX6 X6*X1
  3628. SA2 OICC+X6
  3629. MX0 6
  3630. BX6 X0*X3
  3631. NZ X6,OIC1 IF *INSERT* OR *BEFORE*
  3632. SA2 =10H*ADD
  3633. BX6 X2
  3634. SA6 OUTPUTB+1
  3635. CALL CFN,ADPB OUTPUT *LIB* PREFIX
  3636. BX1 X3 CONVERT LIBRARY NAME
  3637. AX1 42
  3638. RJ CDD CONVERT LIBRARY NUMBER TO DISPLAY
  3639. SB2 B2-B1 OUTPUT CONVERTED LIBRARY NUMBER
  3640. MX6 1
  3641. AX6 B2
  3642. BX6 X6*X4
  3643. SA6 OICE
  3644. CALL CFN,OICE
  3645. EQ OIC2
  3646.  
  3647. OIC1 BX6 X2
  3648. SA6 OUTPUTB+1
  3649. AX1 -17+60 OUTPUT LIBRARY NAME
  3650. CALL CFN,(X1+OICD)
  3651. CALL CFN,OICA OUTPUT PROGRAM NAME
  3652. OIC2 CALL CFN,(=1L,)
  3653. SA1 OICA+2 OUTPUT FIRST PROGRAM NAME
  3654. CALL CFN,(X1+OICD)
  3655. CALL CFN,(OICA+2)
  3656. SA1 OICA+2 OUTPUT LAST PROGRAM NAME
  3657. SA2 A1+B1
  3658. BX6 X1-X2
  3659. ZR X6,OIC3 IF FIRST PROGRAM = LAST PROGRAM
  3660. CALL CFN,(=1L-)
  3661. SA2 OICA+3
  3662. CALL CFN,(X2+OICD)
  3663. CALL CFN,(OICA+3)
  3664. OIC3 CALL OSB OUTPUT STRING BUFFER
  3665. EQ OICX RETURN
  3666.  
  3667.  
  3668. OICA VFD 42/,1/,17/ IPT ENTRY - 42/PROG1,1/BEFORE,17/LIB1
  3669. VFD 42/,18/ 42/FILE,18/0
  3670. VFD 42/,18/ 42/PROG2,18/LIB2
  3671. VFD 42/,18/ 42/PROG3,18/LIB3
  3672.  
  3673. OICB DATA H/ *ERROR* - *DIRECTIVE CAN NOT BE PERFORMED./
  3674. OICBL EQU *-OICB
  3675.  
  3676. OICC DATA 0H*INSERT
  3677. DATA 0H*BEFORE
  3678.  
  3679. OICD BSS 0
  3680. .E ECHO ,RT=("RTMIC")
  3681. .A IFC NE,/RT//
  3682. DATA L.RT/.
  3683. .A ELSE
  3684. DATA 0
  3685. .A ENDIF
  3686. .E ENDD
  3687.  
  3688. OICE BSS 1
  3689. SPACE 4
  3690. ** ORW - OUTPUT RECORDS WRITTEN ON FILE *NEW*.
  3691. *
  3692. * ENTRY (B2) = ADDRESS OF *INSERT*, *DELETED*, *REPLACED*,
  3693. * OR * *.
  3694. * (B3) = ADDRESS OF FILE NAME.
  3695. *
  3696. * USES A - 1, 2, 3, 6, 7.
  3697. * X - 0, 1, 2, 3, 6, 7.
  3698. * B - 2.
  3699. *
  3700. * CALLS LOL.
  3701.  
  3702.  
  3703. ORW SUBR ENTRY/EXIT
  3704. SA1 LIST
  3705. SX2 10B+2B
  3706. BX1 X2*X1
  3707. ZR X1,ORWX IF LIST OPTION IS OFF
  3708. SA2 B2 SET STATUS AND FILE NAME
  3709. SX6 10B
  3710. BX1 X6*X1
  3711. NZ X1,ORW1 IF FULL LIST OPTION ON
  3712. SA3 =1H
  3713. BX6 X2-X3
  3714. NZ X6,ORW1 IF COMMENT MESSAGE
  3715. SA3 OUTPUTB+1 CHECK FOR RENAME
  3716. MX0 60-12
  3717. BX6 -X0*X3
  3718. SX7 X6-2R*
  3719. NZ X7,ORWX IF NO RENAME
  3720. ORW1 SA3 B3
  3721. BX6 X2
  3722. MX0 42
  3723. LX6 54
  3724. BX7 X0*X3
  3725. SA6 OUTPUTB
  3726. SA7 OUTPUTB+3
  3727. SA1 TTYO
  3728. NZ X1,ORW3 IF NOT TTY OUTPUT
  3729. BX6 X6-X6
  3730. SB2 DCBL-5
  3731. SA6 OUTPUTB+5
  3732. ORW2 SA6 A6+B1 CLEAR COMMENT FIELD
  3733. SB2 B2-B1
  3734. NZ B2,ORW2 IF NOT END OF BUFFER
  3735. ORW3 RJ LOL LIST ONE LINE
  3736. EQ ORWX RETURN
  3737. SPACE 4
  3738. ** OSB - OUTPUT STRING BUFFER.
  3739. *
  3740. * ENTRY (OUTPUTB) = STRING BUFFER.
  3741. *
  3742. * USES X - 1, 6.
  3743. * A - 1, 6.
  3744. * B - 4, 5, 6, 7.
  3745. *
  3746. * CALLS LOL.
  3747. *
  3748. * MACROS CALL.
  3749.  
  3750.  
  3751. OSB SUBR ENTRY/EXIT
  3752. SX6 DSB RESET STRING BUFFER POINTER
  3753. SA6 SBP
  3754. SB6 OUTPUTB+2
  3755. SB7 OUTPUTB+DCBL
  3756. SA1 DSB
  3757. SB4 10
  3758. SX6 B0
  3759. SB5 B4
  3760. EQ OSB2
  3761.  
  3762. OSB1 SA6 B6 STORE WORD
  3763. SB6 B6+B1
  3764. SB5 B4
  3765. SX6 B0
  3766. OSB2 ZR B5,OSB1 IF END OF WORD
  3767. LX6 6
  3768. BX6 X6+X1
  3769. SA1 A1+B1
  3770. SB5 B5-B1
  3771. NZ X1,OSB2 IF NOT END OF STRING BUFFER
  3772. SA1 A1-B1
  3773. SX1 1R
  3774. NZ B5,OSB2 IF NOT END OF WORD
  3775. SA1 =10H
  3776. SA6 B6
  3777. BX6 X1
  3778. OSB3 SB6 B6+B1 BLANK FILL WORKING STORAGE
  3779. SA6 B6
  3780. NE B6,B7,OSB3
  3781. CALL LOL
  3782. EQ OSBX RETURN
  3783. OZR SPACE 4,15
  3784. ** OZR - OUTPUT ZERO LENGTH RECORD.
  3785. *
  3786. * ENTRY (B2) = ADDRESS OF STATUS.
  3787. * (B3) = ADDRESS OF FILE NAME.
  3788. * (B4) = ADDRESS OF PROGRAM NAME.
  3789. *
  3790. * USES A - 1, 6.
  3791. * X - 1, 2, 6.
  3792. *
  3793. * CALLS COB, LOL, ORW.
  3794. *
  3795. * MACROS CALL.
  3796.  
  3797.  
  3798. OZR SUBR ENTRY/EXIT
  3799. CALL COB CLEAR OUTPUT BUFFER
  3800. SA1 B4
  3801. BX6 X1 SET PROGRAM NAME
  3802. SA6 OUTPUTB+1
  3803. CALL ORW,B2,B3 OUTPUT RECORD WRITTEN
  3804. CALL COB CLEAR OUTPUT BUFFER
  3805. SA1 LIST CHECK LIST OPTION
  3806. SX2 10B
  3807. BX1 X2*X1
  3808. ZR X1,OZR IF FULL LIST OPTION OFF
  3809. CALL LOL LIST ONE LINE
  3810. EQ OZRX RETURN
  3811. SPACE 4
  3812. ** RCF - READ ALL CORRECTION FILES.
  3813. *
  3814. * READ CORRECTION FILES, IGNORING RECORDS IN THE IGNORE TABLE.
  3815. * MAKE ENTRYS IN THE PROGRAM NAME TABLE.
  3816. *
  3817. * USES A - 1, 2, 3, 4, 6, 7.
  3818. * X - 0, 1, 2, 3, 4, 6, 7.
  3819. * B - 2, 3, 6, 7.
  3820. *
  3821. * CALLS CIT, CVD, DIS, SRT.
  3822. *
  3823. * MACROS ADDWRD, BKSP, CALL, OPEN, READCW, READW, REWIND, WRCW,
  3824. * WRITECW.
  3825.  
  3826.  
  3827. RCF11 WRITECW S,R FLUSH BUFFER
  3828. REWIND X2,R
  3829. SX7 1 INITIALIZE SECTOR COUNT
  3830. SA7 SC
  3831.  
  3832. RCF SUBR ENTRY/EXIT
  3833. OPEN S,WRITE,R
  3834. WRITECW S,* SET FILE STATUS
  3835. SA3 S+4
  3836. BX6 X6-X6
  3837. AX3 18 EXTRACT PRU SIZE
  3838. SA6 RCFA
  3839. SX7 X3+
  3840. SA7 S-1
  3841. RCF1 SX6 B0 CLEAR PROGRAM TYPE
  3842. SA6 RCFE
  3843. SA1 P.FNT DO LOOP TO READ CORRECTION FILE
  3844. SA2 L.FNT
  3845. SA3 RCFA
  3846. SB2 X2
  3847. SB3 X3
  3848. EQ B2,B3,RCF11 IF END OF TABLE
  3849. SA4 X1+B3 READ FILE NAME
  3850. MX0 42
  3851. BX6 X4
  3852. SA6 RCFC+1
  3853. BX6 X0*X4
  3854. SX7 17B SET NAME IN FET
  3855. BX7 X6+X7
  3856. SA6 RCFB
  3857. SA7 LGO
  3858. OPEN A7,READ,R
  3859. SA1 LGO+1 CHECK VALID DEVICE
  3860. RJ CVD
  3861. ZR X7,IDT IF CONTROL WORD I/O NOT SUPPORTED
  3862. READCW LGO,17B
  3863. RCF2 SA1 SC
  3864. BX7 X1 STORE RANDOM ADDRESS
  3865. SA7 RCFC+2
  3866. READW LGO,WSB,WSBL READ 1 SECTOR
  3867. PL X1,RCF4 IF NOT EOF
  3868. RCF3 BKSP LGO,R
  3869. SA1 RCFA INCREMENT FILE INDEX
  3870. SX6 X1+B1
  3871. SA6 A1
  3872. EQ RCF1 LOOP TO READ NEXT FILE
  3873.  
  3874. RCF4 BX6 X1 SET EOR INDICATOR
  3875. SA6 RCFD
  3876. SB7 X1
  3877. SB6 WSB
  3878. EQ B6,B7,RCF2 IF 0-LENGTH RECORD
  3879.  
  3880. * CHECK PROGRAM TYPE, CHECK IGNORE TABLE, AND MAKE
  3881. * ENTRY INTO THE PROGRAM NAME TABLE.
  3882.  
  3883. SA1 X2-LWP LWA+1 OF DATA TRANSFERED
  3884. SX2 WSB FWA OF BUFFER
  3885. RJ SRT SET RECORD TYPE
  3886. SA6 RCFC
  3887. CALL DIS,RCFC,(=H*READING *)
  3888.  
  3889. * COPY REST OF RECORD.
  3890.  
  3891. SA1 RCFD
  3892. NZ X1,RCF6 IF EOR READ
  3893. RCF5 WRCW S,WSB,WSBL
  3894. READW LGO,WSB,WSBL
  3895. ZR X1,RCF5 IF NOT EOR READ
  3896. SA1 LGO-LWP LWA + 1 OF DATA TRANSFERED
  3897. RCF6 WRCW S,WSB,X1-WSB,R
  3898. CALL CIT,RCFB,RCFC
  3899. SA1 RCFC GET RECORD TYPE
  3900. NZ X6,RCF7 IF NOT IGNORED
  3901. SB7 X1-ULRT
  3902. ZR B7,RCF8 IF TYPE *ULIB*
  3903. JP RCF2 READ NEXT RECORD
  3904.  
  3905. RCF7 SX6 X1-ODRT
  3906. ZR X6,RCF2 IF RECORD IS *OPLD*
  3907. SA2 CULB
  3908. ZR X2,RCF7.1 IF NOT *ULIB* MODE
  3909. SX6 X1-ULRT
  3910. ZR X6,RCF2 IF *ULIB* SKIP RECORD
  3911. RCF7.1 ADDWRD PNT,RCFC
  3912. SA1 RCFC CHECK PROGRAM TYPE
  3913. SB7 X1-ULRT
  3914. NZ B7,RCF2 IF NOT TYPE *ULIB*
  3915.  
  3916. * COPY USER LIBRARY.
  3917.  
  3918. RCF8 READW LGO,WSB,WSBL
  3919. NG X1,RCF3 IF EOF
  3920. SB6 WSB
  3921. SB7 X1
  3922. EQ B6,B7,RCF10 IF 0-LENGTH RECORD
  3923. BX6 X1 SET EOR INDICATOR
  3924. SA6 RCFD
  3925. SA1 X2-LWP LWA+1 OF DATA TRANSFERED
  3926. SX2 WSB
  3927. RJ SRT SET RECORD TYPE
  3928. SA6 RCFE
  3929. SA1 RCFD
  3930. NZ X1,RCF10 IF EOR
  3931. RCF9 WRCW S,WSB,WSBL
  3932. READW LGO,WSB,WSBL
  3933. ZR X1,RCF9 IF NOT EOR
  3934. RCF10 WRCW S,WSB,X1-WSB,R
  3935. SA2 RCFE
  3936. SX6 X2-ODRT
  3937. NZ X6,RCF8 IF NOT OPLD
  3938. EQ RCF2 READ NEXT RECORD
  3939.  
  3940.  
  3941. RCFA DATA 0 INDEX IN FNT
  3942. RCFB VFD 42/,18/ CURRENT FILE NAME
  3943.  
  3944. RCFC VFD 42/,18/ 42/PROGRAM,18/TYPE
  3945. VFD 42/,18/ 42/FILE,18/ADDRESS
  3946. VFD 60/ 60/POSITION
  3947.  
  3948. RCFD DATA 0 EOR INDICATOR
  3949. RCFE DATA 0 USER LIBRARY RECORD NAME
  3950. RFN SPACE 4,10
  3951. ** RFN - REPLACE FILE NAME.
  3952. *
  3953. * ENTRY (A1) = ADDRESS OF ENTRY IN LIST OF FILES.
  3954. * (X1) = CONTENTS OF ENTRY IN LIST OF FILES.
  3955. * (X6) = NEW FILE NAME.
  3956. *
  3957. * EXIT FILE NAME CHANGED.
  3958. *
  3959. * USES A - 3, 6.
  3960. * X - 0, 1, 2, 3, 6.
  3961.  
  3962.  
  3963. RFN SUBR ENTRY/EXIT
  3964. MX0 -18
  3965. BX1 -X0*X1 EXTRACT ADDRESS OF FET
  3966. SA3 X1 READ FET+0
  3967. BX2 X0*X6
  3968. SX6 1R0
  3969. LX6 -6
  3970. BX6 X6-X2
  3971. ZR X6,RFN1 IF FILE NAME = *0*
  3972. BX6 X2
  3973. ZR X6,RFN1 IF NO NEW FILE NAME
  3974. BX3 -X0*X3
  3975. BX6 X3+X6
  3976. RFN1 SA6 A3
  3977. BX6 X0*X6
  3978. BX6 X6+X1
  3979. SA6 A1
  3980. EQ RFNX RETURN
  3981. RNP SPACE 4,10
  3982. ** RNP - RENAME PROGRAM.
  3983. * ENTRY (B2) = ADDRESS OF PROGRAM NAME.
  3984. * EXIT (X6) = NEW PROGRAM NAME AND TYPE.
  3985. *
  3986. * USES A - 1, 2, 3, 6.
  3987. * X - 0, 1, 2, 3, 6.
  3988. * B - 2, 3, 4.
  3989. *
  3990. * MACROS MESSAGE, SEARCH.
  3991.  
  3992.  
  3993. RNP SUBR ENTRY/EXIT
  3994. SX6 B2 SAVE PROGRAM NAME ADDRESS
  3995. MX0 42
  3996. SA6 RNPA
  3997. SEARCH RNT,X6
  3998. SA1 RNPA
  3999. SB2 X6
  4000. SA2 X1
  4001. BX6 X2
  4002. ZR B2,RNPX IF NO RENAME
  4003. SA2 RNPA CHECK RECORD TYPE
  4004. SA3 X2
  4005. SB3 X3
  4006. ERRNZ TXRT CODE ASSUMES VALUE
  4007. SB4 B3+TXRT-PRRT CHECK FOR TYPE *PROC*
  4008. ZR B3,RNP1 IF TYPE *TEXT*
  4009. NZ B4,RNP2 IF NOT TYPE *PROC*
  4010. RNP1 MESSAGE (=C* RENAME NOT ALLOWED FOR PROC OR TEXT RECORD.*)
  4011. EQ RNPX RETURN
  4012.  
  4013. RNP2 SA2 B2+B1
  4014. BX6 X0*X2
  4015. SX3 2R*
  4016. BX6 X6+X3
  4017. SA6 OUTPUTB+1
  4018. BX6 X2
  4019. SA6 X1
  4020. EQ RNPX RETURN
  4021.  
  4022.  
  4023. RNPA DATA 0 ADDRESS OF PROGRAM NAME
  4024. SPACE 4
  4025. ** RWF - REWIND ALL FILES.
  4026. *
  4027. * REWIND ALL RANDOM FILES ALONG WITH THE FILES IN THE RFT.
  4028. *
  4029. * USES X - 0, 1, 2, 3, 6.
  4030. * A - 1, 2, 3, 6.
  4031. * B - 6, 7.
  4032. *
  4033. * MACROS EVICT, REWIND.
  4034.  
  4035.  
  4036. RWF SUBR ENTRY/EXIT
  4037. EVICT S,R
  4038. SA1 P.FNT
  4039. SA2 L.FNT
  4040. SB6 X1
  4041. SB7 X2+B6
  4042. RWF1 EQ B6,B7,RWF2 IF END OF TABLE
  4043. SA1 B6 CHECK IF FILE IS RANDOM
  4044. MX0 42
  4045. SX6 3
  4046. BX2 -X0*X1
  4047. BX1 X0*X1
  4048. SB6 B6+B1
  4049. BX6 X6+X1
  4050. NZ X2,RWF1 LOOP IF FILE IS NON-RANDOM
  4051. SA6 LGO
  4052. REWIND A6,R
  4053. EQ RWF1
  4054.  
  4055. RWF2 SA1 P.RFT REWIND FILES IN THE REWIND FILE TABLE
  4056. SA2 L.RFT
  4057. SB6 X1
  4058. SB7 X2+B6
  4059. RWF3 EQ B6,B7,RWF4 IF END OF TABLE
  4060. SA1 B6
  4061. SX6 3
  4062. SB6 B6+B1
  4063. BX6 X6+X1
  4064. SA6 LGO
  4065. REWIND A6,R
  4066. EQ RWF3 LOOP
  4067.  
  4068. RWF4 SA1 CREW CHECK FOR NO REWIND OPTION
  4069. ZR X1,RWF5 IF NO REWIND
  4070.  
  4071. SX1 B1
  4072. RWF5 SX6 B1
  4073. BX6 X6-X1
  4074. SA2 CVFY
  4075. SA3 CCPY
  4076. BX6 X6+X2
  4077. BX6 X6+X3
  4078. ZR X6,RWFX IF V AND C NOT SET AND R SET
  4079. REWIND OLD,R
  4080. REWIND NEW,R
  4081. EQ RWFX RETURN
  4082. SPACE 4
  4083. ** RWS - REWIND SEQUENTIAL FILES.
  4084. *
  4085. * REWIND SEQUENTIAL CORRECTION FILES THAT HAVE REWIND SELECTED.
  4086. *
  4087. * USES X - 0, 1, 2, 3, 6, 7.
  4088. * A - 1, 2, 3, 6.
  4089. * B - 6, 7.
  4090. *
  4091. * MACROS REWIND, SEARCH.
  4092.  
  4093.  
  4094. RWS SUBR ENTRY/EXIT
  4095. SX6 B0
  4096. SA6 RWSA
  4097. RWS1 SA1 P.FNT
  4098. SA2 L.FNT
  4099. SA3 RWSA
  4100. SB6 X1
  4101. SB7 B6+X2
  4102. SB6 B6+X3
  4103. SX6 X3+B1
  4104. EQ B6,B7,RWSX IF END OF FNT
  4105. SA6 A3
  4106. SA1 B6 READ FILE NAME
  4107. MX0 42
  4108. BX6 -X0*X1
  4109. ZR X6,RWS1 IF FILE IS RANDOM
  4110. SEARCH RFT,B6,(=77777777777777000000B)
  4111. ZR X6,RWS1 IF FILE IS NOT IN RFT
  4112. SA1 P.FNT REWIND FILE
  4113. SA3 RWSA
  4114. IX2 X1+X3
  4115. MX0 42
  4116. SA2 X2-1
  4117. BX6 X0*X2
  4118. SX7 B1
  4119. IX6 X6+X7
  4120. SA6 A2
  4121. SA6 LGO
  4122. REWIND A6,R
  4123. EQ RWS1
  4124.  
  4125.  
  4126. RWSA DATA 0 FNT INDEX
  4127. SPACE 4
  4128. ** SMT - SEARCH MANAGED TABLE.
  4129. *
  4130. * ENTRY (B2) = ADDRESS OF TABLE POINTER.
  4131. * (B3) = ADDRESS OF ENTRY.
  4132. * (B4) = ADDRESS OF MASK.
  4133. * (B5) = INDEX INTO TABLE.
  4134. * EXIT (B6) = ADDRESS OF ADDRESS OF ENTRY IF FOUND.
  4135. * (B6) = ADDRESS OF 0 IF NOT FOUND.
  4136. * (X6) = ADDRESS OF ENTRY IF FOUND
  4137. * (X6) = 0 IF NOT FOUND
  4138. *
  4139. * USES A - 1, 2, 3, 4, 5, 6.
  4140. * X - 1, 2, 3, 4, 5, 6.
  4141. * B - 2, 3, 7.
  4142.  
  4143.  
  4144. SMT SUBR ENTRY/EXIT
  4145. SA1 B2 SET TABLE POINTER
  4146. SA2 A1+B1 SET TABLE LENGTH
  4147. SA3 A2+B1 SET NUMBER OF WORDS/ENTRY
  4148. SA4 B3 (X4) = ENTRY
  4149. SB2 X1 (B2) = FWA TABLE
  4150. SB7 X2+B2 (B7) = LWA TABLE
  4151. SB3 X3 (B3) = WORDS/ENTRY
  4152. SA5 B4 (X5) = MASK
  4153. SMT1 EQ B2,B7,SMT2 IF END OF TABLE
  4154. SA1 B2+B5
  4155. BX6 X4-X1
  4156. BX6 X5*X6
  4157. SB2 B2+B3
  4158. NZ X6,SMT1 IF NOT FOUND
  4159. SX6 B2-B3 SET ENTRY ADDRESS
  4160. SA6 B6
  4161. EQ SMTX RETURN
  4162.  
  4163. SMT2 SX6 B0 SET NOT FOUND
  4164. SA6 B6
  4165. EQ SMTX RETURN
  4166.  
  4167.  
  4168. SMTA VFD 60/0
  4169. SPACE 4
  4170. ** STB - SET TITLE BUFFER.
  4171. *
  4172. * ENTRY (B2) = ADDRESS OF TITLE.
  4173. * (B6) = 0 IF TITLE.
  4174. * = 1 IF SUBTITLE.
  4175. *
  4176. * USES A - 1, 2, 6.
  4177. * X - 0, 1, 2, 6.
  4178. * B - 2, 6, 7.
  4179.  
  4180.  
  4181. STB SUBR ENTRY/EXIT
  4182. NZ B6,STB0 IF SUBTITLE
  4183. SB6 TITA
  4184. SB7 TITB
  4185. EQ STB1 SET TITLE BUFFER
  4186.  
  4187. STB0 SB6 TITE
  4188. SB7 TITF
  4189. STB1 SX1 1R
  4190. MX0 54
  4191. SX6 99999 FORCE PAGE EJECT
  4192. SA6 LINE
  4193. SA2 B2 COPY TITLE OR SUBTITLE
  4194. BX6 X2
  4195. BX7 -X0*X2
  4196. SB2 B2+B1
  4197. ZR X7,STB2 IF END OF TITLE
  4198. SA6 B6
  4199. SB6 B6+B1
  4200. NE B6,B7,STB1 IF NOT END OF TITLE BUFFER
  4201. EQ STBX RETURN
  4202.  
  4203. * ADD TRAILING BLANKS.
  4204.  
  4205. STB2 BX6 X6+X1
  4206. LX1 6
  4207. LX0 6
  4208. BX7 -X0*X2
  4209. ZR X7,STB2 LOOP
  4210. SA6 B6
  4211. SA1 =1H BLANK FILL REMAINING WORDS
  4212. BX6 X1
  4213. SB6 B6+B1
  4214. STB3 EQ B6,B7,STBX IF END OF BUFFER
  4215. SA6 B6
  4216. SB6 B6+B1
  4217. EQ STB3
  4218. SPACE 4
  4219. ** SUL - SKIP USER LIBRARY.
  4220. *
  4221. * ENTRY (B2) = ADDRESS OF CURRENT PROGRAM TYPE.
  4222. * (B3) = ADDRESS TO RETURN EOR INDICATOR.
  4223. *
  4224. * USES A - 1, 2, 6, 7.
  4225. * X - 1, 2, 5, 6, 7.
  4226. * B - 6, 7.
  4227. *
  4228. * CALLS SRT.
  4229. *
  4230. * MACROS READW.
  4231.  
  4232.  
  4233. SUL SUBR ENTRY/EXIT
  4234. SA1 B2 CHECK IF USER LIBRARY
  4235. SX7 B3
  4236. SX6 X1-ULRT
  4237. SA7 SULA
  4238. NZ X6,SUL4 IF NOT USER LIBRARY
  4239. SUL1 READW P,WSA,WSAL
  4240. NG X1,SUL5 IF EOF
  4241. SB6 WSA
  4242. SB7 X1
  4243. EQ B6,B7,SUL1 IF 0-LENGTH RECORD
  4244. BX5 X1
  4245. SA1 X2-LWP LWA+1 OF DATA TRANSFERED
  4246. SX2 WSA
  4247. RJ SRT SET RECORD TYPE
  4248. SA6 SULB
  4249. SA1 SULA
  4250. BX7 X5 STORE EOR INDICATOR
  4251. SA7 X1
  4252. NZ X5,SUL3 IF EOR ON PREVIOUS READ
  4253. SUL2 READW OLD,WSA,WSAL
  4254. SUL3 ZR X1,SUL2 IF NOT EOR
  4255. SA2 SULB
  4256. SB7 X2-ODRT
  4257. NZ B7,SUL1 LOOP TO END OF USER LIBRARY
  4258. SUL4 READW P,WSA,WSAL
  4259. SUL5 SA2 SULA STORE EOR INDICATOR
  4260. BX6 X1
  4261. SA6 X2
  4262. EQ SULX RETURN
  4263.  
  4264.  
  4265. SULA DATA 0 ADDRESS TO RETURN EOR INDICATOR
  4266. SULB DATA 0 PROGRAM NAME
  4267. SUM SPACE 4,10
  4268. ** SUM - SET *ULIB* MODE.
  4269. *
  4270. * ENTRY (CULB) = *ULIB* MODE FLAG.
  4271. *
  4272. * EXIT ROUTINE PRESET FOR CALLING *LIBGEN*.
  4273. *
  4274. * USES A - 1, 2, 3, 4, 6, 7.
  4275. * X - 0, 1, 2, 3, 4, 6, 7.
  4276.  
  4277.  
  4278. SUM SUBR ENTRY/EXIT
  4279. SA4 CULB
  4280. ZR X4,SUMX IF *U* NOT SPECIFIED
  4281. MX0 42
  4282. SA1 CCPY
  4283. ZR X1,SUM1 IF NO RECOPY
  4284. SA2 NEW
  4285. BX6 X0*X2
  4286. SA6 GULD SET F=NEW
  4287. SA2 OLD
  4288. BX6 X0*X2
  4289. SA6 GULF SET P=OLD
  4290. EQ SUM2 SET N=CULB
  4291.  
  4292. SUM1 SA2 SUMA
  4293. SA3 NEW
  4294. BX6 X2*X0
  4295. BX7 X0*X3
  4296. BX3 -X0*X3
  4297. BX6 X6+X3
  4298. SA6 A3+ SET NEW FILE NAME
  4299. SA7 GULF SET P=NEW
  4300. SUM2 BX6 X4*X0
  4301. SA6 GULH SET N=CULB
  4302. EQ SUMX RETURN
  4303.  
  4304.  
  4305. SUMA VFD 42/7LZZZZZG2,18/0
  4306. SUM SPACE 4,10
  4307. ** VFY - CALL VFYLIB TO VERIFY *OLD* AND *NEW*.
  4308. *
  4309. * ENTRY (CVFY) = 1 VERIFY REQUESTED.
  4310. *
  4311. * EXIT TO *VFYLIB*.
  4312. *
  4313. * MACROS MESSAGE, OVERLAY, RECALL, SETLOF.
  4314.  
  4315.  
  4316. VFY SUBR ENTRY/EXIT
  4317. SA1 CVFY
  4318. ZR X1,VFY IF NO VERIFY
  4319. RECALL OUTPUT WAIT FOR END OF OUTPUT
  4320. MESSAGE (=C* VFYLIB*),1
  4321. RECALL S
  4322. RECALL OLD
  4323. RECALL NEW
  4324. SA1 OLD SET *VFYLIB* PARAMETERS
  4325. MX0 42
  4326. BX6 X0*X1
  4327. SA6 2
  4328. SA1 NEW
  4329. BX6 X0*X1
  4330. SA6 A6+B1
  4331. SA1 OUTPUT
  4332. BX6 X0*X1
  4333. SA6 A6+B1
  4334. SX6 3 SET PARAMETER COUNT
  4335. SA6 ACTR
  4336. SA2 FL
  4337. LX2 30
  4338. SA0 X2 SET (A0) = FL FOR *VFYLIB*
  4339. SETLOF =0 CLEAR LIST OF FILES POINTER
  4340. OVERLAY VFYA,,SYSTEM
  4341. PS 0
  4342.  
  4343.  
  4344. VFYA CON 0LVFYLIB
  4345. SPACE 4,15
  4346. ** WPD - WRITE PROGRAM DIRECTORY.
  4347. *
  4348. * ENTRY (X1) = OLD FILE EOI STATUS INDICATOR.
  4349. * (B2) = ADDRESS OF OPL DIRECTORY NAME.
  4350. *
  4351. * USES A - 1, 2, 5, 6, 7.
  4352. * X - 0, 1, 2, 5, 6, 7.
  4353. * B - 2, 6, 7.
  4354. *
  4355. * CALLS CCM, EPN, ORW, OZR.
  4356. *
  4357. * MACROS ADDWRD, CALL, FILINFO, WRCW, WRITE,
  4358. * WRITECW, WRITEF, WRITER, WRITEW.
  4359.  
  4360.  
  4361. WPD SUBR ENTRY/EXIT
  4362. SA5 NPLN
  4363. NZ X5,WPD1 IF BUILD
  4364. SA5 FLST+/FLST/NEW SET UP *FILINFO* BLOCK
  4365. MX0 42
  4366. BX5 X0*X5
  4367. SX6 50001B
  4368. BX6 X5+X6
  4369. SA6 WPDD
  4370. FILINFO WPDD
  4371. SA2 WPDD+1 *FILINFO* STATUS WORD
  4372. SA5 B2
  4373. LX2 59-24
  4374. NG X2,WPD0 IF NEW FILE IS ON MAGNETIC TAPE
  4375. SX6 X5-ODRT
  4376. ZR X6,WPD1 IF LAST RECORD TYPE *OPLD*
  4377. WPD0 SB7 B0
  4378. SX6 X1+2 CHECK FOR EOI ON OLD FILE
  4379. MX7 4
  4380. BX5 X5-X5 CLEAR DIRECTORY TEXT
  4381. ZR X6,WPD1 IF EOI ON OLD FILE
  4382. LX7 4+48
  4383. SA7 WDAA+1 SET LEVEL 17 EOR
  4384. WRCW N,B0,B7
  4385. SX7 0
  4386. SA7 WDAA+1 RESET CONTROL WORD
  4387. CALL OZR,(=1H ),OLD,(=7H**EOF**)
  4388. WPD1 WRITECW N,R
  4389. ZR X5,WPD IF NO DIRECTORY
  4390. MX0 42
  4391. BX6 X0*X5 STORE NAME IN 7700 TABLE
  4392. SA6 WPDA+1
  4393. SX7 ODRT
  4394. BX7 X6+X7
  4395. SB2 WPDC
  4396. SA7 B2
  4397. SA1 DATE.
  4398. BX6 X1
  4399. SA6 A6+B1
  4400. CALL EPN,B2
  4401. ADDWRD NPT,NIND
  4402. SA1 L.NPT SET 7000 TABLE LENGTH
  4403. MX6 3
  4404. BX6 X6+X1
  4405. SA6 WPDB
  4406. WRITE N,*
  4407. CALL CCM,WPDA,WPDC
  4408. SB6 X6 WRITE 7000 TABLE
  4409. SB7 WPDB+1
  4410. WRITEW NEW,B6,B7-B6
  4411. SA1 P.NPT
  4412. SA2 L.NPT
  4413. WRITEW NEW,X1,X2
  4414. WRITER NEW
  4415. WRITEF X2
  4416. CALL ORW,(=5HADDED),(=5H*****)
  4417. CALL OZR,(=1H ),OLD,(=7H**EOF**)
  4418. EQ WPDX RETURN
  4419.  
  4420.  
  4421. WPDA DATA 77000016000000000000B
  4422. BSSZ 16B
  4423. WPDB DATA 70000000000000000000B
  4424.  
  4425. WPDC VFD 42/,18/ 42/PROGRAM,18/TYPE
  4426. BSS 1
  4427.  
  4428. WPDD BSS 5 *FILINFO* PARAMETER BLOCK
  4429. SPACE 4
  4430. TITLE BUFFERS.
  4431. ** DATA AND FILE ENVIRONMENT TABLES.
  4432.  
  4433. * INDEX TAGS FOR WORDS PRECEEDING EACH FET.
  4434.  
  4435. LWP EQU 3 LWA+1 OF DATA TRANSFERED.
  4436. WRB EQU 2 WORDS REMAINING IN BLOCK.
  4437. ERF EQU 1 EOR FLAG.
  4438.  
  4439.  
  4440. CW CON 1 CONTROL WORD READ FLAG
  4441. SC CON 1 SECTOR COUNT
  4442.  
  4443. CON 0 LWA+1 OF DATA TRANSFERED
  4444. CON -0 WORDS REMAINING IN BLOCK (OLD)
  4445. CON 0 EOR FLAG
  4446. P BSS 0
  4447. OLD FILEB OLDB,OLDL,(FET=10),(WSA=WSA,WSAL)
  4448. ORG P+11B
  4449. VFD 36/,6/ODEBL,18/PODEB POINTER TO *OD* EXT. BUFFER
  4450. ORG P+10
  4451.  
  4452. CON 0 LWA+1 OF DATA TRANSFERED
  4453. CON -0 WORDS REMAINING IN BLOCK (NEW)
  4454. CON 0 EOR FLAG
  4455. N BSS 0
  4456. NEW RFILEB NEWB,NEWL,(FET=10)
  4457. ORG N+11B
  4458. VFD 36/,6/ODEBL,18/NODEB POINTER TO *OD* EXT. BUFFER
  4459. ORG N+10
  4460.  
  4461. CON 0 LWA+1 OF DATA TRANSFERED
  4462. CON -0
  4463. CON 0
  4464. S BSS 0
  4465. ZZZZZG1 RFILEB SBUF,SBUFL
  4466.  
  4467. CON 0 LWA+1 OF DATA TRANSFERED
  4468. CON -0
  4469. CON 0
  4470. LGO RFILEB LGOB,LGOL,(WSA=WSB,WSBL)
  4471.  
  4472. O BSS 0
  4473. OUTPUT FILEC OUTB,OUTL,(WSA=OUTPUTB,DCBL+1),(FET=10)
  4474.  
  4475. I BSS 0
  4476. INPUT FILEC INPB,INPL,(WSA=DCB,DCBL),(FET=10)
  4477.  
  4478. TTYOUT BSS 0
  4479. ZZZZZG0 FILEC TTYB,TTYL,(FET=10)
  4480.  
  4481.  
  4482. * OPTICAL DISK EXTENSION BUFFERS.
  4483.  
  4484. PODEB BSSZ ODEBL *OLD*
  4485. NODEB BSSZ ODEBL *NEW*
  4486. * FILE LIST.
  4487.  
  4488. FLST CON FLSTL
  4489.  
  4490. LOC 1
  4491. QUAL FLST
  4492.  
  4493. TTYOUT VFD 42/0LZZZZZG0,18///TTYOUT
  4494. INPUT VFD 42/0LINPUT,18///INPUT
  4495. OUTPUT VFD 42/0LOUTPUT,18///OUTPUT
  4496. OLD VFD 42/0LOLD,18///OLD
  4497. NEW VFD 42/0LNEW,18///NEW
  4498. LGO VFD 42/0LLGO,18///LGO
  4499.  
  4500. QUAL *
  4501. LOC *O
  4502. CON 0
  4503. FLSTL EQU *-FLST
  4504.  
  4505. DATE. DATA 0 CURRENT DATE
  4506.  
  4507. LGO. DATA 0LLGO CORRECTION FILE NAME
  4508.  
  4509. LIST VFD 56/0 LIST OPTIONS
  4510. VFD 1/1 FULL LIST
  4511. VFD 1/1 LIST DIRECTIVES
  4512. VFD 1/1 LIST MODIFICATIONS MADE
  4513. VFD 1/1 LIST ERRORS
  4514.  
  4515. BRFM DATA 0 BRIEF MODE FLAG
  4516.  
  4517. CADD DATA 0 NO INSERT AT EOF FLAG
  4518.  
  4519. CREW DATA 0 NO REWIND FLAG
  4520.  
  4521. CVFY DATA 0 VERIFY FLAG
  4522.  
  4523. CCPY DATA 0 COPY FLAG
  4524.  
  4525. CDOP DATA 0 IGNORE ERROR FLAG
  4526.  
  4527. CZOP DATA 0 *Z* OPTION FLAG
  4528.  
  4529. CULB DATA 0 USER LIBRARY OPTION
  4530.  
  4531. FL DATA 0 FIELD LENGTH
  4532.  
  4533. TTYI DATA 1 NON-TTY INPUT FLAG
  4534.  
  4535. TTYO DATA 1 NON-TTY OUTPUT FLAG
  4536.  
  4537. SBP VFD 60/DSB STRING BUFFER POINTER
  4538.  
  4539. LINE CON 99999 LINE COUNT
  4540.  
  4541. LL CON 0 PAGE LINE LIMIT
  4542.  
  4543. PD CON 0 PRINT DENSITY FORMAT CONTROL
  4544. PDFLG CON 1 FORMAT CONTROL NOT WRITTEN FLAG
  4545.  
  4546. PAGE DATA 0 PAGE NUMBER COUNT
  4547.  
  4548. NIND VFD 42/,18/ 42/PROGRAM,18/TYPE
  4549. CON 0 RANDOM ADDRESS
  4550.  
  4551. NPLN DATA 0 NEW PROGRAM LIBRARY NAME
  4552.  
  4553. TITA DATA H* LIBEDIT DIRECTIVES. *
  4554. DATA H* *
  4555. TITAL EQU *-TITA
  4556. TITB DATA H* 01/20/69.*
  4557. TITC DATA H* 00.00.00.*
  4558. DATA H* *
  4559. TITD DATA H*PAGE *
  4560.  
  4561. TITE DATA H* *
  4562. DATA H* *
  4563. DATA H* *
  4564. TITEL EQU *-TITE
  4565. TITF BSS 0
  4566. SPACE 4
  4567. ** TABLE POINTERS.
  4568.  
  4569.  
  4570. TABLE BSS 0
  4571. TABLE CDT,8 COMMENT/DATE TABLE
  4572. TABLE DPT,2 DELETE PROGRAM TABLE
  4573. TABLE FNT FILE NAME TABLE
  4574. TABLE IDT,2 IMPLIED DELETE TABLE
  4575. TABLE IPT,4 INSERT PROGRAM TABLE
  4576. TABLE NPT,2,40B NEW PROGRAM TABLE
  4577. TABLE NRT NO REPLACE TABLE
  4578. TABLE PIT,3 PROGRAM IGNORE TABLE
  4579. TABLE PNT,3,40B PROGRAM NAME TABLE
  4580. TABLE RFT REWIND FILE TABLE
  4581. TABLE RNT,2 RENAME TABLE
  4582. TABLE BUF UNUSED STORAGE TABLE
  4583. RDA SPACE 4
  4584. ** RDA - READ DATA.
  4585. *
  4586. * PROCESSES CALLS TO READ WORDS (RDW=).
  4587. * DEBLOCKS DATA IF CONTROL WORD READS.
  4588. *
  4589. * ENTRY (X2) = FET ADDRESS.
  4590. * (B6) = FWA OF WORKING STORAGE BUFFER.
  4591. * (B7) = LENGTH OF TRANSFER REQUESTED.
  4592. *
  4593. * EXIT (X1) = STATUS RETURNED FROM RDW=.
  4594. * (X2-LWP) = LWA+1 OF DATA TRANSFERED.
  4595. * (B6) = LWA+1 OF DATA TRANSFERED.
  4596. *
  4597. * USES A - 1, 3, 6, 7.
  4598. * X - 1, 3, 4, 6, 7.
  4599. * B - 5, 6, 7.
  4600. *
  4601. * CALLS RDW=.
  4602.  
  4603.  
  4604. RDA5 SX6 B5-B7 UPDATE WORDS REMAINING
  4605. SA6 A1
  4606.  
  4607. RDA6 RJ RDW= READ WORDS
  4608.  
  4609. RDA7 SX6 B6 LWA+1 OF DATA TRANSFERED
  4610. SA6 X2-LWP
  4611.  
  4612. RDA SUBR ENTRY/EXIT
  4613. SA1 CW CHECK IF CONTROL WORDS LEGAL
  4614. ZR X1,RDA6 IF CONTROL WORD READS NOT LEGAL
  4615. RDA1 SA1 X2-WRB GET NUMBER OF WORDS BEFORE CONTROL WORD
  4616. SB5 X1+
  4617. PL X1,RDA2 IF NOT FIRST READ
  4618. SX7 B7+ SET WORDS NEEDED
  4619. SA7 RDAA
  4620. JP RDA4
  4621.  
  4622. RDA2 GE B5,B7,RDA5 IF ENOUGH DATA TO FILL BUFFER
  4623. SA3 X2-ERF CHECK EOR FLAG
  4624. PL X3,RDA3 IF NOT EOR ON FILE
  4625. MX6 1 SET NEW READ FLAG
  4626. SB7 B5+B1 SET WORDS TO READ
  4627. SA6 A3
  4628. SA6 A1
  4629. RJ RDW= READ WORDS
  4630. SX1 B6-B1 SET EOR INDICATION
  4631. SB6 B6-B1 BACK UP LWA TO ALLOW FOR CONTROL WORD
  4632. JP RDA7 RETURN
  4633.  
  4634. RDA3 SX6 B7-B5 SAVE ADDITIONAL WORDS NEEDED
  4635. SA6 RDAA
  4636. SB7 B5+B1 SET WORDS TO TRANSFER
  4637. RJ RDW= READ WORDS
  4638. SB6 B6-1 BACK UP OVER LAST CONTROL WORD
  4639. RDA4 SB7 B1 READ CONTROL WORD
  4640. RJ RDW=
  4641. NG X1,RDA7 IF EOF/EOI
  4642. SB6 B6-B1 BACK UP WORKING BUFFER
  4643. SA1 B6 CONTROL WORD
  4644. SX7 5
  4645. SX4 X1+4 ROUND UP
  4646. AX1 36 EXTRACT BLOCK SIZE
  4647. SX3 X1
  4648. IX7 X4/X7 WORDS IN BLOCK
  4649. IX6 X7-X3 SAVE EOR FLAG
  4650. SA7 X2-WRB WORD COUNT
  4651. SA6 X2-ERF EOR FLAG
  4652. SA1 RDAA RESET WORDS NEEDED
  4653. SB7 X1
  4654. JP RDA1 LOOP
  4655.  
  4656.  
  4657. RDAA CON 0
  4658. WDA SPACE 4
  4659. ** WDA - WRITE DATA WITH CONTROL WORDS.
  4660. *
  4661. * ENTRY (B6) = FWA OF WORKING STORAGE.
  4662. * (B7) = WORD COUNT.
  4663. * (X2) = FET ADDRESS.
  4664. *
  4665. * EXIT (B7) = 0 IF FULL PRU WRITTEN.
  4666. *
  4667. * USES A - 1, 3, 4, 5, 6, 7.
  4668. * B - 4, 6, 7.
  4669. * X - 1, 3, 4, 5, 6, 7.
  4670. *
  4671. * MACROS WRITER, WRITEW.
  4672.  
  4673.  
  4674. WDA3 SA3 SC
  4675. SA1 X2-1
  4676. SX7 B1+ UPDATE SECTOR COUNT
  4677. IX7 X3+X7
  4678. SB4 X1
  4679. SA7 A3 STORE RANDOM ADDRESS
  4680. BX6 X1
  4681. ZR B7,WDA2 IF ZERO LENGTH RECORD
  4682. SX3 5
  4683. SX7 B7-B4
  4684. PL X7,WDA4 IF \ ONE PRU
  4685. SX1 B7
  4686. WDA4 IX4 X1*X3 FORM PRU BYTE COUNT
  4687. SA7 WDAA
  4688. LX6 36 POSITION BLOCK SIZE
  4689. SA5 X1+B6
  4690. BX6 X6+X4 FORM HEADER CONTROL WORD
  4691. SX7 B0
  4692. SA6 B6-B1
  4693. SA7 A5 STORE TRAILER CONTROL WORD
  4694. WRITEW X2,A6,X1+2
  4695. SB6 A5 SET ADDRESS OF NEXT BLOCK
  4696. SA3 WDAA
  4697. BX6 X5 RESTORE CELL DESTROYED BY CONTROL WORD
  4698. SB7 X3
  4699. SA6 A5
  4700. GE B7,B1,WDA3 IF AT LEAST ONE MORE WORD IN BUFFER
  4701.  
  4702. WDA SUBR ENTRY/EXIT
  4703. SA4 X2-2
  4704. NG X4,WDA3 IF CONTROL WORD WRITE ENABLED
  4705. ZR B7,WDA1 IF ZERO LENGTH RECORD
  4706. WRITEW X2,B6,B7
  4707. SB7 B0+
  4708. JP WDA
  4709.  
  4710. WDA1 WRITER X2,R FLUSH BUFFER
  4711. SB7 1
  4712. JP WDA
  4713.  
  4714. WDA2 LX6 36 POSITION BLOCK SIZE
  4715. SA6 WDAA
  4716. WRITEW X2,A6,2 WRITE ZERO LENGTH RECORD
  4717. SB7 1
  4718. JP WDA
  4719.  
  4720.  
  4721. WDAA CON 0
  4722. CON 0
  4723. RCW SPACE 4
  4724. ** RCW - RESTORE CONTROL WORD WRITE.
  4725. *
  4726. * ENTRY NONE.
  4727. *
  4728. * EXIT NONE.
  4729. *
  4730. * USES A - 1, 6, 7.
  4731. * B - NONE.
  4732. * X - 1, 6, 7.
  4733. *
  4734. * MACROS RECALL, WRITECW, WRITER.
  4735.  
  4736.  
  4737. RCW SUBR ENTRY/EXIT
  4738. RECALL N
  4739. SA1 N+2 CHECK BUFFER EMPTY
  4740. SA3 A1+B1
  4741. IX3 X3-X1
  4742. ZR X3,RCW1 IF BUFFER EMPTY
  4743. WRITER X2,R FLUSH BUFFER
  4744. RCW1 WRITECW X2,* SET FILE STATUS
  4745. SA1 N+6
  4746. MX7 60
  4747. AX1 30
  4748. SA7 N-2 ENABLE CONTROL WORD WRITE
  4749. BX6 X1
  4750. SA6 SC RESET SECTOR COUNT
  4751. EQ RCWX RETURN
  4752. CVD SPACE 4
  4753. ** CVD - CHECK DEVICE TYPE.
  4754. *
  4755. * ENTRY (X1) = (FET+1).
  4756. *
  4757. * EXIT (X7) = 0 IF CONTROL WORD READ/WRITE NOT SUPPORTED ON
  4758. * DEVICE.
  4759. *
  4760. * USES X - 0,1,2,6,7.
  4761. * A - 2.
  4762. * B - NONE.
  4763. *
  4764. * CALLS NONE.
  4765.  
  4766.  
  4767. CVD2 LX1 12 CHECK *TT*
  4768. BX6 -X0*X1
  4769. SX7 X6-2RTT
  4770.  
  4771. CVD SUBR ENTRY/EXIT
  4772. MX0 -12
  4773. PL X1,CVD2 IF ALLOCATABLE
  4774. LX1 12
  4775. SA2 CVDA SEARCH DEVICE TABLE
  4776. SX7 0 ASSUME NO FIND
  4777. CVD1 ZR X2,CVDX IF NOT FOUND
  4778. BX6 X1-X2
  4779. AX2 12
  4780. BX6 X2*X6
  4781. SA2 A2+B1
  4782. NZ X6,CVD1 IF NOT MATCH
  4783. SX7 1 INDICATE CONTROL WORD POSSIBLE
  4784. EQ CVDX RETURN
  4785.  
  4786.  
  4787. CVDA VFD 36/,12/7703B,12/4002B
  4788. VFD 36/,12/7703B,12/4102B
  4789. VFD 36/,12/7777B,12/2RMT+4000B
  4790. VFD 36/,12/7777B,12/2RNT+4000B
  4791. VFD 36/,12/7777B,12/2RCT+4000B
  4792. VFD 36/,12/7777B,12/2RAT+4000B
  4793. CON 0
  4794. SPACE 4,10
  4795. ** COMMON DECKS.
  4796.  
  4797.  
  4798. *CALL COMCCDD
  4799. WRIF$ EQU 1 SELECT *REISSUE CURRENT WRITE*
  4800. *CALL COMCCIO
  4801. *CALL COMCCPM
  4802. *CALL COMCCPT
  4803. *CALL COMCDXB
  4804. *CALL COMCLFM
  4805. *CALL COMCOVL
  4806. *CALL COMCRDH
  4807. *CALL COMCRDW
  4808. *CALL COMCSFN
  4809. *CALL COMCSRT
  4810. *CALL COMCSYS
  4811. *CALL COMCWTC
  4812. *CALL COMCWTH
  4813. *CALL COMCWTW
  4814. BUFFERS SPACE 4,10
  4815. ** BUFFERS.
  4816.  
  4817.  
  4818. USE BUFFERS
  4819.  
  4820. OUTPUTB BSS 0 OUTPUT WORKING BUFFER
  4821. DCB EQU OUTPUTB+1 DIRECTIVE COMMAND BUFFER
  4822. DSB EQU DCB+DCBL DIRECTIVE STRING BUFFER
  4823. WSA EQU DSB+10*DCBL+2 WORKING STORAGE (OLD)
  4824. WSAL EQU 4000B
  4825. WSB EQU WSA+WSAL+1 WORKING STORAGE (LGO/NEW)
  4826. WSBL EQU 4000B
  4827. INPB EQU WSB+WSBL INPUT BUFFER
  4828. OUTB EQU INPB+INPL OUTPUT BUFFER
  4829. TTYB EQU OUTB+OUTL
  4830. OLDB EQU TTYB+TTYL OLD BUFFER
  4831. NEWB EQU OLDB+OLDL NEW BUFFER
  4832. LGOB EQU NEWB+NEWL LGO BUFFER
  4833. SBUF EQU LGOB+LGOL SCRATCH BUFFER
  4834. BUF EQU SBUF+SBUFL START OF MANAGED TABLES
  4835. MFL= EQU 200000B+BUF+BUFL+5 MINIMUM FIELD LENGTH
  4836. PRS TITLE LIBEDIT - PRESET.
  4837. *** PRS - PRESET PROGRAM.
  4838. *
  4839. * ENTRY (A0) = FIELD LENGTH.
  4840. * (ARGR) = ARGUMENT LIST.
  4841. * (ACTR) = ARGUMENT COUNT.
  4842. *
  4843. * EXIT (FL) = A0.
  4844. * (DATE.) = CURRENT DATE.
  4845. * (TITC) = CURRENT TIME.
  4846. * (FLST) = UPDATED FILE LIST.
  4847. * (LL) = LINE LIMIT.
  4848. * (PD) = PRINT DENSITY.
  4849. * ALL COMMAND PARAMETERS PROCESSED.
  4850.  
  4851.  
  4852. PRS SUBR ENTRY/EXIT
  4853. DATE DATE. SET CURRENT DATE
  4854. SB5 6
  4855. SA3 DATE.
  4856. LX6 B5,X3
  4857. SA6 TITB
  4858. SA6 A3
  4859. CLOCK TITC GET CURRENT TIME
  4860. SA3 TITC
  4861. LX6 B5,X3
  4862. SA6 A3
  4863. MEMORY CM,FL,R SET AVAILABLE TABLE SPACE
  4864. SA1 FL
  4865. LX1 30
  4866. SX6 X1-BUF
  4867. SA6 L.BUF
  4868.  
  4869. * PROCESS COMMAND PARAMETERS.
  4870.  
  4871. SA1 ACTR ARGUMENT COUNT
  4872. SB5 ARGA ARGUMENT TABLE
  4873. SA4 ARGR FIRST ARGUMENT
  4874. SB4 X1+
  4875. RJ ARG PROCESS COMMAND PARAMETERS
  4876. SX7 =C* LIBEDIT ARGUMENT ERROR(S).*
  4877. NZ X1,PRS13 IF ERROR IN PARAMETERS
  4878.  
  4879. * SET FILE NAMES IN LIST AND FET-S.
  4880.  
  4881. SB5 B0+
  4882. SB6 FLSTL-2
  4883. PRS1 SA1 PAR+B5
  4884. ZR X1,PRS2 IF NOT SPECIFIED
  4885. BX6 X1
  4886. SA1 FLST+/FLST/INPUT+B5
  4887. RJ RFN REPLACE FILE NAME
  4888. PRS2 SB5 B5+B1
  4889. LT B5,B6,PRS1 IF NOT FINISHED
  4890.  
  4891. * CHECK FILE NAME CONFLICT.
  4892.  
  4893. SA1 FLST+/FLST/TTYOUT
  4894. MX0 42
  4895. BX3 X1*X0
  4896. ZR X3,PRS5 IF NO FILE NAME
  4897. SA2 A1+1
  4898. SX7 =C* FILE NAME CONFLICT.*
  4899. PRS3 ZR X2,PRS5 IF END OF LIST
  4900. BX4 X2*X0
  4901. ZR X4,PRS4 IF NO FILE NAME
  4902. BX5 X4-X3
  4903. ZR X5,PRS13 IF FILE NAME CONFLICT
  4904. PRS4 SA2 A2+B1 NEXT FILE NAME
  4905. EQ PRS3 LOOP FOR ALL FILES
  4906.  
  4907. PRS5 SA1 A1+1
  4908. NZ X1,PRS3 IF NOT YET END OF LIST
  4909.  
  4910. * PROCESS REQUIRED FILES.
  4911.  
  4912. SETLOF PRSB SET LIST OF FILES
  4913. SA1 FLST+/FLST/NEW
  4914. BX6 X0*X1
  4915. SX7 =C* NO NEW FILE.*
  4916. ZR X6,PRS13 IF NO NEW FILE
  4917. SA6 GULF SET INPUT FILE FOR *LIBGEN*
  4918.  
  4919. * DETERMINE ASSIGNMENT OF INPUT AND OUTPUT.
  4920.  
  4921. SX2 I CHECK FOR TERMINAL INPUT FILE
  4922. RJ STF
  4923. SA6 TTYI
  4924. NZ X6,PRS6 IF NOT TTY INPUT
  4925. RETURN TTYOUT,R ASSIGN *TTYOUT* TO TERMINAL
  4926. SA1 =2LTT
  4927. MX7 -12
  4928. SA2 TTYOUT+1
  4929. BX6 -X7*X2
  4930. BX6 X6+X1
  4931. SA6 A2+
  4932. REQUEST TTYOUT,U
  4933. WRITE TTYOUT,*
  4934. PRS6 SX2 O CHECK FOR TTY OUTPUT FILE
  4935. RJ STF
  4936. SA6 TTYO
  4937.  
  4938. * PROCESS *LO* AND SET LIST OPTIONS.
  4939.  
  4940. SA1 FLST+/FLST/OUTPUT
  4941. BX4 X0*X1
  4942. NZ X4,PRS7 IF LIST FILE DEFINED
  4943. BX7 X7-X7 CLEAR LIST OPTIONS
  4944. SA7 LIST
  4945. PRS7 NZ X6,PRS8 IF NOT TTY OUTPUT
  4946.  
  4947. * CHECK TERMINAL TABLE FOR *BRIEF* MODE.
  4948.  
  4949. TSTATUS PRSA
  4950. SA1 PRSA+1
  4951. SX6 40B
  4952. BX6 X6*X1
  4953. SA6 BRFM
  4954.  
  4955. * CHECK LIST OPTIONS.
  4956.  
  4957. PRS8 SA1 LIST
  4958. BX1 X0*X1
  4959. ZR X1,PRS9 IF NO LIST OPTIONS SPECIFIED
  4960. RJ ILO INTERPRET LIST OPTIONS
  4961. SX7 =C* LIST OPTION ERROR.*
  4962. NZ X1,PRS13 IF LIST OPTION ERROR
  4963. EQ PRS10 PROCESS *Z*
  4964.  
  4965. PRS9 SA1 TTYO
  4966. NZ X1,PRS10 IF NOT TTY OUTPUT
  4967. SX7 3 SET TTY *LO* DEFAULT OPTIONS
  4968. SA7 LIST
  4969. PRS10 SA1 CZOP
  4970. ZR X1,PRS11 IF *Z* PARAMETER NOT SELECTED
  4971. BX6 X1
  4972. SA6 TTYI
  4973. SX2 INPUT INPUT FILE FET
  4974. RJ ZAP *Z* ARGUMENT PROCESSOR
  4975. PRS11 SA1 LGO SET CORRECTION FILE NAME
  4976. MX0 42
  4977. BX6 X0*X1
  4978. SA6 LGO.
  4979. ZR X6,PRS12 IF NO CORRECTION FILE
  4980. ADDWRD FNT,A6
  4981. PRS12 OPEN NEW,WRITE,R INITIALIZE *NEW* FILE
  4982. WRITE OUTPUT,* PRESET *WRITE* FUNCTION IN FET
  4983. GETPP SBUF,LL,PD GET PAGE SIZE PARAMETERS
  4984. EQ PRSX RETURN
  4985.  
  4986. PRS13 MESSAGE X7,3 ISSUE ERROR MESSAGE
  4987. RJ ABT ABORT PROGRAM
  4988.  
  4989.  
  4990. PRSA BSS 2 *TLX* (TSTATUS) RESPONSE BLOCK
  4991.  
  4992. PRSB VFD 12/0,18/FLST,30/0 FILE LIST POINTER FOR *SETLOF*
  4993.  
  4994. * ARGUMENT TABLE.
  4995.  
  4996. ARGA BSS 0
  4997. I ARG FLST+/FLST/INPUT,PAR,400B
  4998. L ARG FLST+/FLST/OUTPUT,PAR+1,400B
  4999. P ARG FLST+/FLST/OLD,PAR+2,400B
  5000. N ARG FLST+/FLST/NEW,PAR+3,400B
  5001. B ARG FLST+/FLST/LGO,PAR+4,400B
  5002. LO ARG ARGB,LIST,400B
  5003. C ARG -*,CCPY RECOPY
  5004. D ARG -*,CDOP NO ABORT (DEBUG), EQUIVALENT TO *NA*
  5005. V ARG -*,CVFY VFYLIB
  5006. Z ARG -*,CZOP INPUT DIRECTIVES ON COMMAND
  5007. NA ARG -*,CDOP NO ABORT (DEBUG)
  5008. NI ARG -*,CADD NO INSERT AT EOF
  5009. NR ARG -*,CREW NO REWIND
  5010. U ARG LIBGA,CULB USER LIBRARY OPTION
  5011. NX ARG ARGC,GULJ,400B NO CROSSREF ULIB
  5012. CON 0
  5013.  
  5014.  
  5015. ARGB CON 1LF FULL LISTING
  5016. ARGC CON 1L1 NO CROSS REFERENCE ULIB
  5017.  
  5018.  
  5019. PAR BSSZ FLSTL-2 PARAMETER BUFFER
  5020. SPACE 4,10
  5021. ** PRESET COMMON DECKS.
  5022.  
  5023.  
  5024. *CALL COMCARG
  5025. *CALL COMCSTF
  5026. *CALL COMCUSB
  5027. *CALL COMCWTS
  5028. *CALL COMCZAP
  5029.  
  5030. SPACE 4,10
  5031. END LIBEDIT
cdc/nos2.source/opl871/libedit.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator