*DECK NP$CMIT *IF DEF,XFR IDENT NP$CMIT TITLE NP$CMIT- FIP/COMMON MEMORY MANAGER INTERFACE. SYSCOM B1 ENTRY NP$CMAR ASSIGN GROUP NAME ENTRY NP$CMAF ALLOCATE FIXED MEMORY ENTRY NP$CMFR FREE GROUP NAME ENTRY NP$CMFF FREE FIXED MEMORY ENTRY NP$CMSF SHRINK THE FIXED MEMORY SPACE 4,10 ** NP$CMIT- COMMON MEMORY MANAGER INTERFACE FOR FTN AND SYMPL. * L.T.NGUYEN 83/03/21 * * THESE ROUTINES ALLOW COMMUNICATION BETWEEN FORTRAN OR SYMPL * PROGRAMS AND THE COMMON MEMORY MANAGER. * * NP$CMAR (FUNCTION) ASSIGN GROUP NAME. * NP$CMAF (FUNCTION) ALLOCATE FIXED MEMORY. * NP$CMFR (SUBROUTINE/PROCEDURE) FREE GROUP NAME. * NP$CMFF (SUBROUTINE/PROCEDURE) FREE FIXED MEMORY. NP$CMAR TITLE NP$CMAR - CMM.AGR INTERFACE. ** NP$CMAR - CMM.AGR INTERFACE (ASSIGN GROUP IDENTIFIER). * * GPID = NP$CMAR(GPTYPE) FUNCTION CALL. * GPID = GROUP IDENTIFER. * GPTYPE = TYPE, TEMPORARY OR PERMANENT. * * ENTRY A1 = ADDRESS OF PARAMETER LIST. * X1 = ADDRESS OF 1ST PARAMETER (GPTYPE). * * EXIT X6 = GROUP IDENTIFER (GPID) RETURNED BY CMM.AGR. * * USES A - 1. * B - 1. * X - 1 6. * * CALLS CMM.AGR. NP$CMAR SUBR SB1 1 CONSTANT 1 SA1 X1 FETCH 1ST PARAMETER (GROUP TYPE) RJ =XCMM.AGR ASSIGN GROUP NAME BX6 X2 RETURN GROUP NAME EQ NP$CMARX RETURN NP$CMAF TITLE NP$CMAF- CMM.ALF INTERFACE. ** NP$CMAF - CMM.ALF INTERFACE (ALLOCATE FIXED MEMORY). * * FWA = NP$CMAF(SIZE,SIZECODE,GPID) FUNCTION CALL. * FWA = FWA OF BLOCK. * SIZE = SIZE OF BLOCK. * SIZECODE = ALLOCATION CODE. * GPID = GROUP IDENTIFER. * * ENTRY A1 = ADDRESS OF PARAMETER LIST. * X1 = ADDRESS OF 1ST PARAMETER (SIZE). * * EXIT X6 = FWA OF ALLOCATED BLOCK (RETURNED BY CMM.ALF). * * USES A - 2 3 4. * B - 1. * X - 2 3 4 6. * * CALLS CMM.ALF. NP$CMAF SUBR SB1 1 CONSTANT 1 SA3 A1+B1 GET 2D PARAMETER SA4 A3+B1 GET 3D PARAMETER SA2 X1 GET 1ST PARAMETER (SIZE) SA3 X3 GET 2D PARAMETER (SIZECODE) SA4 X4 GET 3D PARAMETER (GPID) LX3 6 POSITION SIZE CODE LX4 12 POSITION GROUP IDENTIFIER IX3 X3+X4 COMBINE SIZE CODE AND GROUP ID RJ =XCMM.ALF ALLOCATE FIXED STORAGE BX6 X1 RETURN FWA EQ NP$CMAFX RETURN NP$CMFR TITLE NP$CMFR - CMM.FGR INTERFACE. ** NP$CMFR - CMM.FGR INTERFACE (FREE GROUP IDENTIFIER). * * CALL NP$CMFR(GPID) FORTRAN SUBROUTINE CALL. * NP$CMFR(GPID); SYMPL PROCEDURE CALL. * GPID = GROUP IDENTIFIER. * * ENTRY A1 = ADDRESS OF PARAMETER LIST. * X1 = ADDRESS OF 1ST PARAMETER (GPID). * * EXIT NONE. * * USES A - 1. * B - 1. * X - 1. * * CALLS CMM.FGR. NP$CMFR SUBR SB1 1 CONSTANT 1 SA1 X1 GET 1ST PARAMETER (GPID) RJ =XCMM.FGR FREE GROUP IDENTIFIER EQ NP$CMFRX RETURN NP$CMFF TITLE NP$CMFF - CMM.FRF INTERFACE. ** NP$CMFF - CMM.FRF INTERFACE (FREE FIXED MEMORY). * * CALL NP$CMFF(FWA) FORTRAN SUBROUTINE CALL. * NP$CMFF(FWA); SYMPL PROCEDURE CALL. * FWA = FWA OF BLOCK. * * ENTRY A1 = ADDRESS OF PARAMETER LIST. * X1 = ADDRESS OF 1ST PARAMETER (FWA). * * EXIT NONE. * * USES A - 1. * B - 1. * X - 1. * * CALLS CMM.FRF. NP$CMFF SUBR SB1 1 CONSTANT 1 SA1 X1 FETCH 1ST PARAMETER (FWA) RJ =XCMM.FRF EQ NP$CMFFX RETURN ** NP$CMSF - CMM.SFF INTERFACE (SHRINK FIXED MEMORY) * * CALL BP$CMSF(FWA,NUM) * FWA - FIRST WORD ADDRESS OF BUFFER TO BE * SHRINKED. * NUM - NUMBER OF WORD TO BE SHRINKED * COUNTED FROM THE BOTTOM. * ENTRY A1 = ADDRESS OF PARAMTER LIST. * X1 = ADDRESS OF FWA. * * EXIT NONE. * * USE A - 1. * B - 1. * X - 1. * A - 2. * X - 2. * CALLS CMM.SFF. NP$CMSF SUBR SB1 1 SA1 X1 SA2 A1+1 NUMBER OF WORD TO BE SHRINKED RJ =XCMM.SFF EQ NP$CMSFX NP$CMNE TITLE NP$CMNE - DEBUG CODE. END END OF NP$CMIT *ENDIF