MACRO 00001000 &LAB TRANS &RR,&VR,&OPT=,&AFF,&ADEX=,&IOER=,&LCTL= 00002000 LCLC &OP(5),&PARM,&RV,&UR,&NL 00003100 LCLB &IERR,&SYST,&LOCK,&BRNG,&DEFR,&VFLT @V407594 00004110 LCLA &OPCT,&X,&Y 00005100 &NL SETC '&SYSNDX'(2,3) LABEL MODIFIER 00006100 &UR SETC 'R1' DEFAULT VIRTUAL REGISTER 00007100 AIF (T'&LAB EQ 'O').NOLAB 00014000 &LAB DS 0H 00015000 .NOLAB ANOP 00016100 &RV SETC '&RR' REGISTER FOR REAL ADDRESS 00016600 AIF (T'&VR EQ 'O').REG1 VIRTUAL REGISTER MAY DEFAULT 00017100 &UR SETC '&VR' REGISTER FOR VIRTUAL ADDRESS 00017600 .REG1 AIF ('&RV'(1,1) EQ 'R').REG2 00018100 &RV SETC 'R&RR' USE REGISTER EQUATES 00018600 .REG2 AIF ('&UR'(1,1) EQ 'R').REG3 00019100 &UR SETC 'R&UR' 00019600 .REG3 AIF ('&RV' EQ '&UR').RGERR 00020100 AIF (T'&OPT EQ 'O').OPTOK 00023000 &X SETA 1 START OF OPTION FIELD SCAN 00024200 AIF ('&OPT'(1,1) NE '(').SCAN 00024400 &X SETA 2 SKIP OPENING PARENTHESIS 00024600 .SCAN ANOP 00024800 &Y SETA &X REMEMBER WHERE PARM STARTS 00025000 .SCAN2 ANOP 00025200 &X SETA &X+1 00025400 AIF (&X GT K'&OPT).OPTN 00025600 AIF ('&OPT'(&X,1) EQ ',' OR '&OPT'(&X,1) EQ '+').OPTN 00025800 AIF ('&OPT'(&X,1) NE ')').SCAN2 00026000 .OPTN ANOP 00026200 &OPCT SETA &OPCT+1 COUNT THE NUMBER OF OPTIONS 00026400 AIF (&OPCT GT 6).OPERR SIX IS MAXIMUM @V407594 00026610 &OP(&OPCT) SETC '&OPT'(&Y,&X-&Y) EXTRACT OPTION 00026800 &X SETA &X+1 00027000 AIF (&X LT K'&OPT).SCAN GET THE NEXT ONE 00027200 &X SETA 1 RESET FOR OPTION SEARCH 00027400 .OPTS AIF ('&OP(&X)' EQ 'IOERETN').IOR 00027600 AIF ('&OP(&X)' EQ 'SYSTEM').SYT 00027800 AIF ('&OP(&X)' EQ 'BRING').BRG 00028000 AIF ('&OP(&X)' EQ 'DEFER').DFR 00028200 AIF ('&OP(&X)' EQ 'VFAULT').VFT @V407594 00028300 AIF ('&OP(&X)' NE 'LOCK').OPERR 00028400 AIF (&LOCK).OPERR 00028600 &LOCK SETB 1 LOCK REQUESTED 00028800 AGO .ADDOP 00029000 .DFR AIF (&DEFR).OPERR 00029200 &DEFR SETB 1 DEFER PROCESSING 00029400 AGO .ADDOP 00029600 .BRG AIF (&BRNG).OPERR 00029800 &BRNG SETB 1 BRING IN THE PAGE 00030000 AGO .ADDOP 00030200 .SYT AIF (&SYST).OPERR 00030400 &SYST SETB 1 SYSTEM VMBLOK REQUEST 00030600 AGO .ADDOP 00030800 .VFT AIF (&VFLT).OPERR @V407594 00030820 &VFLT SETB 1 VFAULT PROCESSING @V407594 00030840 AGO .ADDOP @V407594 00030860 .IOR AIF (&IERR).OPERR 00031000 &IERR SETB 1 RETURN IN CASE OF I/O ERROR 00031200 .ADDOP AIF (&X NE 1).ADDP SKIP IF NOT THE FIRST 00031400 &PARM SETC '&OP(&X)' START BUILD 'PARM=' FIELD 00031600 AGO .NEXT 00031800 .ADDP ANOP 00032000 &PARM SETC '&PARM'.'+'.'&OP(&X)' 00032200 .NEXT ANOP 00032400 &X SETA &X+1 TAKE THE NEXT OPTION 00032600 AIF (&X LE &OPCT).OPTS 00032800 AIF (T'&IOER EQ 'O' OR &IERR).SKIP 00033000 &IERR SETB 1 IF 'IOER=' SET, SET 'IOERETN' 00033200 &PARM SETC '&PARM'.'+'.'IOERETN' ADD THE OPTION 00033400 .SKIP AIF (NOT &IERR AND NOT &LOCK).OPTOK 00033600 AIF (&BRNG AND &DEFR).OPTOK 00033800 MNOTE 4,'''IOERETN'' OR ''LOCK'' IMPLIES ''BRING+DEFER''' 00034000 AIF (&BRNG).CKDFR 00034200 &BRNG SETB 1 FORCE 'BRING' 00034400 &PARM SETC '&PARM'.'+'.'BRING' 00034600 .CKDFR AIF (&DEFR).OPTOK 00034800 &DEFR SETB 1 00035000 &PARM SETC '&PARM'.'+'.'DEFER' 00035200 .OPTOK AIF ('&LCTL' EQ 'NO').NOSYS 00035400 AIF (&SYST).SYSEG 00035410 LCTL C1,C1,VMSEG - GET SEGMENT TABLE ORIGIN 00057000 AGO .NOSYS 00058000 .SYSEG L R15,ASYSVM - POINT TO SYSTEM VMBLOK, AND 00059000 LCTL C1,C1,VMSEG-VMBLOK(R15) GET CORRECT SEGMENT TABLE ORIGIN 00060000 .NOSYS ANOP 00061000 LRA &RV,0(0,&UR) AND DO HARDWARE TRANSLATE 00062100 AIF (NOT (&IERR OR &BRNG OR &LOCK OR &DEFR)).EXIT 00063100 AIF (&LOCK).CALOK 00064100 BC 8,TRN&NL PAGE IS RESIDENT 00065100 AGO .CALPTR 00066100 .CALOK BC 7,PTR&NL PAGE NOT RESIDENT - BRING IT IN 00067100 AIF ('&RV' EQ 'R2').CALLK 00068100 LR R2,&RV REAL ADDRESS MUST BE IN GR2 00069100 .CALLK CALL DMKPTRLK,&AFF 00070150 B TRN&NL 00071100 PTR&NL EQU * BRING AND LOCK THE PAGE 00072100 .CALPTR AIF ('&UR' EQ 'R1').CALLP 00073100 LR R1,&UR VIRTUAL ADDRESS MUST BE IN GR1 00074100 .CALLP LA R2,&PARM 00075100 CALL DMKPTRAN,&AFF 00076150 AIF ('&RV' EQ 'R2').REGSET 00077100 LR &RV,R2 REAL ADDRESS RETURNED IN GR2 00078100 .REGSET AIF (T'&IOER NE 'O').TESTAD 00098000 AIF (T'&ADEX EQ 'O').NOERR 00099000 BC 2,&ADEX - VIRTUAL ADDRESSING EXCEPTION 00100000 AGO .NOERR 00101000 .TESTAD ANOP 00102000 AIF (T'&ADEX EQ 'O').NOAD 00103000 BC 2,&ADEX - VIRTUAL ADDRESSING EXCEPTION 00105000 .NOAD BC 1,&IOER - IOERROR DURING PAGING 00106000 .NOERR ANOP 00107000 TRN&NL EQU * 00108100 .EXIT MEXIT 00109000 .OPERR MNOTE 8,'INVALID ''OPT='' OPERAND SPECIFIED' 00110100 MEXIT 00110200 .RGERR MNOTE 8,'INVALID REGISTER SPECIFICATION' 00110300 MEND 00111000