@@
POPS Memory files:             ME10000n


A. Overview


Function: POPS memory files are used to store copies of the POPS
"environment" (procedure source code, symbol table, procedure
executable code, adverbs values, various pointers).

Details:  The details of this environment are discussed elsewhere and
will not be described here.  The files are permanent files and have a
size which depends on the size of the LISTF and K arrays in the version
of POPS being used.  The formula is 5 times the size of LISTF plus 4
times the size of K.  In Charlottesville,  the files are at least 212
256-word blocks long.

Names:  POPS memory files are named ME10000n , where n is NPOPS (the
POPS identification number).


B. File structure


     The structure of the K and LISTF arrays is discussed elsewhere.
Here we will show only how they are stored on disk.  The files consist
of sequential 256-word records.  Using the sizes of the K and LISTF
arrays in the Charlottesville version of AIPS, the files are laid out
as

    FIELD   TYPE           DESCRIPTION

      1     I*2(3072)    LISTF in use by the current user
      2     I*2(9728)    K array for initial values and RESTART
      3     I*2(3072)    LISTF array for initial values and RESTART
      4     I*2(9728)    K array for STORE 1 and RESTORE 1
      5     I*2(3072)    LISTF array for STORE 1 and RESTORE 1
      6     I*2(9728)    K array for STORE 2 and RESTORE 2
      7     I*2(3072)    LISTF array for STORE 2 and RESTORE 2
      8     I*2(9728)    K array for STORE 3 and RESTORE 3
      9     I*2(3072)    LISTF array for STORE 3 and RESTORE 3


C. User notes


     It should not be necessary for users to read or write this file
under normal circumstances.  Standard POPS subroutines do all the
operations which are required.



D. Routines which read and write POPS memory files


     The memory files are given their initial values by the program
POPSGN.  This program does a special compilation followed by a AIPS-
like compilation on text files called POPSDAT for interactive and
batch AIPSs.  POPSGN sets all areas of the memory file to the
"virgin" K and LISTF arrays which it has computed.  A more detailed
description of POPSGN appears in the chapter on initialization.

     In the POPS programs, the subroutine INIT moves field 3 ("virgin"
LISTF) into field 1 (working LISTF) and moves field 2 into the core
copy of the K array.  The subroutine STORES updates the working copy of
LISTF (field 1 on disk) and performs the pseudoverbs LIST, STORE,
RESTORE, SAVE, GET, CORE, and SCRATCH.  The variables in the common
/POPS/ which aid this process are

    LPAGE       number of 256-word blocks in LISTF
    MPAGE       number of 256-word blocks in K plus LISTF
