Table of Contents

LIBRARY

Table Of Contents

  • [00002] LIBRARY - DECLARE GLOBAL LIBRARY SET.
  • [00132] CONSTANTS AND TABLES.
  • [00205] MAIN PROGRAM.
  • [00293] CLL - CHECK FOR LOCAL LIBRARY.
  • [00399] PLE - PROCESS LIBRARY ENTRY POINTS.
  • [00479] CEN - CHECK ENTRY POINT NAME.
  • [00591] WEP - WRITE ENTRY POINT TABLE.
  • [00624] CGL - CLEAR GLOBAL LIBRARY BIT.
  • [00648] ABT - ISSUE MESSAGE AND ABORT.
  • [00680] PRS - PRESET.
  • [00836] CNS - CLEAR *NO-DROP* STATUS.

Source Code

LIBRARY.txt
  1. IDENT LIBRARY,FETS
  2. TITLE LIBRARY - DECLARE GLOBAL LIBRARY SET.
  3. ABS
  4. SST
  5. ENTRY LIBRARY
  6. ENTRY LIB=
  7. ENTRY RFL=
  8. ENTRY SSJ=
  9. SYSCOM B1
  10. BASE DECIMAL
  11. *COMMENT LIBRARY - DECLARE GLOBAL LIBRARY SET.
  12. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  13. SPACE 4,10
  14. ***** LIBRARY - DECLARE GLOBAL LIBRARY SET.
  15. *
  16. * F. E. TERHAAR-YONKERS. 81/01/21.
  17. *
  18. * *LIBRARY* CHANGES THE GLOBAL LIBRARY INFORMATION IN
  19. * THE CONTROL POINT AREA.
  20. SPACE 4,10
  21. *** *LIBRARY* CHANGES THE GLOBAL LIBRARY INFORMATION IN
  22. * THE CONTROL POINT AREA. THE GLOBAL LIBRARY SET IS EITHER
  23. * CLEARED OR SET TO A LIST OF FILES DEPENDING ON THE
  24. * CONTROL STATEMENT FORMAT.
  25. * THE LIBRARY NAMES ARE VALIDATED AND SEARCHED IN THE ORDER
  26. * ON THE CONTROL STATEMENT. THE *ULIB* RECORD IN EACH
  27. * LIBRARY IS SEARCHED FOR CONTROL CARD CALLABLE ENTRY POINTS
  28. * (A *PROC* NAME, RELOCATABLE MAIN PROGRAM NAME, OR AN ENTRY
  29. * POINT IN AN ABSOLUTE PROGRAM). FOR EACH ENTRY POINT FOUND,
  30. * A FOUR WORD DIRECTORY ENTRY IS WRITTEN TO THE *ZZZZZLD* FILE.
  31. *
  32. * THE DIRECTORY FORMAT IS AS FOLLOWS.
  33. *
  34. *T 42/ ENTRY POINT NAME,12/ 0,6/ RT
  35. *T, 24/ RANDOM ADDRESS,36/ 0
  36. *T, 42/ LIBRARY NAME,18/ 0
  37. *T, 12/ FL,11/ 0,1/N,12/ SEPF,6/ 0,18/ SSJB
  38. *
  39. * RT = RECORD TYPE.
  40. * FL = REQUIRED FIELD LENGTH/100B.
  41. * N = PARAMETER CRACKING FORMAT.
  42. * SET IF *NPC=* ENTRY POINT DEFINED.
  43. * SEPF = SPECIAL ENTRY POINT FLAGS
  44. * (SEE BYTE 0 OF *SEPW* IN *PPCOM*).
  45. * SSJB = *SSJ=* PARAMETER BLOCK ADDRESS.
  46. *
  47. * IF ONE OR MORE CONTROL CARD CALLABLE ENTRY POINTS ARE
  48. * FOUND, THE GLOBAL LIBRARY BIT IS SET IN *LB1W* IN
  49. * THE CONTROL POINT AREA.
  50. SPACE 4,10
  51. *** CONTROL STATEMENT FORMAT.
  52. *
  53. * FORMAT ACTION
  54. *
  55. * LIBRARY. CLEAR GLOBAL LIBRARY SET.
  56. * LIBRARY(LIB1,...,LIBN) SET GLOBAL LIBRARY SET = LIB1,...,LIBN.
  57. * LIBRARY(LIB1,...,LIBN/R) SET GLOBAL LIBRARY SET = LIB1,...,LIBN.
  58. * LIBRARY(LIB1,...,LIBN/D) DELETE LIB1,...,LIBN FROM GLOBAL SET.
  59. * LIBRARY(LIB1,...,LIBN/A) ADD LIB1,...,LIBN TO THE GLOBAL SET.
  60. *
  61. *
  62. * NOTES:
  63. *
  64. * 1) TO BE ABLE TO DO CONTROL CARD CALLS FROM USER LIBRARIES
  65. * THE LIBRARIES MUST BE LOCAL TO THE JOB WHEN *LIBRARY* IS
  66. * RUN. THIS IS AN INCOMPATABILITY WITH THE SAME FEATURE ON
  67. * NOS/BE.
  68. *
  69. * 2) IF THE USER SIMPLY WANTS TO SATISFY RELOCATABLE LOADS AND
  70. * DOES NOT WISH TO INCUR THE ADDITIONAL OVERHEAD OF SEARCHING
  71. * THE DIRECTORY FOR A VALID ENTRY POINT, *LIBRARY* SHOULD BE
  72. * EXECUTED PRIOR TO THE GET/ATTACH OF THE USER LIBRARIES.
  73. *
  74. * 3) BIT 58 IN THE LOADER CONTROL WORD IS UTILIZED AS THE FLAG
  75. * FOR THE GLOBAL LIBRARY PROCESS. THIS BIT WILL BE CHECKED
  76. * BY *1AJ* BEFORE ANY DIRECTORY SEARCHES ARE MADE.
  77. SPACE 4,10
  78. *** DAYFILE MESSAGES.
  79. *
  80. *
  81. * * ERROR IN LIBRARY ARGUMENTS.* = AN ILLEGAL ARGUMENT OR
  82. * FORMAT WAS USED ON THE CONTROL STATEMENT. COMPARE
  83. * THE CONTROL STATEMENT USED WITH THE DOCUMENTED
  84. * FORMATS.
  85. * THE GLOBAL LIBRARY SET CURRENTLY IN EFFECT REMAINS
  86. * UNCHANGED.
  87. *
  88. * * TOO MANY LIBRARY NAMES SPECIFIED.* = THE NUMBER OF
  89. * LIBRARIES EXCEEDS THE NUMBER THAT CAN BE STORED IN THE
  90. * CONTROL POINT AREA. THE GLOBAL LIBRARY SET CURRENTLY
  91. * IN EFFECT REMAINS UNCHANGED.
  92. *
  93. * * GLOBAL LIBRARY SET CLEARED.* = FORMAT 1 ( NO ARGUMENTS ) OF
  94. * THE CONTROL STATEMENT WAS PROCESSED. ALL THE GLOBAL
  95. * LIBRARY ENTRIES IN THE CONTROL POINT AREA AND THE
  96. * GLOBAL LIBRARY BIT IN THE LOADER CONTROL WORD ARE
  97. * CLEARED.
  98. *
  99. * * TOO MANY USER LIBRARIES SPECIFIED.* = THE NUMBER OF LIBRARY
  100. * ARGUMENTS IS LESS THAN OR EQUAL TO THE MAXIMUM, BUT
  101. * TOO MANY OF THOSE LIBRARIES ARE USER LIBRARIES
  102. * (LIBRARIES NOT IN THE CENTRAL DIRECTORY). THE MAXIMUM
  103. * NUMBER OF USER LIBRARIES IS 2 IF 4 OR LESS SYSTEM
  104. * LIBRARIES ARE DECLARED, 1 IF 5 THRU 14 ARE SYSTEM
  105. * LIBRARIES, AND 0 IF MORE THAN 14 ARE SYSTEM LIBRARIES.
  106. * THE GLOBAL LIBRARY SET CURRENTLY IN EFFECT REMAINS
  107. * UNCHANGED.
  108. *
  109. * * LIBRARY NOT FOUND, LNAME* = *LNAME* IS THE NAME OF A USER
  110. * LIBRARY ( NOT KNOWN BY THE SYSTEM ) THAT WAS NOT LOCAL
  111. * TO THE JOB WHEN *LIBRARY* WAS EXECUTED. NO DIRECTORY
  112. * IS GENERATED FOR LIBRARY *LNAME*.
  113. *
  114. * * INCORRECTLY FORMATTED LIBRARY, LNAME* = A FILE *LNAME* WAS
  115. * FOUND, BUT THE ULIB RECORD IS DEFECTIVE OR
  116. * MISSING. THIS MESSAGE APPLIES TO BOTH SYSTEM AND USER
  117. * LIBRARIES. NO DIRECTORY IS GENERATED FOR FILE
  118. * *LNAME*.
  119. *
  120. * * ENTRY POINT TABLE OVERFLOW.* = THE NUMBER OF ENTRY POINTS
  121. * PER PROGRAM UNIT HAS EXCEEDED THE TABLE SPACE
  122. * ALLOTTED. REASSEMBLE THE PROGRAM WITH A LARGER VALUE
  123. * FOR *LEPT*.
  124. *
  125. * * LIBRARY FILE ERROR(S) - SEE DAYFILE.* = ONE OR MORE OF THE
  126. * SPECIFIED LIBRARY NAMES WERE NOT FOUND OR WERE NOT IN
  127. * LIBRARY FORMAT. THE SPECIFIC ERROR CAN BE DETERMINED
  128. * FROM PREVIOUS DAYFILE MESSAGES. THE JOB IS ABORTED.
  129. * HOWEVER, THE DIRECTORY IS GENERATED FOR ALL LIBRARIES
  130. * EXCEPT THE ONE(S) IN ERROR.
  131. SPACE 4
  132. TITLE CONSTANTS AND TABLES.
  133. ***** ASSEMBLY CONSTANTS.
  134.  
  135.  
  136. SSJ= EQU 0
  137. LIB= EQU 0
  138. UBUFL EQU 201B LENGTH OF ULIB BUFFER
  139. ZBUFL EQU 201B LENGTH OF ZZZZZLD BUFFER
  140. LEPT EQU 1000D LENGTH OF ENTRY POINT TABLE
  141. ARGM EQU 24D MAXIMUM NUMBER OF ARGUMENTS
  142. MAXL EQU 24D MAXIMUM NUMBER OF LIBRARIES
  143. *** COMMON DECKS.
  144. SPACE 4
  145. *CALL COMCCMD
  146. *CALL COMCMAC
  147. *CALL COMSLFD
  148. SPACE 4
  149. ORG 111B
  150. * FETS.
  151.  
  152.  
  153. FETS BSS 0
  154.  
  155. ULIB FILEB ULBF,UBUFL,(FET=8)
  156. ZZZZZLD FILEB ZZBF,ZBUFL,(FET=8)
  157. SPACE 4,10
  158. * RESERVED LOCATIONS.
  159.  
  160.  
  161. LDCW CON 0 LOADER CONTROL WORD
  162. EFLG CON 0 ENTRY POINT FLAG
  163. ZCNT CON 0 COUNT OF LIBRARY DIRECTORIES BUILT
  164. TADR CON 0 *SETGLS* TABLE ADDRESS
  165. ACNT CON 0 ARGUMENT COUNT
  166. OTYP CON 1RR OPERATION TYPE(ADD, DELETE OR REPLACE)
  167. PEPT CON 0 ENTRY POINT BEING PROCESSED
  168. PRFX DATA 77000016BS36 FIRST WORD OF ULIB PREFIX TABLE
  169. UPFX BSS 17B ULIB PREFIX TABLE
  170. UHDR CON 0 ULIB HEADER WORD
  171. TEPTP BSS 1 *TEPT* POINTER
  172. PTYP CON 0 PROGRAM TYPE
  173. SEPF CON 0 SPECIAL ENTRY POINTS
  174. LFEC CON 0 LIBRARY FILE ERROR COUNT
  175.  
  176. * NOTE: THE FOLLOWING 4 LOCATIONS MAKE UP THE
  177. * WORKING BUFFER FOR THE *ZZZZZLD* FILE.
  178.  
  179. WBUF BSS 1 WORKING BUFFER
  180. PRAN CON 0 PROGRAM RANDOM ADDRESS
  181. CLIB CON 0 LIBRARY NAME BEING PROCESSED
  182. RFL CON 0 PROGRAM FIELD LENGTH/100B
  183.  
  184.  
  185. ** ADDRESS OF *TLIB* ENTRY BEING PROCESSED.
  186.  
  187.  
  188. ALIB VFD 42/0,18/TLIB
  189. SPACE 4,10
  190. ** *SETGLS* PARAMETER WORD.
  191.  
  192.  
  193. SLPW VFD 6/0,18/ARGR,36/0
  194. SPACE 4,10
  195. ** *GETGLS* PARAMETER WORD.
  196.  
  197.  
  198. GLPW VFD 6/0,18/GLIB,36/0
  199. SPACE 4,10
  200. ** GLOBAL LIBRARY BIT MASK FOR LOADER CONTROL WORD.
  201.  
  202.  
  203. GFLG VFD 1/0,1/1,58/0
  204. SPACE 4,10
  205. TITLE MAIN PROGRAM.
  206. ** LIBRARY.
  207. *
  208. * MAIN ROUTINE.
  209.  
  210.  
  211. LIBRARY SB1 1
  212. RJ PRS PRESET
  213. RETURN ZZZZZLD RETURN OLD DIRECTORY FILE
  214. SA2 ACNT READ ARGUMENT COUNT
  215. SB2 X2
  216. ZR B2,LIB4 IF NO ARGUMENTS
  217. SA1 TADR POINTER TO *SETGLS* TABLE
  218. SX6 X1
  219. SA6 ALIB
  220. LIB1 SA1 ALIB POINTER TO *SETGLS* TABLE
  221. SX6 X1+B1
  222. SA1 X1 READ NEXT ENTRY
  223. ZR X1,LIB2 IF NO MORE ENTRIES
  224. SA6 ALIB STORE NEW ADDRESS
  225. MX0 42
  226. BX6 X0*X1 STORE CURRENT LIBRARY NAME
  227. SA6 CLIB
  228. RJ CLL CHECK FOR LOCAL LIBRARY
  229. EQ LIB1 CHECK NEXT LIBRARY
  230.  
  231. * ISSUE LIBRARIES PROCESSED MESSAGE AND SET/CLEAR
  232. * GLOBAL LIBRARY FLAG IN CONTROL POINT AREA.
  233.  
  234. LIB2 SETGLS SLPW ISSUE GLOBAL LIBRARY SET
  235. GETLC LDCW GET LOADER CONTROL WORD
  236. SA1 TADR
  237. SA1 X1
  238. ZR X1,LIB4 IF NO LIBRARIES LEFT
  239. SA1 OTYP CHECK OPTION TYPE
  240. SX1 X1-1RD
  241. ZR X1,LIB3 IF OPERATION IS DELETE
  242.  
  243. * CHECK TO SEE IF THERE WERE NO ERRORS IN
  244. * THE GLOBAL LIBRARY SET JUST ISSUED.
  245.  
  246. SA2 TADR READ TABLE ADDRESS
  247. SB3 X2
  248. SA1 ACNT READ ARGUMENT COUNT
  249. SB2 X1
  250. SB2 B2+B3
  251. SA1 SLPW READ *SETGLS* PARAMETER WORD
  252. LX1 24
  253. SB3 X1
  254. EQ B2,B3,LIB3 IF NO ERRORS INDICATED
  255. SA1 LFEC
  256. NZ X1,LIB3 IF LIBRARY FILE ERRORS OCCURRED
  257. MX6 -1 INDICATE TOO MANY LIBRARIES
  258. SA6 A1
  259. LIB3 SA2 EFLG READ ENTRY POINT FLAG
  260. NZ X2,LIB5 IF CROSS REFERENCE GENERATED
  261. LIB4 RJ CGL CLEAR GLOBAL LIBRARY BIT
  262. SA1 ACNT
  263. NZ X1,LIB6 IF NOT CLEAR OF ALL EXISTING LIBRARIES
  264. SX0 LIBA * GLOBAL LIBRARY SET CLEARED.*
  265. MESSAGE X0,3 ISSUE TERMINATION MESSAGE
  266. EQ LIB6 END PROCESSING
  267.  
  268. * SET GLOBAL LIBRARY FLAG.
  269.  
  270. LIB5 SA1 GFLG GET GLOBAL LIBRARY FLAG
  271. SA2 LDCW READ LOADER CONTROL WORD
  272. BX6 X1+X2 SET FLAG
  273. SA6 A2
  274. SETLC LDCW RESET LOADER CONTROL WORD
  275. WRITER ZZZZZLD,R FLUSH BUFFER
  276. SETFS ZZZZZLD,NDST SET FILE STATUS
  277. * EQ LIB6 END PROCESSING
  278.  
  279. * TERMINATE PROGRAM.
  280.  
  281. LIB6 SA1 LFEC CHECK FOR LIBRARY FILE ERRORS
  282. SX0 LIBC * TOO MANY USER LIBRARIES SPECIFED *
  283. NG X1,ABT IF TOO MANY LIBRARIES
  284. SX0 LIBB * LIBRARY FILE ERROR(S) - SEE DAYFILE.*
  285. NZ X1,ABT IF LIBRARY FILE ERRORS OCCURRED
  286. ENDRUN
  287.  
  288.  
  289. LIBA DATA C* GLOBAL LIBRARY SET CLEARED.*
  290. LIBB DATA C* LIBRARY FILE ERROR(S) - SEE DAYFILE.*
  291. LIBC DATA C* TOO MANY USER LIBRARIES SPECIFIED.*
  292. CLL TITLE SUBROUTINES.
  293. ** CLL - CHECK FOR LOCAL LIBRARY.
  294. *
  295. * *CLL* CHECKS FOR THE EXISTENCE OF A LOCAL LIBRARY
  296. * FILE. IF FILE IS NOT LOCAL AND IS NOT IN THE SYSTEM LIBRARY
  297. * DIRECTORY, A DIAGNOSTIC IS ISSUED. IF THE FILE IS LOCAL,
  298. * THEN THE PREFIX TABLE IS CHECKED TO ENSURE THE FILE
  299. * IS ACTUALLY A LIBRARY.
  300. *
  301. * ENTRY (X6) = (CLIB) = LIBRARY NAME.
  302. * (ALIB) = POINTER TO NEXT ENTRY IN *SETGLS* TABLE.
  303. *
  304. * EXIT ALL PROCESSING COMPLETE FOR THIS LIBRARY.
  305. *
  306. * USES X - 0, 1, 2, 3, 6.
  307. * A - 1, 2, 6.
  308. * B - 2, 5.
  309. *
  310. * CALLS PLE, SNM.
  311. *
  312. * MACROS MESSAGE, READ, READW, REWIND, SETFET, SETFS, STATUS,
  313. * SYSTEM.
  314.  
  315.  
  316. CLL SUBR ENTRY/EXIT
  317. SETFET ULIB,LFN=X6 STORE LIBRARY NAME IN FET
  318. STATUS ULIB CHECK FOR FILE
  319. SA1 ULIB
  320. MX2 -11
  321. LX2 1
  322. BX1 -X2*X1
  323. ZR X1,CLL2 IF FILE DOES NOT EXIST
  324. REWIND ULIB,R POSITION AT BOI
  325. READ ULIB,R INITIATE READ OPERATIONS
  326. SA1 ULIB+2 READ *IN*
  327. SA2 A1+B1 READ *OUT*
  328. IX1 X1-X2
  329. ZR X1,CLL2 IF NO DATA TRANSFERRED
  330. READW ULIB,UPFX,17B READ PREFIX TABLE
  331. NZ X1,CLL3 IF TRANSFER INCOMPLETE
  332. SA1 UPFX READ FIRST WORD OF PREFIX TABLE
  333. SA2 PRFX FIRST WORD OF A LEGAL ULIB PREFIX TABLE
  334. BX1 X1-X2
  335. NZ X1,CLL3 IF NOT A USER LIBRARY PREFIX TABLE
  336.  
  337. * VALID PREFIX TABLE FOUND, NOW CHECK FOR ULIB TABLE.
  338.  
  339. READW ULIB,UHDR,1 READ ULIB HEADER WORD
  340. NZ X1,CLL3 IF TRANSFER INCOMPLETE
  341. SA1 UHDR CHECK FOR ULIB TABLE ID
  342. MX0 12
  343. BX2 X0*X1
  344. LX2 12
  345. SX3 X2-7600B
  346. NZ X3,CLL3 IF NOT A ULIB TABLE
  347. LX1 12 POSITION GROUP NAME COUNT FIELD
  348. BX2 X1*X0 STRIP OFF GROUP NAME COUNT
  349. LX2 12
  350. ZR X2,CLL1 IF NO GROUP NAMES
  351. READW ULIB,TEPT,X2 SKIP GROUP NAMES
  352. NZ X1,CLL3 IF TRANSFER INCOMPLETE
  353. CLL1 RJ PLE PROCESS LIBRARY ENTRY POINT
  354. SETFS ULIB,NDST SET *NDST* STATUS ON LIBRARY
  355. EQ CLLX RETURN
  356.  
  357. * ISSUE LIBRARY NOT FOUND MESSAGE, IF NOT IN SYSTEM LIBRARY
  358. * DIRECTORY.
  359.  
  360. CLL2 SYSTEM CPM,R,CLIB,142B*100B GET SYSTEM LIBRARY STATUS
  361. SA1 CLIB CHECK IF LIBRARY IN SYSTEM DIRECTORY
  362. MX2 -1
  363. BX1 -X2*X1
  364. NZ X1,CLLX IF SYSTEM LIBRARY
  365. SB5 CLLB SET FWA OF SEARCH
  366. SX0 CLLA SET FWA OF MESSAGE
  367. EQ CLL4 SET UP DAYFILE MESSAGE
  368.  
  369. CLL3 SB5 CLLD SET FWA OF SEARCH
  370. SX0 CLLC SET FWA OF MESSAGE
  371. CLL4 SA1 CLIB SET LIBRARY NAME TO BE ADDED TO MESSAGE
  372. SB2 1RX SET SEARCH CHARACTER
  373. RJ SNM SET NAME INTO MESSAGE
  374. MESSAGE X0,3 ISSUE MESSAGE
  375. SA1 LFEC INCREMENT LIBRARY FILE ERROR COUNT
  376. SX6 X1+B1
  377. SA6 A1
  378. SA1 ALIB POINTER TO NEXT ENTRY
  379. SX6 X1-1
  380. SA6 A1
  381. CLL5 SA2 X1 MOVE REMAINING ENTRIES DOWN ONE
  382. BX6 X2
  383. SA6 A2-B1
  384. SX1 X1+B1
  385. NZ X2,CLL5 IF MORE TO MOVE
  386. EQ CLLX RETURN
  387.  
  388.  
  389. CLLA DATA 10H LIBRARY N
  390. DATA 10HOT FOUND,
  391. CLLB DATA 8LXXXXXXX.
  392.  
  393. CLLC DATA 10H INCORRECT
  394. DATA 10HLY FORMATT
  395. DATA 10HED LIBRARY
  396. CLLD DATA 10H, XXXXXXX.
  397. DATA 0
  398. PLE SPACE 4,10
  399. ** PLE - PROCESS LIBRARY ENTRY POINTS.
  400. *
  401. * *PLE* PROCESSES THE ENTRY POINT LIST IN THE ULIB
  402. * RECORD UNTIL THE RANDOM ADDRESS WORD IS FOUND.
  403. * THEN CALLS *WEP* TO WRITE THE ENTRY POINTS OF
  404. * THE PROGRAM TO THE *ZZZZZLD* DIRECTORY FILE.
  405. *
  406. * ENTRY *ULIB* RECORD POSITIONED BEFORE FIRST ENTRY POINT.
  407. *
  408. * EXIT ALL ENTRY POINTS FOR THIS *ULIB* RECORD PROCESSED.
  409. *
  410. * USES A - 1, 6, 7.
  411. * X - 0, 1, 6, 7.
  412. * B - 2, 3.
  413. *
  414. * CALLS CEN, WEP.
  415. *
  416. * MACROS READW.
  417.  
  418.  
  419. PLE SUBR ENTRY/EXIT
  420. BX6 X6-X6 CLEAR FIELD LENGTH ENTRY
  421. SA6 RFL
  422. SB2 B0 CLEAR ENTRY POINT COUNTER
  423.  
  424. * READ ENTRY POINTS UNTIL RANDOM ADDRESS FOUND.
  425.  
  426. PLE1 READW ULIB,PEPT,1 READ POSSIBLE ENTRY POINT
  427. NZ X1,PLEX IF END OF RECORD ENCOUNTERED
  428. SA1 PEPT
  429. NG X1,PLE3 IF PROGRAM RANDOM ADDRESS POINTER
  430.  
  431. * CHECK TO SEE IF THE ENTRY POINT CAN BE CONTROL
  432. * CARD CALLED (NO SPECIAL SYMBOLS).
  433.  
  434. PLE2 RJ CEN CHECK ENTRY POINT NAME
  435. NZ X5,PLE1 IF NOT CONTROL CARD CALLABLE
  436. SX0 PLEA TABLE OVERFLOW MESSAGE
  437. SB3 LEPT ENTRY POINT TABLE SIZE
  438. SA6 TEPT+B2 STORE ENTRY POINT IN TABLE
  439. SB2 B2+B1 INCREMENT ENTRY POINT COUNT
  440. EQ B2,B3,ABT IF *TEPT* TABLE OVERFLOWED
  441. EQ PLE1 CHECK NEXT WORD IN ULIB RECORD
  442.  
  443. * IF SOME CONTROL CARD CALLABLE ENTRY POINTS WERE
  444. * FOUND, CHECK THE PROGRAM TYPE FIELD. IF THE FIELD
  445. * IS ZERO THEN THE RECORD CANNOT BE CONTROL CARD CALLED.
  446.  
  447. PLE3 EQ B0,B2,PLE4 IF NO ENTRY POINTS FOUND
  448. MX0 -24
  449. BX7 -X0*X1 EXTRACT RANDOM ADDRESS
  450. LX7 36
  451. MX0 54
  452. LX1 30 EXTRACT RECORD TYPE
  453. BX6 -X0*X1
  454. ZR X6,PLE4 IF NOT CONTROL CARD CALLABLE
  455. SA6 PTYP STORE PROGRAM TYPE
  456. SA6 EFLG SET DIRECTORY ENTRIES FLAG
  457. BX6 X6-X6
  458. SA6 TEPT+B2 TERMINATE ENTRY POINT LIST WITH ZERO WORD
  459. SA7 PRAN STORE PROGRAM RANDOM ADDRESS
  460. RJ WEP WRITE ENTRY POINT DIRECTORY
  461. SX6 B0+ CLEAR SPECIAL ENTRY POINTS
  462. SA6 SEPF
  463.  
  464. * SKIP CROSS REFERENCE ENTRIES UNTIL ANOTHER POSSIBLE
  465. * ENTRY POINT IS FOUND.
  466.  
  467. PLE4 SB2 B0 CLEAR ENTRY POINT COUNT
  468. PLE5 READW ULIB,PEPT,1 READ POSSIBLE ENTRY POINT
  469. NZ X1,PLEX IF END OF RECORD ENCOUNTERED
  470. SA1 PEPT
  471. NG X1,PLE5 IF NOT AN ENTRY POINT
  472. BX6 X6-X6 CLEAR FIELD LENGTH
  473. SA6 RFL
  474. EQ PLE2 PROCESS ENTRY POINT NAME
  475.  
  476.  
  477. PLEA DATA C* ENTRY POINT TABLE OVERFLOW.*
  478. CEN SPACE 4,10
  479. ** CEN - CHECK ENTRY POINT NAME.
  480. *
  481. * *CEN* CHECKS FOR VALID CONTROL CARD CALLABLE NAMES.
  482. * IF A SPECIAL ENTRY POINT IS FOUND, THE APPROPRIATE BIT
  483. * IS SET IN THE DIRECTORY AND THE *SPECIAL ENTRY POINTS
  484. * PRESENT* FLAG IS SET. IF AN *NPC=* ENTRY POINT IS
  485. * FOUND, THE NOS-CRACKING BIT IS SET IN THE DIRECTORY.
  486. * IF AN *RFL=* ENTRY POINT IS FOUND, THE FIELD LENGTH IS
  487. * EXTRACTED AND STORED IN WORD 4 OF THE DIRECTORY ENTRY.
  488. * IF AN *SSJ=* ENTRY POINT IS FOUND, THE PARAMETER BLOCK
  489. * ADDRESS IS EXTRACTED AND STORED IN WORD 4 OF THE
  490. * DIRECTORY ENTRY.
  491. *
  492. * ENTRY (X1) = NAME TO BE CHECKED.
  493. *
  494. * EXIT (X5) = ZERO IF NAME IS CONTROL CARD CALLABLE.
  495. * (X6) = NAME, IF NOT SPECIAL ENTRY POINT.
  496. *
  497. * USES A - 2, 5, 6.
  498. * X - 0, 1, 2, 5, 6.
  499. * B - 5, 6.
  500.  
  501.  
  502. CEN SUBR ENTRY/EXIT
  503.  
  504. * CHECK FOR SPECIAL ENTRY POINT.
  505.  
  506. MX0 24
  507. SA5 CENA-1 SET TABLE ADDRESS
  508. CEN1 SA5 A5+B1
  509. ZR X5,CEN5 IF END OF SPECIAL ENTRY POINT TABLE
  510. BX6 X5-X1 COMPARE ENTRY POINT NAMES
  511. BX6 X6*X0
  512. NZ X6,CEN1 IF NO MATCH
  513. MX0 -12 ADD IN NEW SPECIAL ENTRY POINT FLAG
  514. BX6 -X0*X5
  515. LX6 24
  516. SA2 SEPF
  517. BX6 X2+X6
  518. SA6 A2
  519. AX5 12 EXTRACT SPECIAL HANDLING ROUTINE ADDRESS
  520. SB6 X5
  521. SX5 B1 SET NOT COMMAND CALLABLE
  522. ZR B6,CENX IF NO SPECIAL HANDLING ROUTINE
  523. JP B6 PERFORM SPECIAL HANDLING
  524.  
  525. * PROCESS *RFL=* SPECIAL ENTRY POINT.
  526.  
  527. CEN2 MX0 12 EXTRACT FIELD LENGTH
  528. LX1 30
  529. BX6 X0*X1
  530. SA5 RFL
  531. BX5 -X0*X5
  532. BX6 X6+X5
  533. SA6 RFL STORE FIELD LENGTH
  534. SX5 B1
  535. EQ CENX EXIT
  536.  
  537. * PROCESS *NPC=* SPECIAL ENTRY POINT.
  538.  
  539. CEN3 SA2 RFL SET NOS CRACKING BIT IN DIRECTORY
  540. SX6 B1
  541. LX6 36
  542. BX6 X2+X6
  543. SA6 A2
  544. EQ CENX RETURN
  545.  
  546. * PROCESS *SSJ=* SPECIAL ENTRY POINT.
  547.  
  548. CEN4 MX0 -18 GET PARAMETER BLOCK ADDRESS
  549. LX1 42
  550. BX1 -X0*X1
  551. BX6 X1+X6 STORE PARAMETER BLOCK ADDRESS
  552. SA6 A6
  553. EQ CENX RETURN
  554.  
  555. * CHECK FOR NORMAL ENTRY POINT.
  556.  
  557. CEN5 MX0 -6
  558. BX6 X1 SAVE NAME IN X6
  559. SB5 B0+
  560. SB6 8
  561. CEN6 LX1 6
  562. BX5 -X0*X1
  563. ZR X5,CENX IF END OF NAME FOUND
  564. SX2 X5-1R+
  565. PL X2,CENX IF INVALID CHARACTER
  566. SB5 B5+B1 INCREMENT CHARACTER COUNT
  567. EQ B5,B6,CENX IF EIGHT CHARACTERS CHECKED
  568. EQ CEN6 CHECK NEXT CHARACTER
  569.  
  570.  
  571. ** SPECIAL ENTRY POINT TABLE.
  572. *T 24/ EPTNAME,6/ 0,18/ PADDR,12/ EPTFLAG
  573. * EPTNAME = ENTRY POINT NAME.
  574. * PADDR = PROCESSOR ADDRESS.
  575. * EPTFLAG = SPECIAL ENTRY POINT FLAG (TO PLACE IN DIRECTORY).
  576.  
  577. CENA BSS 0
  578. VFD 24/0LARG=,6/,18/,12/4040B
  579. VFD 24/0LCLB=,6/,18/,12/4100B
  580. VFD 24/0LDMP=,6/,18/,12/4020B
  581. VFD 24/0LLDR=,6/,18/,12/4200B
  582. VFD 24/0LLIB=,6/,18/,12/4200B
  583. VFD 24/0LNPC=,6/,18/CEN3,12/0
  584. VFD 24/0LRFL=,6/,18/CEN2,12/0
  585. VFD 24/0LSDM=,6/,18/,12/4010B
  586. VFD 24/0LSSJ=,6/,18/CEN4,12/4004B
  587. VFD 24/0LSSM=,6/,18/,12/4001B
  588. VFD 24/0LVAL=,6/,18/,12/4002B
  589. CON 0 END OF TABLE
  590. WEP SPACE 4,25
  591. ** WEP - WRITE ENTRY POINT TABLE.
  592. *
  593. * *WEP* WRITES THE CONTENTS OF THE ENTRY POINT TABLE *TEPT*,
  594. * TO THE *ZZZZZLD* CROSS REFERENCE FILE.
  595. *
  596. * ENTRY ENTRY POINT TABLE SET UP.
  597. *
  598. * EXIT CONTENTS OF *TEPT* WRITTEN TO THE OUTPUT BUFFER.
  599. *
  600. * USES A - 1, 2, 3, 6, 7.
  601. * X - 1, 2, 3, 6, 7.
  602. *
  603. * MACROS WRITEW.
  604.  
  605.  
  606. WEP SUBR ENTRY/EXIT
  607. SX6 TEPT
  608. SA6 TEPTP INITIALIZE *TEPT* POINTER
  609. WEP1 SA1 TEPTP READ *TEPT* POINTER
  610. SA2 X1 READ NEXT ENTRY POINT IN TABLE
  611. ZR X2,WEPX IF NO MORE ENTRY POINTS TO PROCESS
  612. SX7 X1+B1 INCREMENT *TEPT* POINTER
  613. SA7 TEPTP
  614. SA3 PTYP READ RECORD TYPE
  615. BX6 X3+X2 COMBINE ENTRY NAME WITH RECORD TYPE
  616. SA6 WBUF STORE IN WORKING BUFFER
  617. SA2 RFL COMBINE RFL AND SPECIAL ENTRY POINT FLAGS
  618. SA3 SEPF
  619. BX7 X2+X3
  620. SA7 A2
  621. WRITEW ZZZZZLD,WBUF,4
  622. EQ WEP1 CHECK NEXT *TEPT* ENTRY
  623. CGL SPACE 4,15
  624. ** CGL - CLEAR GLOBAL LIBRARY BIT.
  625. *
  626. * *CGL* CLEARS THE GLOBAL LIBRARY BIT IN THE LOADER
  627. * CONTROL WORD. THIS INDICATES THAT THERE
  628. * ARE EITHER NO USER LIBRARIES TO PROCESS, OR THERE
  629. * ARE NO CONTROL CARD CALLABLE ENTRIES IN THE GLOBAL
  630. * LIBRARY SET.
  631. *
  632. * EXIT GLOBAL BIT IN LOADER CONTROL WORD CLEARED.
  633. *
  634. * USES A - 1, 2, 6.
  635. * X - 1, 2, 6.
  636. *
  637. * MACROS SETLC.
  638.  
  639.  
  640. CGL SUBR ENTRY/EXIT
  641. SA1 GFLG READ GLOBAL CONTROL FLAG
  642. SA2 LDCW READ LOADER CONTROL WORD
  643. BX6 -X1*X2 CLEAR GLOBAL FLAG
  644. SA6 LDCW
  645. SETLC LDCW RESET LOADER CONTROL WORD
  646. EQ CGLX RETURN
  647. ABT SPACE 4,10
  648. ** ABT - ISSUE MESSAGE AND ABORT.
  649. *
  650. * ENTRY (X0) = MESSAGE ADDRESS.
  651. *
  652. * MACROS ABORT, MESSAGE.
  653.  
  654.  
  655. ABT BSS 0 ENTRY
  656. MESSAGE X0,3
  657. ABORT ABORT CONTROL POINT
  658. SPACE 4,10
  659. * COMMON DECKS.
  660.  
  661.  
  662. *CALL COMCCIO
  663. *CALL COMCCPM
  664. *CALL COMCLFM
  665. *CALL COMCRDW
  666. *CALL COMCSNM
  667. *CALL COMCSYS
  668. *CALL COMCWTW
  669. BUFFERS SPACE 4,10
  670. * BUFFERS.
  671.  
  672.  
  673. ULBF EQU *+1 *ULIB* BUFFER
  674. ZZBF EQU ULBF+UBUFL *ZZZZZLD* BUFFER
  675. TEPT EQU ZZBF+ZBUFL ENTRY POINT TABLE
  676. TLIB EQU TEPT+LEPT LIBRARY NAME TABLE
  677. GLIB EQU TLIB+MAXL *GETGLS* TABLE
  678. RFL= EQU GLIB+MAXL
  679. PRS TITLE PRESET ROUTINE.
  680. ** PRS - PRESET.
  681. *
  682. * *PRS* DETERMINES THE FORMAT OF THE CONTROL
  683. * STATEMENT AND CHECKS FOR THE PRESENCE OF INVALID
  684. * SEPARATORS.
  685. * THE GLOBAL LIBRARY SET IS CLEARED, THE GLOBAL
  686. * FLAG IN THE LOADER CONTROL WORD IS CLEARED AND
  687. * THE *1AJ* GLOBAL LIBRARY DIRECTORY IS RETURNED
  688. * IF THE *LIBRARY* STATEMENT CONTAINS NO PARAMETERS
  689. * (*LIBRARY.*).
  690. *
  691. * EXIT (X0) = ERROR MESSAGE.
  692. * TO *ABT* IF ARGUMENT ERROR.
  693. *
  694. * USES A - 1, 2, 4, 5, 6, 7.
  695. * X - 0, 1, 2, 3, 4, 5, 6, 7.
  696. * B - 2, 3, 4, 5.
  697. *
  698. * CALLS CGL, CNS.
  699. *
  700. * MACROS GETGLS, GETLC, RETURN, SETGLS.
  701.  
  702.  
  703. PRS SUBR ENTRY/EXIT
  704. BX7 X7-X7 CLEAR *TLIB* AND *GLIB* BUFFERS
  705. SA7 TLIB STARTING ADDRESS
  706. SB5 MAXL+MAXL-1 CLEAR BOTH BUFFERS
  707. ERRNZ GLIB-TLIB-MAXL CODE ASSUMES CONTIGUOUS BUFFERS
  708. PRS0 SA7 A7+B1
  709. SB5 B5-B1
  710. NZ B5,PRS0 IF NOT END OF BUFFER
  711. GETGLS GLPW GET CURRENT GLOBAL LIBRARY SET
  712. SA1 ACTR READ ARGUMENT COUNT
  713. SB2 X1
  714. ZR B2,PRS14 IF NO ARGUMENTS
  715. SX6 B2
  716. SA6 ACNT STORE ARGUMENT COUNT
  717. SB5 ARGM MAXIMUM ARGUMENT COUNT
  718.  
  719. * LOOK FOR */A*, */D* OR */R*.
  720.  
  721. SX0 =C* ERROR IN LIBRARY ARGUMENTS.*
  722. SA1 ARGR-1 FIRST ARGUMENT MINUS ONE
  723. SB3 B0+
  724. MX3 -18
  725. PRS1 SB3 B3+B1 SCAN ARGUMENT LIST
  726. GT B3,B2,PRS2 IF ALL ARGUMENTS PROCESSED
  727. SA1 A1+B1 READ NEXT ARGUMENT
  728. BX6 X3*X1 CHECK FOR NULL ARGUMENT
  729. ZR X6,ABT IF NULL ARGUMENT
  730. BX2 -X3*X1
  731. ZR X2,PRS1 IF NOS SEPARATOR *,* *.* OR *)*
  732. SA6 A1+ STORE ARGUMENT WITHOUT SEPARATOR
  733. SX2 X2-1R/
  734. ZR X2,PRS1.1 IF NOS SEPARATOR */*
  735. SX2 X2+1R/-1
  736. ZR X2,PRS1 IF PRODUCT SET SEPARATOR *,*
  737. SX2 X2+1-17B
  738. ZR X2,PRS1 IF PRODUCT SET TERMINATOR *.* OR *)*
  739. SX2 X2+17B-3
  740. NZ X2,ABT IF NOT PRODUCT SET SEPARATOR */*
  741. PRS1.1 SB3 B3+B1 ARGUMENT FOLLOWING */* MUST BE LAST
  742. NE B3,B2,ABT IF NOT LAST ARGUMENT
  743. SA1 A1+B1 LAST ARGUMENT MUST BE *A*, *D* OR *R*
  744. SX7 B0+ ZERO OUT LAST ARGUMENT
  745. SA7 A1
  746. SX7 B2-B1 DECREMENT ARGUMENT COUNT
  747. SA7 ACNT
  748. BX7 X3*X1 SAVE OPERATION TYPE
  749. LX7 6
  750. SA7 OTYP
  751. SX6 X7-1RA ADD TO GLOBAL LIBRARY SET
  752. ZR X6,PRS3 IF ADD OPERATION
  753. SX6 X7-1RD DELETE FROM GLOBAL LIBRARY SET
  754. ZR X6,PRS6 IF DELETE OPERATION
  755. SX6 X7-1RR REPLACE GLOBAL LIBRARY SET (DEFAULT)
  756. NZ X6,ABT IF NOT REPLACE OPERATION
  757.  
  758. * REPLACE GLOBAL LIBRARY SET.
  759.  
  760. PRS2 SX0 PRSA * TOO MANY LIBRARY NAMES SPECIFIED.*
  761. SB3 B3-B1 (B3) = NUMBER OF ACTUAL ARGUMENTS
  762. GT B3,B5,ABT IF TOO MANY ARGUMENTS
  763. EQ PRS14 ISSUE GLOBAL LIBRARY SET
  764.  
  765. * ADD TO CURRENT GLOBAL LIBRARY SET.
  766.  
  767. PRS3 SA1 GLIB
  768. ZR X1,PRS2 IF CURRENT SET EMPTY
  769. SA1 GLPW SET ARGUMENT COUNT TO NUMBER OF LIBRARIES
  770. LX1 24
  771. BX6 -X3*X1
  772. SX6 X6-GLIB
  773. SA6 ACNT
  774. SA1 ARGR-1
  775. SX0 PRSA * TOO MANY LIBRARY NAMES SPECIFIED.*
  776. SA5 PRSB *SETGLS* PARAMETER WORD
  777. PRS4 SA1 A1+B1 READ NEXT ARGUMENT
  778. ZR X1,PRS13 IF END OF ARGUMENTS
  779. SA2 GLIB-1
  780. PRS5 SA2 A2+B1 CHECK NEXT ENTRY
  781. BX6 X3*X2 EXTRACT LIBRARY NAME
  782. BX4 X1-X6 CHECK FOR DUPLICATE ENTRY
  783. ZR X4,PRS4 IF DUPLICATE ENTRY
  784. NZ X6,PRS5 IF SLOT NOT EMPTY
  785. SB4 GLIB-1 CHECK NUMBER OF ARGUMENTS
  786. SB4 A2-B4 (B4) = ARGUMENT COUNT
  787. GT B4,B5,ABT IF TOO MANY ARGUMENTS
  788. SX6 B4 SAVE COUNT
  789. SA6 ACNT
  790. BX7 X1 STORE ARGUMENT IN LIST
  791. SA7 A2
  792. EQ PRS4 CHECK NEXT ARGUMENT
  793.  
  794. * DELETE FROM CURRENT LIBRARY SET.
  795.  
  796. PRS6 SA1 GLIB
  797. SA5 PRSB *SETGLS* PARAMETER WORD FOR DELETES
  798. NZ X1,PRS8 IF CURRENT SET NOT EMPTY
  799. PRS7 SB2 B0 PROCESS AS *LIBRARY.*
  800. SX6 B0 CLEAR ARGUMENT COUNT
  801. SA6 ACNT
  802. EQ PRS13 CLEAR GLOBAL SET
  803.  
  804. PRS8 SA1 GLIB-1
  805. SB3 GLIB
  806. PRS9 SA1 A1+B1 READ NEXT MEMBER OF CURRENT SET
  807. BX6 X3*X1 EXTRACT LIBRARY NAME
  808. ZR X6,PRS12 IF ALL CURRENT MEMBERS PROCESSED
  809. SA4 ARGR-1
  810. PRS10 SA4 A4+B1 READ NEXT LIBRARY TO DELETE
  811. ZR X4,PRS11 IF END OF ARGUMENTS
  812. BX1 X6-X4
  813. ZR X1,PRS9 IF CURRENT SET MEMBER = ARGUMENT
  814. EQ PRS10 CHECK MEMBER AGAINST NEXT ARGUMENT
  815.  
  816. PRS11 SA6 B3 SAVE CURRENT MEMBER
  817. SB3 B3+B1
  818. EQ PRS9 CHECK NEXT MEMBER
  819.  
  820. PRS12 SA6 B3
  821. SA1 GLIB CHECK FOR ALL CURRENT MEMBERS DELETED
  822. ZR X1,PRS7 IF ALL CURRENT MEMBERS DELETED
  823. PRS13 BX6 X5 REPLACE *SETGLS* PARAMETER WORD
  824. SA6 SLPW
  825. PRS14 SA1 SLPW SAVE TABLE ADDRESS
  826. LX1 24
  827. BX6 -X3*X1
  828. SA6 TADR
  829. RJ CNS CLEAR *NO-DROP* STATUS
  830. EQ PRSX RETURN
  831.  
  832.  
  833. PRSA DATA C* TOO MANY LIBRARY NAMES SPECIFIED.*
  834. PRSB VFD 6/0,18/GLIB,36/0 *SETGLS* PARAMETER FOR DELETES
  835. CNS SPACE 4,15
  836. ** CNS - CLEAR *NO-DROP* STATUS.
  837. *
  838. * *CNS* CLEARS THE *NO-DROP* STATUS SET ON CURRENT
  839. * MEMBERS OF THE GLOBAL LIBRARY SET WHICH ARE TO BE
  840. * DELETED IN THE NEW GLOBAL LIBRARY SET.
  841. *
  842. * EXIT *AUTO-DROP* STATUS SET ON ALL DELETED
  843. * GLOBAL LIBRARIES.
  844. *
  845. * USES A - 1, 5.
  846. * B - 2.
  847. * X - 1, 2, 5.
  848. *
  849. * MACROS SETFET, SETFS, STATUS.
  850.  
  851.  
  852. CNS SUBR ENTRY/EXIT
  853. SA1 ACNT CHECK NUMBER OF PARAMETERS
  854. SB2 X1
  855. ZR B2,CNS1 IF *LIBRARY.*
  856. SA1 OTYP CHECK OPTION TYPE
  857. SX2 X1-1RA
  858. ZR X2,CNSX IF *ADD* OPTION
  859. SX2 X1-1RR
  860. SA5 ARGR
  861. NZ X2,CNS2 IF NOT *REPLACE* OPTION
  862. CNS1 SA5 GLIB
  863. CNS2 SB2 B0+ INITIALIZE POINTER
  864. CNS3 SA1 A5+B2 CHECK NEXT LIBRARY
  865. ZR X1,CNSX IF NO OTHER LIBRARIES
  866. SETFET ULIB,LFN=X1 CHANGE LOCAL FILE NAME
  867. STATUS ULIB CHECK FOR FILE
  868. SA1 ULIB
  869. MX2 -11
  870. LX2 1
  871. BX1 -X2*X1
  872. ZR X1,CNS4 IF FILE DOES NOT EXIST
  873. SETFS ULIB,AD SET *AUTO-DROP* STATUS
  874. CNS4 SB2 B2+B1 INCREMENT POINTER
  875. EQ CNS3 CONTINUE UNTIL END OF LIBRARIES
  876.  
  877. ERRNG RFL=-* IF *PRS* BIGGER THAN REST OF PROGRAM
  878.  
  879.  
  880. END