date: May 9, 1986 to: DECUS RT-11 users from: Dennis V. Jensen 258H Development Ames Laboratory ISU/USDOE Ames, IA 50011 515/294-7909 Subject: First release of the Aleda Library. Aleda was written by Dennis V. Jensen of the Ames Laboratory at Iowa State University as part of U.S. Department of Energy contract W-7405-ENG-82. The right to use this software release is allowed in the public domain. The author, Ames Laboratory, and USDOE assume no responsibility as to the correctness of the code nor the appropriateness for such use as it may be applied. Any comments about the Aleda Library may be directed to the author at 258H Development, Ames Laboratory, Ames, Iowa 50011. 1.0 The General Aleda Library. Aleda is designed for the Fortran programmer to gain access to serial ports for device interfacing and for user interaction. The primary document for using Aleda is in the file ALEDA.DOC and the associated Runoff file ALEDA.RNO. An example of using Aleda is included in the file NICDMP.FOR . To link a program which uses Aleda subroutines, include ALEDA.OBJ in your link for a Fortran IV version or include ALEDA7.OBJ for a Fortran-77 version. The Aleda library is built using the indirect command file ALEDA.LIB for Fortran IV or ALEDA7.LIB for Fortran 77. First edit the ALEDA.UCL file to adjust the required definitions to your system. Then execute $@ALEDA.UCL . Most development work with Aleda will presume that the code resides in a logical disk with the logical name of ALE: . All required object files are included for rebuilding the library. To Aleda RT-11 Sig DECUS Release 1, Spring 1986 PAGE 2 reassemble the Aleda macro files, use the command called AMAC*ro; it will include the ALVIN.MLB macro library that is required. Much of the complexity of Aleda is hidden from the user with the Fortran interface. Only one macro file may need to be modified to use Aleda on your system. This file is the device table and is called CLDEVT.MAC . This device table is included in the library and will link with your programs if no other device table is provided explicitly. Other device table examples included are the P2DEVT which is the device table for the print server; and the DLTDEV which is very similar to CLDEVT but has enabled NOABORT contorl for the console so control-C will not abort a program which uses the Aleda console (unit 0 or 1 enabled). 2.0 The Foreground Print Server. P2* files are an application of the Alvin macro-level interface to the Aleda library. It is a print server that will accept two input print streams and arbitrate access to one printer. It is configured to run under RT-11 in the foreground. Modify P2DEVT.MAC for your system configuration. You can also expand the number of input streams by modifying the stream table in P2SERV.MAC and defining the additional ports in P2DEVT.MAC. Use the P2LINK.COM indirect command file to build the server named P2SERV.REL . In the print server's current form, the following restrictions apply: 1) A local print driver (LS:) cannot access the printer used by P2SERV.REL while the server is active. 2) To temporarily stop the foreground server, enter , return to the background with , print files with the driver NOT LOADED, and enter to restart the server. 3) To remove the server from the system enter and UNLOAD F. You can also reboot the system at any time. The server attempts to prevent itself from being aborted before it has a chance to disable interrupts on the active devices. It can be aborted and unloaded after it has been disabled. Any of the following control characters will actually disable the server once connected to the foreground: control-U, control-Z, control-C, or control-D. 3.0 The Command Manager Example: Digital Loopback Test. An example program which uses the command manager is included as the DLT* files which stand for Digital Loopback Test. When the DLTLNK.COM file is executed, it will build a program called TALK.SAV . This program will include the LOOPBACK, HELP, EXIT, CONNECT and DISCONNECT commands. And it can be expanded to include commands which you may write. Modify the DLTCMD.MAC and DLTLNK.COM files to include other commands. Aleda RT-11 Sig DECUS Release 1, Spring 1986 PAGE 3 LOOPBACK will first display all devices included in the device table then allow you to select a receiver and transmitter to be tested. The test requires that a loopback connector has been installed such that anything transmitted will be received as specified by the ports selected. A block of 85 characters is transmitted and the received block is tested to match. A log of failed blocks is maintained. Enter any activator (i.e, ) to see what the current status is. Only a 16-bit counter is maintained, so don't be surprized if it overflows to become negative or if it should roll over. In general you are only concerned with the number of bad blocks and this should not overflow. A timer is used in LOOPBACK. Therefore, the clock must be enabled to work in all cases. 3.1 Using TALK to Connect to Remote Systems. Also included in TALK.SAV is a terminal emulator mode that will allow you to maintain multiple remote system connections via the ports defined in the DLTDEV table. The table provided defines TSX-Plus CL ports 0 thru 7 which, for RT-11, associate to DL-11 ports 176500/300 thru 176570/370. To connect to a port enter to which TALK will respond Local? . Enter the command CONNECT CL0 to attach to this port and enter DISCONNECT CL0 to detach from it. A connection is retained until an explicit DISCONNECT command is entered. Multiple connections can be active at the same time via multiple CONNECT commands. Buffers are provided and the connections are made in the program CONNEC.MAC. If the device table is changed, there may also be changes required in CONNEC to maintain proper associations between the logical name connected and the related ports. 4.0 SWLUN: Switch Logical Unit of the RT-11 Console. Switch Logical Unit, SWLUN, is a program like the CONSOL program in the RT-11 distribution kit. It allows alternate ports on a system to be used as the console terminal. The difference is that it allows for multiple DL-11 ports to be defined and it allows the console to switch amoung the various ports on demand. To configure for your system, modify the table in the start of SWLUN.MAC to include all those ports where you may want the console terminal to be. Macro SWLUN and link it. If you wish to automatically switch terminals on startup, the input to SWLUN can be placed in an indirect command file. In this case, the verbage in the beginning will not print. The only known restriction in SWLUN is that it will not unprotect a vector it is no longer using. It uses direct bit manipulation in the RMON to protect the vector so this works even under the SJ monitor. It does not bother to unprotect any of the vectors it had previously used. This has not been a problem, though, for the current users of SWLUN. Aleda RT-11 Sig DECUS Release 1, Spring 1986 PAGE 4 SWLUN is referenced within Digital Loopback Testing when a user wishes to test the actual console port under RT-11. To do so, first run SWLUN and switch to a different port that a terminal is attached to. (This may have to be done in the startup file if the terminal is becoming quite difficult to use.) From this terminal, run TALK and select LOOPBACK. Ports 18 and 19 in the distributed device table define the console CSR and vector. Use these to test the console. 5.0 Credits. I want to thank Jim Flatten for his initial work on SWLUN and to thank Dan Kingsbury for his timed wait routine. TWAIT, which allows a generic interface to all monitors, is accessed through the $TWAIT macro included in the Alvin macro library. This has allowed the timing features of Aleda to be monitor independent even if timer support is not gen'ed in. The TWAIT object module is included in the Aleda library.