Cpclock
Aus Si:Wiki von Siegrist SystemLösungen - Informatik und Rezepte
CPCLOCK CSECT RESIDENT ************************************************************************ * * * COPYRIGHT (C) SIEMENS AG 1988 * * COPYRIGHT (C) SIEMENS NIXDORF INFORMATIONSSYSTEME AG 1990 * * ALL RIGHTS RESERVED * * * ************************************************************************ * BEI ANSPRUNG VON CPKMASK MUSS R8 HOECHSTWERTIGES BYTE MIT X'FF' * VERSOGT SEIN. ** V2.0A03 * DIREKTER ANSPRUNG CPKMASK WEGEN UEBERSCHREIBER SAVEREGISTER * (KOORDINATION STXIT - CONTINGENCY) * * >>>>>>>> ACHTUNG !! ACHTUNG !!!! <<<<<<<<<<<<<<<<<<<<<<<<<<<< * >>>>> ABSOLUTE ADRESSBERECHNUNG !! ZWISCHEN 'CLKBAS <-> CLKRET' * >>>>>>>> ACHTUNG !! ACHTUNG !!!! <<<<<<<<<<<<<<<<<<<<<<<<<<<< * ** V2.0A02 * TIMER STXIT FUER AUTOMATISCHEN LOCK. WIRD JEDE MINUTE (UNGENAUIG- * KEIT) ANGESPRUNGEN. ** V2.0A00 PRINT NOGEN,BASE *----------------------------------------------------------------------* **** INIT REGISTERS **** *----------------------------------------------------------------------* SPACE R0 EQU 0 R1 EQU 1 R2 EQU 2 R3 EQU 3 R4 EQU 4 R5 EQU 5 R6 EQU 6 R7 EQU 7 R8 EQU 8 R9 EQU 9 R10 EQU 10 R11 EQU 11 R12 EQU 12 R13 EQU 13 R14 EQU 14 R15 EQU 15 *---------------------------------------------------------------------* GPARMOD 31 CPCLOCK AMODE ANY CPCLOCK RMODE ANY ##BAL OPSYN ##BAS ##BALR OPSYN ##BASR *---------------------------------------------------------------------* USING *,R15 USING USEREIN,R4 USING STATEIN,R3 USING CLKBAS,R2 CLKBAS BASR R2,0 BCTR R2,R0 BCTR R2,R0 DROP 15 B BEGCLK EXTRN STATANFA EXTRN STATENDA EXTRN TERMOUTA EXTRN LOCKTIM EXTRN Z3 EXTRN Z4 EXTRN Z5 ENTRY CLKBAS *----------------------------------------------------------------------* *** S T X I T - ROUTIENE *** *----------------------------------------------------------------------* BEGCLK EQU * L R13,=A(STATANFA) L R14,=A(STATENDA) L R3,0(R13) L R4,0(R14) STCK XCLOCK L R10,XCLOCK L R14,=A(LOCKTIM) SL R10,0(R14) BINAER LOCKTIM CLKLOOP EQU * LA R3,X'100'(R3) CLI STATPNA,X'00' BE CLKNIL L R11,STATCLK SLR R11,R10 BL CLKLOCK LOCK DURCHFUEHREN CLKNIL EQU * CR R3,R4 BNL CLKEND B CLKLOOP CLKEND EQU * EXIT *----------------------------------------------------------------------* CLKLOCK EQU * CLI STAPWSAV,X'40' BNH CLKLOOP KEIN PASSWORT CLI STATPW,X'40' BH CLKLOOP IN STATE LOCK L R14,=A(Z5) MVI 0(R14),X'00' DUNKEL L R14,=A(Z3) MVI 0(R14),X'00' KEIN CMD L R14,=A(Z4) MVI 0(R14),X'00' KEINE KMASK MVC STATPW(8),STAPWSAV STM R1,R12,CLKRSAV CONTXT STACKR=(R8,R9,R10,R11,R12),OWNR=(R8,R9,R10,R11,R12) L R15,=A(TERMOUTA) L R15,0(R15) L R13,=V(CPKMASK) L R8,XFF FUER CPKMASK BASR R7,R13 CLKRET BASR R2,R0 BASISREG NEU LADEN * LA R1,180 X'B4' ADRESSPEGEL 'CLKRET' LA R1,CLKRET-CLKBAS ADRESSPEGEL 'CLKRET' SR R2,R1 SUBTRACT DISTANCE FROM CLKBAS TO CLKRET BCTR R2,R0 BCTR R2,R0 LM R1,R12,CLKRSAV LTR R15,R15 <> 0 FEHLER GES. IN MODUL CPKMASK?? BZ CLKMEND BAS R13,CLFEHLER CLKMEND EQU * B CLKNIL *----------------------------------------------------------------------* DS F CLFEHLER EQU * ST R13,CLFEHLER-4 ST R15,CRR15 UNPK CRRR15,CRR15(5) TR CRRR15,CX-240 WROUT CRRMSG,CTERME CTERME L R13,CLFEHLER-4 BR R13 *----------------------------------------------------------------------* CRRMSG DC Y(CRRMSGE-CRRMSG) DC C' % ZCP0006 CP-ERROR AT:' CRRTEXT DC CL20'CLK/STX/KMASK' DC C' RC:' CRRR15 DS L9 CRR15 DS F CRRMSGE EQU *-1 ORG DS CL200 DS 0F CX DC C'0123456789ABCDEF' *----------------------------------------------------------------------* DS 0F CLKRSAV DS 12F XCLOCK DS D DS 0F XFF DC X'FF000000' *---------------------------------------------------------------------* *** D S E C T S *** *---------------------------------------------------------------------* *---- ZENTRALE TABELLEN ------------------------------------------* STATEIN EJECT USEREIN *---------------------------------------------------------------------* END