FORTRAN-77/RT and VIRTUAL 24-May-85 There are three different things that the word "virtual" means when used with FORTRAN-77/RT: 1) Virtual jobs, 2) Virtual overlays, and 3) vir- tual arrays. It is possible to build a job with any combination of these three virtual classes. Release 1 of FORTRAN-77/RT did not allow for full flexibility in combining classes; it also did not use memory as efficiently as it might. This note describes how the F77 module F77OTS.OBJ can be updated to give improved performance when some class of "virtual" is needed. NOTE: The update described here applies only to release 1 of FORTRAN-77/RT, and not to future releases, which will have the same functionality included in a different manner. The update kit contains the following files: F77DWA.MAC - Defines F77 Dynamic Work Area F77DWA.OBJ - Object file of F77DWA.MAC VIRJOB.OBJ - Module to set virtual image bit of JSW VIRSZ.OBJ - Module to use in linking VIRTXM.OBJ - New VIRTXM module NEWOTS.BLD - Command file to build new F77OTS module To update the Release 1 F77OTS.OBJ, follow the following steps: 1. Assign the logical name INP to the device where the update kit is located. 2. Move the Release 1 F77OTS.OBJ to INP. 3. Assign the logical name OUP to the device where the new F77OTS.OBJ is to be created. 4. Run the command file INP:NEWOTS.BLD. 5. The new OTS is OUP:F77OTS.OBN. After saving the original F77OTS.OBJ, rename F77OTS.OBN to F77OTS.OBJ. If desired, combine it with the RT distributed SYSLIB. The procedure for linking F77 jobs will depend on what classes of "vir- tual" are used. In the following examples it is assumed that the new F77OTS has been installed in SYSLIB. NO VIRTUAL OVERLAYS, NO VIRTUAL ARRAYS Privileged job: LINK myprog Virtual job: LINK/EXE:myprog VIRJOB,VIRSZ,VIRTXM,myprog/XM Page 2 NO VIRTUAL OVERLAYS, VIRTUAL ARRAYS Privileged job: LINK/EXE:myprog VIRSZ,VIRTXM,myprog/XM Virtual job: LINK/EXE:myprog VIRJOB,VIRSZ,VIRTXM,myprog/XM VIRTUAL OVERLAYS, NO VIRTUAL ARRAYS Privileged job: LINK myprog/PROMPT mypro1/V:1 mypro2/V:1 // Virtual job: LINK/EXE:myprog VIRJOB,VIRSZ,VIRTXM/XM/PROMPT myprog myprog1/V:1 myprog2/V:1 // VIRTUAL OVERLAYS, VIRTUAL ARRAYS Privileged job: LINK/EXE:myprog VIRSZ,VIRTXM,myprog/XM/PROMPT mypro1/V:1 mypro2/V:1 // Virtual job: LINK/EXE:myprog VIRJOB,VIRSZ,VIRTXM/XM/PROMPT myprog myprog1/V:1 myprog2/V:1 // THE DYNAMIC WORK AREA When F77 begins execution, it needs to allocate some space for I/O tables which we shall call the Dynamic Work Area. The original F77OTS would determine how much space was needed based on the values of the F77 compiler /RECORD:length and /UNITS:n switches. It would then issue a .SETTOP for at least that much memory. The updated F77OTS works exactly the same if the module VIRTXM does not have to be linked with the job (two of the cases shown above). If the module VIRTXM must be linked with the job (six of the cases shown above), then the dynamic work area is preallocated in the root, and has a default record length size of 136 bytes and 6 logical units. If you desire a different allocation, the /RECORD:length and /UNITS:n switches will not work correctly; in this case you can edit the module F77DWA.MAC, assemble it, and link it in ex- plicitly with your job to allocate precisely the amount of dynamic work area that you need. Page 3 ACCESSING THE I/O PAGE WHEN USING VIRTUAL ARRAYS If you declare virtual arrays in your F77 program, then F77OTS will use PAR7 (where the I/O page is) to map the virtual arrays into extended memory. The updated F77OTS contains a new global symbol, APR$7, that defines the PAR that will be used for virtual array addressing. The value contained in this global is 7*400. If you have another PAR avail- able, and would like virtual arrays to map to that PAR instead of PAR7, simply change the value of this global with SIPP. For example, to change the mapping to PAR6, the value should be 6*400, or 3000 (octal).