LOA TITLE 'DMSLOA (CMS) VM/370 - RELEASE 6' 00001000 SPACE 2 00002000 *. 00003000 * 00004000 * 00005000 * MODULE NAME: 00006000 * 00007000 * DMSLOA 00008000 * 00009000 * FUNCTION: 00010000 * 00011000 * LOAD AND INCLUDE COMMANDS TO INVOKE THE RELOCATING LOADER. 00012000 * 00013000 * ATTRIBUTES: 00014000 * 00015000 * REENTRANT, NUCLEUS RESIDENT 00016000 * 00017000 * ENTRY POINTS: 00018000 * 00019000 * DMSLOA 00020000 * 00021000 * ENTRY CONDITION: 00022000 * 00023000 * GPR1 = ADDRESS OF PLIST 00024000 * 00025000 * PLIST DS 0F 00026000 * DC CL8'LOAD'|'INCLUDE' 00027000 * DC CL8'FNAME1' 00028000 * . 00029000 * . 00030000 * . 00031000 * DC CL8'FNAMEN' 00032000 * 00033000 * *OPTIONS: 00034000 * DC CL8'(' 00035000 * CL8'START' 00036000 * CL8'RESET', CL8'ENTRY'|'*' ('*', INCLUDE ONLY) 00037000 * CL8'CLEAR'|'NOCLEAR' 00038000 * CL8'SAME' (INCLUDE ONLY) 00039000 * CL8'TYPE'|'NOTYPE' 00040000 * CL8'MAP|'NOMAP' 00041000 * CL8'LIBE|'NOLIBE' 00042000 * CL8'NOINV'|'INV' 00043000 * CL8'NOREP'|'REP' 00044000 * CL8'NOAUTO'|'AUTO' 00045000 * CL8'ORIGIN', CL8'ADDRESS OR TRANS' 00046000 * (TRANS ON LOAD ONLY) 00047000 * 00048000 * EXIT CONDITIONS 00049000 * 00050000 * NORMAL - RETURN TO CALLER, R15=0. 00051000 * PROGRAM IS LOADED INTO USER STORAGE 00052000 * 00053000 * ERROR - RETURN TO CALLER 00054000 * R15=ERROR CODE (SEE BELOW) 00055000 * 00056000 * ALL ERROR MESSAGES AND RETURN CODES ARE GENERATED BY 00057000 * THE LOADER (DMSLDR), BUT ARE PRESENTED HERE AS PART OF 00058000 * THE LOAD AND INCLUDE COMMANDS: 00059000 * 00060000 * | GPR15 = : 00061000 * | 28 FILE NOT FOUND 00062000 * | 24 OPTION ERROR 00063000 * | 4 UNRESOLVED REFERENCES 00064000 * | 104 REFERENCE TABLE OVERFLOW 00065000 * | 4 SLC NAME UNDEFINED 00066000 * | 4 DUPLICATE IDENTIFIER 00067000 * | 104 STORAGE EXCEEDED 00068000 * | 4 PR ALIGNMENT ERROR 00069000 * | 24 NO FILE NAME SPECIFIED 00070000 * | 40 ENTRY POINT NOT FOUND 00071000 * | 32 INVALID TXTLIB 00072000 * | 100 READ ERROR 00073000 * | 100 WRITE ERROR 00074000 * | 256 POINT ERROR 00075000 * 00076000 * CALLS TO OTHER ROUTINES: 00077000 * 00078000 * DMSLDRB - TO LOAD SPECIFIED FILES. 00079000 * DMSERR - TO ISSUE ERROR MESSAGE 00080000 * 00081000 * EXTERNAL REFERENCES: 00082000 * 00083000 * NUCON,LOADER TABLES 00084000 * 00085000 * TABLES/WORKAREAS: 00086000 * 00087000 * NONE 00088000 * 00089000 * REGISTER USAGE: 00090000 * 00091000 * LOAD - 00092000 * 00093000 * R1 PLIST 00094000 * R2,6,14,15 WORK 00095000 * R12 BASE 00096000 * 00097000 * INCLUDE - 00098000 * 00099000 * R1,2 PLIST 00100000 * R12 BASE 00101000 * R14,15 WORK 00102000 * 00103000 * NOTES: 00104000 * 00105000 * NONE 00106000 * 00107000 * OPERATION: 00108000 * 00109000 * LOAD 00110000 * 00111000 * 1. ZERO THE STARTING ADDRESS WORD IN NUCON. 00112000 * 00113000 * 2. ZERO OPTION FLAGS. 00114000 * 00115000 * 3. SET THE LOCATION COUNTER TO THE FIRST USER 00116000 * LOCATION. SET LDR TBL COUNT TO TWO. 00117000 * 00118000 * 4. BALR TO DMSLDRB TO LOAD THE SPECIFIED PROGRAMS. 00119000 * 00120000 * 5. PUT THE RETURN CODE IN REG 15. 00121000 * 00122000 * 6. RETURN TO CALLER. 00123000 * 00124000 * INCLUDE 00125000 * 00126000 * 2. IF COMMAND WAS REUSE OR INCLUDE (RESET), CHECK IF 00129000 * IT IS AN INTERFACE RETURN. IF SO, SAVE STADDR IN 00130000 * THE RETURN + 12. IF NOT, INTERFACE, ZERO STADDR. 00131000 * 00132000 * 3. SET A LOADER FLAG TO PREVENT ERASING THE LOADMAP. 00133000 * RESET THE OPTIONS BITS IF SAME NOT SPECIFIED. 00134000 * 00135000 * 4. BALR TO DMSLDRB TO CONTINUE LOADING. 00136000 * 00137000 * 5. RETURN TO CALLER. R15=ERROR CODE 00138000 * 00139000 * * OPTION PROCESSING IS DESCRIBED UNDER DMSLSB. 00140000 *. 00141000 EJECT 00142000 DMSLOA START 0 00143000 USING NUCON,R0 00144000 LR R12,R15 SET BASE 00145000 USING DMSLOA,R12 00146000 SR R6,R6 GET A ZERO 00147000 ST R14,LDRADDR SAVE RETURN ADDRESS 00148000 CLI 0(R1),C'L' IS THIS A LOAD COMMAND ? 00149000 BNE INCLUDE NO, TRY INCLUDE USE OR REUSE 00150000 MVI UNRES,X'00' CLEAR INRESOLVED FLAG @VA02829 00150100 ST R6,PRHOLD ZERO PR COUNT 00151000 ST R6,STRTADDR ZERO STARTING ADDRESS 00152000 STH R6,TBENT SET LDR TBL COUNT TO ZERO 00153000 STH R6,LDRFLAGS ZERO LDRFLAGS 00154000 MVC LOCCNT(4),AUSRAREA SET LOC CTR TO 1ST USER LOCATION 00155000 TM SUBFLAG,SUBACT IS CMS SUBSET ACTIVE? @VA07964 00155200 BO SUBACTIV YES, DON'T RESET MAINHIGH @VA07964 00155350 MVC MAINHIGH(4),AUSRAREA RESET USER LAST LOCATION @VA05937 00155500 SUBACTIV EQU * @VA07964 00155750 L R2,ALDRTBLS GET TOP OF LOADER TABLE 00156000 SH R2,=H'40' DOWN TWO ENTRIES 00157000 MVC 0(40,R2),LTINIT PUT NUCON AND SYSREF IN LDRTBL 00158000 LA R2,2 TWO ENTRIES IN LDRTBL 00159000 STH R2,TBENT STORE IN NUCON 00160000 COMMON1 CLI 8(R1),X'FF' ANY FILENAME SPECIFIED 00161000 BE ERR001E NO, ERROR 00162000 CLI 8(R1),C'(' OPTIONS WITH NO INTERVENING FNAME 00163000 BE ERR001E YES, ERROR 00164000 L R15,ADMSLDRB COMMON CODE 00165000 BALR R14,R15 CALL THE LOADER 00166000 USING *,R14 00167000 L R12,ALOAD REESTABLISH ADDRESSIBILITY 00168000 DROP R14 00169000 L R15,LDRADDR+4 PICK UP LOADER'S ERROR CODE 00170000 RETURN L R14,LDRADDR GET RETURN LOCATION 00171000 BR R14 RETURN TO DMSISC 00172000 SPACE 00173000 INCLUDE LR R2,R1 COPY PLIST ADDRESS 00174000 CHKSAM CLI 0(R2),C'(' IS IT LEFT PAREN 00175000 BE CHKSAM1 YES, NOW LOOK FOR SAME OPTION 00176000 CLI 0(R2),X'FF' END OF PLIST ? 00177000 BE NOSAME YES, NO SAME OPTION 00178000 LA R2,8(0,R2) NO, NEXT ITEM 00179000 B CHKSAM CHECK IT 00180000 CHKSAM1 CLC 0(8,R2),=CL8'SAME' IS THIS THE 'SAME' OPTION 00181000 BE SAME YES 00182000 CLI 0(R2),X'FF' IS IT END OF PLIST 00183000 BE NOSAME YES, SAME OPTION NOT USED 00184000 LA R2,8(0,R2) NEXT OPTION 00185000 B CHKSAM1 CHECK IT 00186000 SAME MVC 0(8,R2),=CL8'NOCLEAR' REPLACE SAME OPTION FOR NOP 00187000 B CHKREUSE CONTINUE 00188000 NOSAME NI LDRFLAGS+1,255-(NOMAP+NOAUTO+TYPE+NOREP+NOINV+NOLIBE) 00189000 * RESET ALL USER OPTIONS 00190000 CHKREUSE OI LDRFLAGS,NOERASE+FSTXTADR @V1D1705 00191125 * INITIALIZE FLAGS 00192000 B COMMON1 CONTINUE 00193000 ERR001E DMSERR TEXT='NO FILENAME SPECIFIED',NUM=001,LET=E,CSECT=LIO 00194000 LA R15,24 ERROR CODE 00195000 B RETURN 00196000 ADMSLDRB DC V(DMSLDRB) 00197000 ALOAD DC A(DMSLOA) 00198000 LTINIT DC CL8'SYSREF' 00199000 DC V(SYSREF) 00200000 DC V(SYSREF) 00201000 DC F'0' 00202000 DC CL8'NUCON' 00203000 DC 3F'0' 00204000 EJECT 00205000 REGEQU 00206000 SPACE 2 00207000 NUCON 00208000 EJECT 00209000 LDRST 00210000 END 00211000