This is a set of modules for implementing resident libraries under RT-11 FB. A complete description is not given here; for more information please refer to the paper "Resident Libraries Under RT-11", DECUS Proceedings, April 1979, pages 1135-1140. The paper was also reprinted in the Mini- Tasker, Vol. 5, No. 4, September 1979, pages 33-38. The following files are included: RESLIB.DOC This document, such as it is LB.MAC A sample resident library definition (for illustrative example purposes only) MAKELB.FOR The program for creating LB.SYS from LB.SAV LSHIFT.MAC A Macro-11 routine needed by MAKELB MAKELB.V3 Runnable versions of MAKELB which will run on any RT-11 MAKELB.V4 system (with sufficient memory). The appropriate file should be renamed to MAKELB.SAV OTI.NHD Replacement modules for FORLIB (or SYSLIB, if the OTI.EAE FORLIB modules are contained there): The version OTI.EIS of OTI in the user's FORLIB should be replaced by OTI.FIS OTISET and the appropriate version of OTI, so that OTI.FPU $$SET (and, therefore, the FORLIB I/O routines) may be included in LB.SYS without forcing OTI and OTISET.OBJ ERRS to be included. Also, the distributed version of FCHNL should be replaced by this version. For FCHNL.OBJ more information, see below. There are a number of differences between what was described in the original paper in the proceedings and what actually appears here. First of all, it quickly became clear that it was a bit clumsy to require that all Fortran main programs be converted to subroutines, to be called by a Macro-11 main program which would perform the context-switch call for $AOTS, and so forth. Instead, this code was incorporated into a modified version of OTI, so that it is no longer necessary to use something like LBMAIN.MAC as one's main program -- one need only ensure that the proper version of OTI is used, and all the necessary work will be done automatically when the Fortran main program invokes the object time initialization code. Secondly, a patch to FCHNL has resulted in a minor side effect insofar as use of resident libraries in concerned: It's now necessary to set aside TWO words in low memory, rather than one; the second word is used to hold the value of $NLCHN (which is set by the /UNITS option at compile time). Inasmuch as all the code which used to live in LBMAIN.MAC is now included in the modified version of OTI, any program linked with this version of OTI will not run unless the resident library is loaded. If you expect to ever build Fortran programs which do not make use resident libraries, you should probably keep two different versions of FORLIB (or SYSLIB) around: one the DEC standard version for use without resident libraries, and the other an alternate version containing these distributed replacement object modules. Please note that since these object modules were created from modified source modules, any published patches to OTI or FCHNL should not be applied to these versions. Patches through May 1980 are already included. The following command may be used to create the alternate version of FORLIB: LIBR /OBJ:SHRLIB[-1] /REM FORLIB OTI.XXX/UPD,OTISET,FCHNL/UPD Global? $ERRS Global? $ERRTB Global? $VRINT Global? (Note that "XXX" should be one of NHD, EAE, EIS, FIS, or FPU -- whichever is appropriate for your hardware.) SHRLIB should then be used when linking programs which will use a resident library, while FORLIB should be used for programs which will not. SHRLIB should also be used when creating the resident library; i.e.: .R LINK *LB,LB,LB=LB,...,SHRLIB/H:xxxxxx Please be advised that these replacement modules are intended for use with Fortran V2.1, and may not work with future releases of Fortran. As new releases become available, I'll attempt to provide versions of these object modules compatible with the new version. Please advise me of any bugs or other problems with any of this. If any such problems are brought to my attention, I will see that they are fixed, and a revised version of this package will be submitted to a future RT-11 SIG tape. Mark Bartelt Caltech 356-48 Pasadena, California 91125 213/356-6663 P.S. The above was written in mid-1980. Since then RT-11 V4 and Fortran V2.5 have been released. One line of code is version-dependent and should be set to be consistent with the version of RT-11 being run. See MAKELB.FOR for more details. I have not had access to sources for V2.5, so I have no idea as to whether the FORLIB modules included here will be compatible with V2.5 -- they do work with V2.1, but I haven't brought up V2.5 yet, so it's anyone's guess! If anyone out there has V2.5 sources and would be willing to let me take a look at them, I'd be happy to make whatever changes might be necessary to make all this compatible with V2.5 P.P.S. I'll be moving this summer. After July 1 I can be reached at: HSC Research Development Corporation 555 University Avenue Toronto, Ontaraio M5G 1X8 Canada