IDENT LIBRARY,FETS
TITLE LIBRARY - DECLARE GLOBAL LIBRARY SET.
ABS
SST
ENTRY LIBRARY
ENTRY LIB=
ENTRY RFL=
ENTRY SSJ=
SYSCOM B1
BASE DECIMAL
*COMMENT LIBRARY - DECLARE GLOBAL LIBRARY SET.
COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
SPACE 4,10
***** LIBRARY - DECLARE GLOBAL LIBRARY SET.
*
* F. E. TERHAAR-YONKERS. 81/01/21.
*
* *LIBRARY* CHANGES THE GLOBAL LIBRARY INFORMATION IN
* THE CONTROL POINT AREA.
SPACE 4,10
*** *LIBRARY* CHANGES THE GLOBAL LIBRARY INFORMATION IN
* THE CONTROL POINT AREA. THE GLOBAL LIBRARY SET IS EITHER
* CLEARED OR SET TO A LIST OF FILES DEPENDING ON THE
* CONTROL STATEMENT FORMAT.
* THE LIBRARY NAMES ARE VALIDATED AND SEARCHED IN THE ORDER
* ON THE CONTROL STATEMENT. THE *ULIB* RECORD IN EACH
* LIBRARY IS SEARCHED FOR CONTROL CARD CALLABLE ENTRY POINTS
* (A *PROC* NAME, RELOCATABLE MAIN PROGRAM NAME, OR AN ENTRY
* POINT IN AN ABSOLUTE PROGRAM). FOR EACH ENTRY POINT FOUND,
* A FOUR WORD DIRECTORY ENTRY IS WRITTEN TO THE *ZZZZZLD* FILE.
*
* THE DIRECTORY FORMAT IS AS FOLLOWS.
*
*T 42/ ENTRY POINT NAME,12/ 0,6/ RT
*T, 24/ RANDOM ADDRESS,36/ 0
*T, 42/ LIBRARY NAME,18/ 0
*T, 12/ FL,11/ 0,1/N,12/ SEPF,6/ 0,18/ SSJB
*
* RT = RECORD TYPE.
* FL = REQUIRED FIELD LENGTH/100B.
* N = PARAMETER CRACKING FORMAT.
* SET IF *NPC=* ENTRY POINT DEFINED.
* SEPF = SPECIAL ENTRY POINT FLAGS
* (SEE BYTE 0 OF *SEPW* IN *PPCOM*).
* SSJB = *SSJ=* PARAMETER BLOCK ADDRESS.
*
* IF ONE OR MORE CONTROL CARD CALLABLE ENTRY POINTS ARE
* FOUND, THE GLOBAL LIBRARY BIT IS SET IN *LB1W* IN
* THE CONTROL POINT AREA.
SPACE 4,10
*** CONTROL STATEMENT FORMAT.
*
* FORMAT ACTION
*
* LIBRARY. CLEAR GLOBAL LIBRARY SET.
* LIBRARY(LIB1,...,LIBN) SET GLOBAL LIBRARY SET = LIB1,...,LIBN.
* LIBRARY(LIB1,...,LIBN/R) SET GLOBAL LIBRARY SET = LIB1,...,LIBN.
* LIBRARY(LIB1,...,LIBN/D) DELETE LIB1,...,LIBN FROM GLOBAL SET.
* LIBRARY(LIB1,...,LIBN/A) ADD LIB1,...,LIBN TO THE GLOBAL SET.
*
*
* NOTES:
*
* 1) TO BE ABLE TO DO CONTROL CARD CALLS FROM USER LIBRARIES
* THE LIBRARIES MUST BE LOCAL TO THE JOB WHEN *LIBRARY* IS
* RUN. THIS IS AN INCOMPATABILITY WITH THE SAME FEATURE ON
* NOS/BE.
*
* 2) IF THE USER SIMPLY WANTS TO SATISFY RELOCATABLE LOADS AND
* DOES NOT WISH TO INCUR THE ADDITIONAL OVERHEAD OF SEARCHING
* THE DIRECTORY FOR A VALID ENTRY POINT, *LIBRARY* SHOULD BE
* EXECUTED PRIOR TO THE GET/ATTACH OF THE USER LIBRARIES.
*
* 3) BIT 58 IN THE LOADER CONTROL WORD IS UTILIZED AS THE FLAG
* FOR THE GLOBAL LIBRARY PROCESS. THIS BIT WILL BE CHECKED
* BY *1AJ* BEFORE ANY DIRECTORY SEARCHES ARE MADE.
SPACE 4,10
*** DAYFILE MESSAGES.
*
*
* * ERROR IN LIBRARY ARGUMENTS.* = AN ILLEGAL ARGUMENT OR
* FORMAT WAS USED ON THE CONTROL STATEMENT. COMPARE
* THE CONTROL STATEMENT USED WITH THE DOCUMENTED
* FORMATS.
* THE GLOBAL LIBRARY SET CURRENTLY IN EFFECT REMAINS
* UNCHANGED.
*
* * TOO MANY LIBRARY NAMES SPECIFIED.* = THE NUMBER OF
* LIBRARIES EXCEEDS THE NUMBER THAT CAN BE STORED IN THE
* CONTROL POINT AREA. THE GLOBAL LIBRARY SET CURRENTLY
* IN EFFECT REMAINS UNCHANGED.
*
* * GLOBAL LIBRARY SET CLEARED.* = FORMAT 1 ( NO ARGUMENTS ) OF
* THE CONTROL STATEMENT WAS PROCESSED. ALL THE GLOBAL
* LIBRARY ENTRIES IN THE CONTROL POINT AREA AND THE
* GLOBAL LIBRARY BIT IN THE LOADER CONTROL WORD ARE
* CLEARED.
*
* * TOO MANY USER LIBRARIES SPECIFIED.* = THE NUMBER OF LIBRARY
* ARGUMENTS IS LESS THAN OR EQUAL TO THE MAXIMUM, BUT
* TOO MANY OF THOSE LIBRARIES ARE USER LIBRARIES
* (LIBRARIES NOT IN THE CENTRAL DIRECTORY). THE MAXIMUM
* NUMBER OF USER LIBRARIES IS 2 IF 4 OR LESS SYSTEM
* LIBRARIES ARE DECLARED, 1 IF 5 THRU 14 ARE SYSTEM
* LIBRARIES, AND 0 IF MORE THAN 14 ARE SYSTEM LIBRARIES.
* THE GLOBAL LIBRARY SET CURRENTLY IN EFFECT REMAINS
* UNCHANGED.
*
* * LIBRARY NOT FOUND, LNAME* = *LNAME* IS THE NAME OF A USER
* LIBRARY ( NOT KNOWN BY THE SYSTEM ) THAT WAS NOT LOCAL
* TO THE JOB WHEN *LIBRARY* WAS EXECUTED. NO DIRECTORY
* IS GENERATED FOR LIBRARY *LNAME*.
*
* * INCORRECTLY FORMATTED LIBRARY, LNAME* = A FILE *LNAME* WAS
* FOUND, BUT THE ULIB RECORD IS DEFECTIVE OR
* MISSING. THIS MESSAGE APPLIES TO BOTH SYSTEM AND USER
* LIBRARIES. NO DIRECTORY IS GENERATED FOR FILE
* *LNAME*.
*
* * ENTRY POINT TABLE OVERFLOW.* = THE NUMBER OF ENTRY POINTS
* PER PROGRAM UNIT HAS EXCEEDED THE TABLE SPACE
* ALLOTTED. REASSEMBLE THE PROGRAM WITH A LARGER VALUE
* FOR *LEPT*.
*
* * LIBRARY FILE ERROR(S) - SEE DAYFILE.* = ONE OR MORE OF THE
* SPECIFIED LIBRARY NAMES WERE NOT FOUND OR WERE NOT IN
* LIBRARY FORMAT. THE SPECIFIC ERROR CAN BE DETERMINED
* FROM PREVIOUS DAYFILE MESSAGES. THE JOB IS ABORTED.
* HOWEVER, THE DIRECTORY IS GENERATED FOR ALL LIBRARIES
* EXCEPT THE ONE(S) IN ERROR.
SPACE 4
TITLE CONSTANTS AND TABLES.
***** ASSEMBLY CONSTANTS.
SSJ= EQU 0
LIB= EQU 0
UBUFL EQU 201B LENGTH OF ULIB BUFFER
ZBUFL EQU 201B LENGTH OF ZZZZZLD BUFFER
LEPT EQU 1000D LENGTH OF ENTRY POINT TABLE
ARGM EQU 24D MAXIMUM NUMBER OF ARGUMENTS
MAXL EQU 24D MAXIMUM NUMBER OF LIBRARIES
*** COMMON DECKS.
SPACE 4
*CALL COMCCMD
*CALL COMCMAC
*CALL COMSLFD
SPACE 4
ORG 111B
* FETS.
FETS BSS 0
ULIB FILEB ULBF,UBUFL,(FET=8)
ZZZZZLD FILEB ZZBF,ZBUFL,(FET=8)
SPACE 4,10
* RESERVED LOCATIONS.
LDCW CON 0 LOADER CONTROL WORD
EFLG CON 0 ENTRY POINT FLAG
ZCNT CON 0 COUNT OF LIBRARY DIRECTORIES BUILT
TADR CON 0 *SETGLS* TABLE ADDRESS
ACNT CON 0 ARGUMENT COUNT
OTYP CON 1RR OPERATION TYPE(ADD, DELETE OR REPLACE)
PEPT CON 0 ENTRY POINT BEING PROCESSED
PRFX DATA 77000016BS36 FIRST WORD OF ULIB PREFIX TABLE
UPFX BSS 17B ULIB PREFIX TABLE
UHDR CON 0 ULIB HEADER WORD
TEPTP BSS 1 *TEPT* POINTER
PTYP CON 0 PROGRAM TYPE
SEPF CON 0 SPECIAL ENTRY POINTS
LFEC CON 0 LIBRARY FILE ERROR COUNT
* NOTE: THE FOLLOWING 4 LOCATIONS MAKE UP THE
* WORKING BUFFER FOR THE *ZZZZZLD* FILE.
WBUF BSS 1 WORKING BUFFER
PRAN CON 0 PROGRAM RANDOM ADDRESS
CLIB CON 0 LIBRARY NAME BEING PROCESSED
RFL CON 0 PROGRAM FIELD LENGTH/100B
** ADDRESS OF *TLIB* ENTRY BEING PROCESSED.
ALIB VFD 42/0,18/TLIB
SPACE 4,10
** *SETGLS* PARAMETER WORD.
SLPW VFD 6/0,18/ARGR,36/0
SPACE 4,10
** *GETGLS* PARAMETER WORD.
GLPW VFD 6/0,18/GLIB,36/0
SPACE 4,10
** GLOBAL LIBRARY BIT MASK FOR LOADER CONTROL WORD.
GFLG VFD 1/0,1/1,58/0
SPACE 4,10
TITLE MAIN PROGRAM.
** LIBRARY.
*
* MAIN ROUTINE.
LIBRARY SB1 1
RJ PRS PRESET
RETURN ZZZZZLD RETURN OLD DIRECTORY FILE
SA2 ACNT READ ARGUMENT COUNT
SB2 X2
ZR B2,LIB4 IF NO ARGUMENTS
SA1 TADR POINTER TO *SETGLS* TABLE
SX6 X1
SA6 ALIB
LIB1 SA1 ALIB POINTER TO *SETGLS* TABLE
SX6 X1+B1
SA1 X1 READ NEXT ENTRY
ZR X1,LIB2 IF NO MORE ENTRIES
SA6 ALIB STORE NEW ADDRESS
MX0 42
BX6 X0*X1 STORE CURRENT LIBRARY NAME
SA6 CLIB
RJ CLL CHECK FOR LOCAL LIBRARY
EQ LIB1 CHECK NEXT LIBRARY
* ISSUE LIBRARIES PROCESSED MESSAGE AND SET/CLEAR
* GLOBAL LIBRARY FLAG IN CONTROL POINT AREA.
LIB2 SETGLS SLPW ISSUE GLOBAL LIBRARY SET
GETLC LDCW GET LOADER CONTROL WORD
SA1 TADR
SA1 X1
ZR X1,LIB4 IF NO LIBRARIES LEFT
SA1 OTYP CHECK OPTION TYPE
SX1 X1-1RD
ZR X1,LIB3 IF OPERATION IS DELETE
* CHECK TO SEE IF THERE WERE NO ERRORS IN
* THE GLOBAL LIBRARY SET JUST ISSUED.
SA2 TADR READ TABLE ADDRESS
SB3 X2
SA1 ACNT READ ARGUMENT COUNT
SB2 X1
SB2 B2+B3
SA1 SLPW READ *SETGLS* PARAMETER WORD
LX1 24
SB3 X1
EQ B2,B3,LIB3 IF NO ERRORS INDICATED
SA1 LFEC
NZ X1,LIB3 IF LIBRARY FILE ERRORS OCCURRED
MX6 -1 INDICATE TOO MANY LIBRARIES
SA6 A1
LIB3 SA2 EFLG READ ENTRY POINT FLAG
NZ X2,LIB5 IF CROSS REFERENCE GENERATED
LIB4 RJ CGL CLEAR GLOBAL LIBRARY BIT
SA1 ACNT
NZ X1,LIB6 IF NOT CLEAR OF ALL EXISTING LIBRARIES
SX0 LIBA * GLOBAL LIBRARY SET CLEARED.*
MESSAGE X0,3 ISSUE TERMINATION MESSAGE
EQ LIB6 END PROCESSING
* SET GLOBAL LIBRARY FLAG.
LIB5 SA1 GFLG GET GLOBAL LIBRARY FLAG
SA2 LDCW READ LOADER CONTROL WORD
BX6 X1+X2 SET FLAG
SA6 A2
SETLC LDCW RESET LOADER CONTROL WORD
WRITER ZZZZZLD,R FLUSH BUFFER
SETFS ZZZZZLD,NDST SET FILE STATUS
* EQ LIB6 END PROCESSING
* TERMINATE PROGRAM.
LIB6 SA1 LFEC CHECK FOR LIBRARY FILE ERRORS
SX0 LIBC * TOO MANY USER LIBRARIES SPECIFED *
NG X1,ABT IF TOO MANY LIBRARIES
SX0 LIBB * LIBRARY FILE ERROR(S) - SEE DAYFILE.*
NZ X1,ABT IF LIBRARY FILE ERRORS OCCURRED
ENDRUN
LIBA DATA C* GLOBAL LIBRARY SET CLEARED.*
LIBB DATA C* LIBRARY FILE ERROR(S) - SEE DAYFILE.*
LIBC DATA C* TOO MANY USER LIBRARIES SPECIFIED.*
CLL TITLE SUBROUTINES.
** CLL - CHECK FOR LOCAL LIBRARY.
*
* *CLL* CHECKS FOR THE EXISTENCE OF A LOCAL LIBRARY
* FILE. IF FILE IS NOT LOCAL AND IS NOT IN THE SYSTEM LIBRARY
* DIRECTORY, A DIAGNOSTIC IS ISSUED. IF THE FILE IS LOCAL,
* THEN THE PREFIX TABLE IS CHECKED TO ENSURE THE FILE
* IS ACTUALLY A LIBRARY.
*
* ENTRY (X6) = (CLIB) = LIBRARY NAME.
* (ALIB) = POINTER TO NEXT ENTRY IN *SETGLS* TABLE.
*
* EXIT ALL PROCESSING COMPLETE FOR THIS LIBRARY.
*
* USES X - 0, 1, 2, 3, 6.
* A - 1, 2, 6.
* B - 2, 5.
*
* CALLS PLE, SNM.
*
* MACROS MESSAGE, READ, READW, REWIND, SETFET, SETFS, STATUS,
* SYSTEM.
CLL SUBR ENTRY/EXIT
SETFET ULIB,LFN=X6 STORE LIBRARY NAME IN FET
STATUS ULIB CHECK FOR FILE
SA1 ULIB
MX2 -11
LX2 1
BX1 -X2*X1
ZR X1,CLL2 IF FILE DOES NOT EXIST
REWIND ULIB,R POSITION AT BOI
READ ULIB,R INITIATE READ OPERATIONS
SA1 ULIB+2 READ *IN*
SA2 A1+B1 READ *OUT*
IX1 X1-X2
ZR X1,CLL2 IF NO DATA TRANSFERRED
READW ULIB,UPFX,17B READ PREFIX TABLE
NZ X1,CLL3 IF TRANSFER INCOMPLETE
SA1 UPFX READ FIRST WORD OF PREFIX TABLE
SA2 PRFX FIRST WORD OF A LEGAL ULIB PREFIX TABLE
BX1 X1-X2
NZ X1,CLL3 IF NOT A USER LIBRARY PREFIX TABLE
* VALID PREFIX TABLE FOUND, NOW CHECK FOR ULIB TABLE.
READW ULIB,UHDR,1 READ ULIB HEADER WORD
NZ X1,CLL3 IF TRANSFER INCOMPLETE
SA1 UHDR CHECK FOR ULIB TABLE ID
MX0 12
BX2 X0*X1
LX2 12
SX3 X2-7600B
NZ X3,CLL3 IF NOT A ULIB TABLE
LX1 12 POSITION GROUP NAME COUNT FIELD
BX2 X1*X0 STRIP OFF GROUP NAME COUNT
LX2 12
ZR X2,CLL1 IF NO GROUP NAMES
READW ULIB,TEPT,X2 SKIP GROUP NAMES
NZ X1,CLL3 IF TRANSFER INCOMPLETE
CLL1 RJ PLE PROCESS LIBRARY ENTRY POINT
SETFS ULIB,NDST SET *NDST* STATUS ON LIBRARY
EQ CLLX RETURN
* ISSUE LIBRARY NOT FOUND MESSAGE, IF NOT IN SYSTEM LIBRARY
* DIRECTORY.
CLL2 SYSTEM CPM,R,CLIB,142B*100B GET SYSTEM LIBRARY STATUS
SA1 CLIB CHECK IF LIBRARY IN SYSTEM DIRECTORY
MX2 -1
BX1 -X2*X1
NZ X1,CLLX IF SYSTEM LIBRARY
SB5 CLLB SET FWA OF SEARCH
SX0 CLLA SET FWA OF MESSAGE
EQ CLL4 SET UP DAYFILE MESSAGE
CLL3 SB5 CLLD SET FWA OF SEARCH
SX0 CLLC SET FWA OF MESSAGE
CLL4 SA1 CLIB SET LIBRARY NAME TO BE ADDED TO MESSAGE
SB2 1RX SET SEARCH CHARACTER
RJ SNM SET NAME INTO MESSAGE
MESSAGE X0,3 ISSUE MESSAGE
SA1 LFEC INCREMENT LIBRARY FILE ERROR COUNT
SX6 X1+B1
SA6 A1
SA1 ALIB POINTER TO NEXT ENTRY
SX6 X1-1
SA6 A1
CLL5 SA2 X1 MOVE REMAINING ENTRIES DOWN ONE
BX6 X2
SA6 A2-B1
SX1 X1+B1
NZ X2,CLL5 IF MORE TO MOVE
EQ CLLX RETURN
CLLA DATA 10H LIBRARY N
DATA 10HOT FOUND,
CLLB DATA 8LXXXXXXX.
CLLC DATA 10H INCORRECT
DATA 10HLY FORMATT
DATA 10HED LIBRARY
CLLD DATA 10H, XXXXXXX.
DATA 0
PLE SPACE 4,10
** PLE - PROCESS LIBRARY ENTRY POINTS.
*
* *PLE* PROCESSES THE ENTRY POINT LIST IN THE ULIB
* RECORD UNTIL THE RANDOM ADDRESS WORD IS FOUND.
* THEN CALLS *WEP* TO WRITE THE ENTRY POINTS OF
* THE PROGRAM TO THE *ZZZZZLD* DIRECTORY FILE.
*
* ENTRY *ULIB* RECORD POSITIONED BEFORE FIRST ENTRY POINT.
*
* EXIT ALL ENTRY POINTS FOR THIS *ULIB* RECORD PROCESSED.
*
* USES A - 1, 6, 7.
* X - 0, 1, 6, 7.
* B - 2, 3.
*
* CALLS CEN, WEP.
*
* MACROS READW.
PLE SUBR ENTRY/EXIT
BX6 X6-X6 CLEAR FIELD LENGTH ENTRY
SA6 RFL
SB2 B0 CLEAR ENTRY POINT COUNTER
* READ ENTRY POINTS UNTIL RANDOM ADDRESS FOUND.
PLE1 READW ULIB,PEPT,1 READ POSSIBLE ENTRY POINT
NZ X1,PLEX IF END OF RECORD ENCOUNTERED
SA1 PEPT
NG X1,PLE3 IF PROGRAM RANDOM ADDRESS POINTER
* CHECK TO SEE IF THE ENTRY POINT CAN BE CONTROL
* CARD CALLED (NO SPECIAL SYMBOLS).
PLE2 RJ CEN CHECK ENTRY POINT NAME
NZ X5,PLE1 IF NOT CONTROL CARD CALLABLE
SX0 PLEA TABLE OVERFLOW MESSAGE
SB3 LEPT ENTRY POINT TABLE SIZE
SA6 TEPT+B2 STORE ENTRY POINT IN TABLE
SB2 B2+B1 INCREMENT ENTRY POINT COUNT
EQ B2,B3,ABT IF *TEPT* TABLE OVERFLOWED
EQ PLE1 CHECK NEXT WORD IN ULIB RECORD
* IF SOME CONTROL CARD CALLABLE ENTRY POINTS WERE
* FOUND, CHECK THE PROGRAM TYPE FIELD. IF THE FIELD
* IS ZERO THEN THE RECORD CANNOT BE CONTROL CARD CALLED.
PLE3 EQ B0,B2,PLE4 IF NO ENTRY POINTS FOUND
MX0 -24
BX7 -X0*X1 EXTRACT RANDOM ADDRESS
LX7 36
MX0 54
LX1 30 EXTRACT RECORD TYPE
BX6 -X0*X1
ZR X6,PLE4 IF NOT CONTROL CARD CALLABLE
SA6 PTYP STORE PROGRAM TYPE
SA6 EFLG SET DIRECTORY ENTRIES FLAG
BX6 X6-X6
SA6 TEPT+B2 TERMINATE ENTRY POINT LIST WITH ZERO WORD
SA7 PRAN STORE PROGRAM RANDOM ADDRESS
RJ WEP WRITE ENTRY POINT DIRECTORY
SX6 B0+ CLEAR SPECIAL ENTRY POINTS
SA6 SEPF
* SKIP CROSS REFERENCE ENTRIES UNTIL ANOTHER POSSIBLE
* ENTRY POINT IS FOUND.
PLE4 SB2 B0 CLEAR ENTRY POINT COUNT
PLE5 READW ULIB,PEPT,1 READ POSSIBLE ENTRY POINT
NZ X1,PLEX IF END OF RECORD ENCOUNTERED
SA1 PEPT
NG X1,PLE5 IF NOT AN ENTRY POINT
BX6 X6-X6 CLEAR FIELD LENGTH
SA6 RFL
EQ PLE2 PROCESS ENTRY POINT NAME
PLEA DATA C* ENTRY POINT TABLE OVERFLOW.*
CEN SPACE 4,10
** CEN - CHECK ENTRY POINT NAME.
*
* *CEN* CHECKS FOR VALID CONTROL CARD CALLABLE NAMES.
* IF A SPECIAL ENTRY POINT IS FOUND, THE APPROPRIATE BIT
* IS SET IN THE DIRECTORY AND THE *SPECIAL ENTRY POINTS
* PRESENT* FLAG IS SET. IF AN *NPC=* ENTRY POINT IS
* FOUND, THE NOS-CRACKING BIT IS SET IN THE DIRECTORY.
* IF AN *RFL=* ENTRY POINT IS FOUND, THE FIELD LENGTH IS
* EXTRACTED AND STORED IN WORD 4 OF THE DIRECTORY ENTRY.
* IF AN *SSJ=* ENTRY POINT IS FOUND, THE PARAMETER BLOCK
* ADDRESS IS EXTRACTED AND STORED IN WORD 4 OF THE
* DIRECTORY ENTRY.
*
* ENTRY (X1) = NAME TO BE CHECKED.
*
* EXIT (X5) = ZERO IF NAME IS CONTROL CARD CALLABLE.
* (X6) = NAME, IF NOT SPECIAL ENTRY POINT.
*
* USES A - 2, 5, 6.
* X - 0, 1, 2, 5, 6.
* B - 5, 6.
CEN SUBR ENTRY/EXIT
* CHECK FOR SPECIAL ENTRY POINT.
MX0 24
SA5 CENA-1 SET TABLE ADDRESS
CEN1 SA5 A5+B1
ZR X5,CEN5 IF END OF SPECIAL ENTRY POINT TABLE
BX6 X5-X1 COMPARE ENTRY POINT NAMES
BX6 X6*X0
NZ X6,CEN1 IF NO MATCH
MX0 -12 ADD IN NEW SPECIAL ENTRY POINT FLAG
BX6 -X0*X5
LX6 24
SA2 SEPF
BX6 X2+X6
SA6 A2
AX5 12 EXTRACT SPECIAL HANDLING ROUTINE ADDRESS
SB6 X5
SX5 B1 SET NOT COMMAND CALLABLE
ZR B6,CENX IF NO SPECIAL HANDLING ROUTINE
JP B6 PERFORM SPECIAL HANDLING
* PROCESS *RFL=* SPECIAL ENTRY POINT.
CEN2 MX0 12 EXTRACT FIELD LENGTH
LX1 30
BX6 X0*X1
SA5 RFL
BX5 -X0*X5
BX6 X6+X5
SA6 RFL STORE FIELD LENGTH
SX5 B1
EQ CENX EXIT
* PROCESS *NPC=* SPECIAL ENTRY POINT.
CEN3 SA2 RFL SET NOS CRACKING BIT IN DIRECTORY
SX6 B1
LX6 36
BX6 X2+X6
SA6 A2
EQ CENX RETURN
* PROCESS *SSJ=* SPECIAL ENTRY POINT.
CEN4 MX0 -18 GET PARAMETER BLOCK ADDRESS
LX1 42
BX1 -X0*X1
BX6 X1+X6 STORE PARAMETER BLOCK ADDRESS
SA6 A6
EQ CENX RETURN
* CHECK FOR NORMAL ENTRY POINT.
CEN5 MX0 -6
BX6 X1 SAVE NAME IN X6
SB5 B0+
SB6 8
CEN6 LX1 6
BX5 -X0*X1
ZR X5,CENX IF END OF NAME FOUND
SX2 X5-1R+
PL X2,CENX IF INVALID CHARACTER
SB5 B5+B1 INCREMENT CHARACTER COUNT
EQ B5,B6,CENX IF EIGHT CHARACTERS CHECKED
EQ CEN6 CHECK NEXT CHARACTER
** SPECIAL ENTRY POINT TABLE.
*T 24/ EPTNAME,6/ 0,18/ PADDR,12/ EPTFLAG
* EPTNAME = ENTRY POINT NAME.
* PADDR = PROCESSOR ADDRESS.
* EPTFLAG = SPECIAL ENTRY POINT FLAG (TO PLACE IN DIRECTORY).
CENA BSS 0
VFD 24/0LARG=,6/,18/,12/4040B
VFD 24/0LCLB=,6/,18/,12/4100B
VFD 24/0LDMP=,6/,18/,12/4020B
VFD 24/0LLDR=,6/,18/,12/4200B
VFD 24/0LLIB=,6/,18/,12/4200B
VFD 24/0LNPC=,6/,18/CEN3,12/0
VFD 24/0LRFL=,6/,18/CEN2,12/0
VFD 24/0LSDM=,6/,18/,12/4010B
VFD 24/0LSSJ=,6/,18/CEN4,12/4004B
VFD 24/0LSSM=,6/,18/,12/4001B
VFD 24/0LVAL=,6/,18/,12/4002B
CON 0 END OF TABLE
WEP SPACE 4,25
** WEP - WRITE ENTRY POINT TABLE.
*
* *WEP* WRITES THE CONTENTS OF THE ENTRY POINT TABLE *TEPT*,
* TO THE *ZZZZZLD* CROSS REFERENCE FILE.
*
* ENTRY ENTRY POINT TABLE SET UP.
*
* EXIT CONTENTS OF *TEPT* WRITTEN TO THE OUTPUT BUFFER.
*
* USES A - 1, 2, 3, 6, 7.
* X - 1, 2, 3, 6, 7.
*
* MACROS WRITEW.
WEP SUBR ENTRY/EXIT
SX6 TEPT
SA6 TEPTP INITIALIZE *TEPT* POINTER
WEP1 SA1 TEPTP READ *TEPT* POINTER
SA2 X1 READ NEXT ENTRY POINT IN TABLE
ZR X2,WEPX IF NO MORE ENTRY POINTS TO PROCESS
SX7 X1+B1 INCREMENT *TEPT* POINTER
SA7 TEPTP
SA3 PTYP READ RECORD TYPE
BX6 X3+X2 COMBINE ENTRY NAME WITH RECORD TYPE
SA6 WBUF STORE IN WORKING BUFFER
SA2 RFL COMBINE RFL AND SPECIAL ENTRY POINT FLAGS
SA3 SEPF
BX7 X2+X3
SA7 A2
WRITEW ZZZZZLD,WBUF,4
EQ WEP1 CHECK NEXT *TEPT* ENTRY
CGL SPACE 4,15
** CGL - CLEAR GLOBAL LIBRARY BIT.
*
* *CGL* CLEARS THE GLOBAL LIBRARY BIT IN THE LOADER
* CONTROL WORD. THIS INDICATES THAT THERE
* ARE EITHER NO USER LIBRARIES TO PROCESS, OR THERE
* ARE NO CONTROL CARD CALLABLE ENTRIES IN THE GLOBAL
* LIBRARY SET.
*
* EXIT GLOBAL BIT IN LOADER CONTROL WORD CLEARED.
*
* USES A - 1, 2, 6.
* X - 1, 2, 6.
*
* MACROS SETLC.
CGL SUBR ENTRY/EXIT
SA1 GFLG READ GLOBAL CONTROL FLAG
SA2 LDCW READ LOADER CONTROL WORD
BX6 -X1*X2 CLEAR GLOBAL FLAG
SA6 LDCW
SETLC LDCW RESET LOADER CONTROL WORD
EQ CGLX RETURN
ABT SPACE 4,10
** ABT - ISSUE MESSAGE AND ABORT.
*
* ENTRY (X0) = MESSAGE ADDRESS.
*
* MACROS ABORT, MESSAGE.
ABT BSS 0 ENTRY
MESSAGE X0,3
ABORT ABORT CONTROL POINT
SPACE 4,10
* COMMON DECKS.
*CALL COMCCIO
*CALL COMCCPM
*CALL COMCLFM
*CALL COMCRDW
*CALL COMCSNM
*CALL COMCSYS
*CALL COMCWTW
BUFFERS SPACE 4,10
* BUFFERS.
ULBF EQU *+1 *ULIB* BUFFER
ZZBF EQU ULBF+UBUFL *ZZZZZLD* BUFFER
TEPT EQU ZZBF+ZBUFL ENTRY POINT TABLE
TLIB EQU TEPT+LEPT LIBRARY NAME TABLE
GLIB EQU TLIB+MAXL *GETGLS* TABLE
RFL= EQU GLIB+MAXL
PRS TITLE PRESET ROUTINE.
** PRS - PRESET.
*
* *PRS* DETERMINES THE FORMAT OF THE CONTROL
* STATEMENT AND CHECKS FOR THE PRESENCE OF INVALID
* SEPARATORS.
* THE GLOBAL LIBRARY SET IS CLEARED, THE GLOBAL
* FLAG IN THE LOADER CONTROL WORD IS CLEARED AND
* THE *1AJ* GLOBAL LIBRARY DIRECTORY IS RETURNED
* IF THE *LIBRARY* STATEMENT CONTAINS NO PARAMETERS
* (*LIBRARY.*).
*
* EXIT (X0) = ERROR MESSAGE.
* TO *ABT* IF ARGUMENT ERROR.
*
* USES A - 1, 2, 4, 5, 6, 7.
* X - 0, 1, 2, 3, 4, 5, 6, 7.
* B - 2, 3, 4, 5.
*
* CALLS CGL, CNS.
*
* MACROS GETGLS, GETLC, RETURN, SETGLS.
PRS SUBR ENTRY/EXIT
BX7 X7-X7 CLEAR *TLIB* AND *GLIB* BUFFERS
SA7 TLIB STARTING ADDRESS
SB5 MAXL+MAXL-1 CLEAR BOTH BUFFERS
ERRNZ GLIB-TLIB-MAXL CODE ASSUMES CONTIGUOUS BUFFERS
PRS0 SA7 A7+B1
SB5 B5-B1
NZ B5,PRS0 IF NOT END OF BUFFER
GETGLS GLPW GET CURRENT GLOBAL LIBRARY SET
SA1 ACTR READ ARGUMENT COUNT
SB2 X1
ZR B2,PRS14 IF NO ARGUMENTS
SX6 B2
SA6 ACNT STORE ARGUMENT COUNT
SB5 ARGM MAXIMUM ARGUMENT COUNT
* LOOK FOR */A*, */D* OR */R*.
SX0 =C* ERROR IN LIBRARY ARGUMENTS.*
SA1 ARGR-1 FIRST ARGUMENT MINUS ONE
SB3 B0+
MX3 -18
PRS1 SB3 B3+B1 SCAN ARGUMENT LIST
GT B3,B2,PRS2 IF ALL ARGUMENTS PROCESSED
SA1 A1+B1 READ NEXT ARGUMENT
BX6 X3*X1 CHECK FOR NULL ARGUMENT
ZR X6,ABT IF NULL ARGUMENT
BX2 -X3*X1
ZR X2,PRS1 IF NOS SEPARATOR *,* *.* OR *)*
SA6 A1+ STORE ARGUMENT WITHOUT SEPARATOR
SX2 X2-1R/
ZR X2,PRS1.1 IF NOS SEPARATOR */*
SX2 X2+1R/-1
ZR X2,PRS1 IF PRODUCT SET SEPARATOR *,*
SX2 X2+1-17B
ZR X2,PRS1 IF PRODUCT SET TERMINATOR *.* OR *)*
SX2 X2+17B-3
NZ X2,ABT IF NOT PRODUCT SET SEPARATOR */*
PRS1.1 SB3 B3+B1 ARGUMENT FOLLOWING */* MUST BE LAST
NE B3,B2,ABT IF NOT LAST ARGUMENT
SA1 A1+B1 LAST ARGUMENT MUST BE *A*, *D* OR *R*
SX7 B0+ ZERO OUT LAST ARGUMENT
SA7 A1
SX7 B2-B1 DECREMENT ARGUMENT COUNT
SA7 ACNT
BX7 X3*X1 SAVE OPERATION TYPE
LX7 6
SA7 OTYP
SX6 X7-1RA ADD TO GLOBAL LIBRARY SET
ZR X6,PRS3 IF ADD OPERATION
SX6 X7-1RD DELETE FROM GLOBAL LIBRARY SET
ZR X6,PRS6 IF DELETE OPERATION
SX6 X7-1RR REPLACE GLOBAL LIBRARY SET (DEFAULT)
NZ X6,ABT IF NOT REPLACE OPERATION
* REPLACE GLOBAL LIBRARY SET.
PRS2 SX0 PRSA * TOO MANY LIBRARY NAMES SPECIFIED.*
SB3 B3-B1 (B3) = NUMBER OF ACTUAL ARGUMENTS
GT B3,B5,ABT IF TOO MANY ARGUMENTS
EQ PRS14 ISSUE GLOBAL LIBRARY SET
* ADD TO CURRENT GLOBAL LIBRARY SET.
PRS3 SA1 GLIB
ZR X1,PRS2 IF CURRENT SET EMPTY
SA1 GLPW SET ARGUMENT COUNT TO NUMBER OF LIBRARIES
LX1 24
BX6 -X3*X1
SX6 X6-GLIB
SA6 ACNT
SA1 ARGR-1
SX0 PRSA * TOO MANY LIBRARY NAMES SPECIFIED.*
SA5 PRSB *SETGLS* PARAMETER WORD
PRS4 SA1 A1+B1 READ NEXT ARGUMENT
ZR X1,PRS13 IF END OF ARGUMENTS
SA2 GLIB-1
PRS5 SA2 A2+B1 CHECK NEXT ENTRY
BX6 X3*X2 EXTRACT LIBRARY NAME
BX4 X1-X6 CHECK FOR DUPLICATE ENTRY
ZR X4,PRS4 IF DUPLICATE ENTRY
NZ X6,PRS5 IF SLOT NOT EMPTY
SB4 GLIB-1 CHECK NUMBER OF ARGUMENTS
SB4 A2-B4 (B4) = ARGUMENT COUNT
GT B4,B5,ABT IF TOO MANY ARGUMENTS
SX6 B4 SAVE COUNT
SA6 ACNT
BX7 X1 STORE ARGUMENT IN LIST
SA7 A2
EQ PRS4 CHECK NEXT ARGUMENT
* DELETE FROM CURRENT LIBRARY SET.
PRS6 SA1 GLIB
SA5 PRSB *SETGLS* PARAMETER WORD FOR DELETES
NZ X1,PRS8 IF CURRENT SET NOT EMPTY
PRS7 SB2 B0 PROCESS AS *LIBRARY.*
SX6 B0 CLEAR ARGUMENT COUNT
SA6 ACNT
EQ PRS13 CLEAR GLOBAL SET
PRS8 SA1 GLIB-1
SB3 GLIB
PRS9 SA1 A1+B1 READ NEXT MEMBER OF CURRENT SET
BX6 X3*X1 EXTRACT LIBRARY NAME
ZR X6,PRS12 IF ALL CURRENT MEMBERS PROCESSED
SA4 ARGR-1
PRS10 SA4 A4+B1 READ NEXT LIBRARY TO DELETE
ZR X4,PRS11 IF END OF ARGUMENTS
BX1 X6-X4
ZR X1,PRS9 IF CURRENT SET MEMBER = ARGUMENT
EQ PRS10 CHECK MEMBER AGAINST NEXT ARGUMENT
PRS11 SA6 B3 SAVE CURRENT MEMBER
SB3 B3+B1
EQ PRS9 CHECK NEXT MEMBER
PRS12 SA6 B3
SA1 GLIB CHECK FOR ALL CURRENT MEMBERS DELETED
ZR X1,PRS7 IF ALL CURRENT MEMBERS DELETED
PRS13 BX6 X5 REPLACE *SETGLS* PARAMETER WORD
SA6 SLPW
PRS14 SA1 SLPW SAVE TABLE ADDRESS
LX1 24
BX6 -X3*X1
SA6 TADR
RJ CNS CLEAR *NO-DROP* STATUS
EQ PRSX RETURN
PRSA DATA C* TOO MANY LIBRARY NAMES SPECIFIED.*
PRSB VFD 6/0,18/GLIB,36/0 *SETGLS* PARAMETER FOR DELETES
CNS SPACE 4,15
** CNS - CLEAR *NO-DROP* STATUS.
*
* *CNS* CLEARS THE *NO-DROP* STATUS SET ON CURRENT
* MEMBERS OF THE GLOBAL LIBRARY SET WHICH ARE TO BE
* DELETED IN THE NEW GLOBAL LIBRARY SET.
*
* EXIT *AUTO-DROP* STATUS SET ON ALL DELETED
* GLOBAL LIBRARIES.
*
* USES A - 1, 5.
* B - 2.
* X - 1, 2, 5.
*
* MACROS SETFET, SETFS, STATUS.
CNS SUBR ENTRY/EXIT
SA1 ACNT CHECK NUMBER OF PARAMETERS
SB2 X1
ZR B2,CNS1 IF *LIBRARY.*
SA1 OTYP CHECK OPTION TYPE
SX2 X1-1RA
ZR X2,CNSX IF *ADD* OPTION
SX2 X1-1RR
SA5 ARGR
NZ X2,CNS2 IF NOT *REPLACE* OPTION
CNS1 SA5 GLIB
CNS2 SB2 B0+ INITIALIZE POINTER
CNS3 SA1 A5+B2 CHECK NEXT LIBRARY
ZR X1,CNSX IF NO OTHER LIBRARIES
SETFET ULIB,LFN=X1 CHANGE LOCAL FILE NAME
STATUS ULIB CHECK FOR FILE
SA1 ULIB
MX2 -11
LX2 1
BX1 -X2*X1
ZR X1,CNS4 IF FILE DOES NOT EXIST
SETFS ULIB,AD SET *AUTO-DROP* STATUS
CNS4 SB2 B2+B1 INCREMENT POINTER
EQ CNS3 CONTINUE UNTIL END OF LIBRARIES
ERRNG RFL=-* IF *PRS* BIGGER THAN REST OF PROGRAM
END