MACRO 00001000 &NAME CHARGE &TYPE,&OPND 00002000 GBLB &AP 00003000 LCLC &LABEL,&OP,&BASE,&OCH 00004000 &LABEL SETC '&NAME' 00005000 &BASE SETC '' 00006000 AIF ('&TYPE' EQ 'START' AND T'&OPND EQ 'O').START 00007000 AIF ('&TYPE' EQ 'STOP' AND T'&OPND EQ 'O').STOP 00008000 AIF ('&TYPE' EQ 'SWITCH' AND T'&OPND NE 'O').STOP 00009000 AIF ('&TYPE' EQ 'SYNC' AND T'&OPND EQ 'O').SYNC @V4M0203 00009100 MNOTE 8,'INVALID ''CHARGE'' OPERAND' 00010000 MEXIT 00011000 .* STOP CHARGING CURRENT USER 00012000 .STOP AIF (&AP).STOMP 00013000 &LABEL STPT VMTTIME-VMBLOK(R11) 00014000 AGO .TSW 00015000 .STOMP ANOP 00016000 &LABEL L R15,TIMEDISP @V4M0203 00017100 AIF ('&TYPE' EQ 'SWITCH').STOMPSW @V4M0203 00017200 ALR R15,R11 @V4M0203 00017300 STPT 0(R15) @V4M0203 00017400 MEXIT @V4M0203 00017500 .STOMPSW LA R14,VMBLOK-VMBLOK(R15,R11) @V4M0203 00017600 STPT 0(R14) @V4M0203 00017700 .TSW AIF ('&TYPE' EQ 'SWITCH').SWIT 00019000 MEXIT 00020000 .* SWITCH VMBLOK ADDRESSABILITY AS CHARGE SWITCHES 00021000 .SWIT ANOP 00022000 &LABEL SETC '' 00023000 &BASE SETC '-VMBLOK(R11)' 00024000 &OP SETC '' 00025000 &OCH SETC '&OPND' 00026000 AIF ('&OCH'(1,1) NE '(' OR '&OCH'(K'&OCH,1) NE ')').LOADT 00027000 &OCH SETC '&OCH'(2,K'&OCH-2) 00028000 AIF (T'&OPND(1) NE 'N').NOAR 00029000 .LOADR ANOP 00030000 &OCH SETC 'R'.'&OCH' 00031000 .NOAR ANOP 00032000 &OP SETC 'R' 00033000 AGO .LOAD 00034000 .LOADT AIF (T'&OPND(1) EQ 'N').LOADR 00035100 .LOAD L&OP R11,&OCH 00036000 .* START CHARGING NEW USER 00037000 .START AIF (&AP).STAMP 00038000 &LABEL SPT VMTTIME&BASE 00039000 MEXIT 00040000 .STAMP AIF ('&TYPE' EQ 'SWITCH').STAMPSW @V4M0203 00041130 &LABEL L R15,TIMEDISP @V4M0203 00041230 LA R15,VMBLOK(R15) @V4M0203 00041330 AGO .SPTMP @V4M0203 00041430 .STAMPSW ALR R15,R11 @V4M0203 00041530 .SPTMP SPT 0(R15) @V4M0203 00041630 MEXIT @V4M0203 00041730 .SYNC AIF (&AP).SYNAP @V4M0203 00041830 &LABEL DC 0H'0' @V4M0203 00041930 MEXIT @V4M0203 00042030 .SYNAP ANOP @V4M0203 00042130 &LABEL L R15,ATMRSN @V4M0203 00042230 BALR R14,R15 @V4M0203 00042330 MEND 00044000