JENS-PETER JENSEN 20-JUL-81 Institut f. Nachrichtentechnik TU Braunschweig Tel:391-2489 Schleinitzstr 23 3300 Braunschweig RT-11 SUBSYSTEMS or How to get up to eight RT-11 Systemdevices (almost) for free Abstract ________ This article describes in colloquial form how the MRRT-11 V01 Software Development System (DEC order no. AA-J118A-TC) can be used to bootstrap a standard RT-11 monitor on the target computer and how it can be used to emulate standard RT-11 systemdevices for use by up to eight front-end processors. A Subsystem Utility Program (SUP) is introduced, which allows the free exchange of files between subsystems (or MRRT-11 .DSK-files) and the host processor. Let's say you own a typical RT-11 development system consisting of: - PDP11 minicomputer (11/34) or LSI11 microcomputer (11/23) - Console terminal - 32KB (and up) of RAM - Disk subsystem (RL01/02) - Lineprinter - Serial I/O ports (e.g. DLV11-J) - RT-11 V04 operating system with systemprograms (e.g. MACRO,FORTRAN,EDIT etc.) and you have to write application programs for a SB-11 or VT103 microcomputer as target system. The following will also apply to any LSI11-based system with the following features: - LSI11/2 or LSI11/23 - Video terminal - 32KB RAM - 2 Serial line units - Bootstrap ROMs with TU58 bootstrap RT-11 SUBSYSTEMS PAGE 2 - any other interfaces required by your application (e.g. IEC-Bus interfaces, A/D or D/A converters etc.) You could start writing your programs for the target system from scratch using assembly language (without using programmed requests - SHUDDER!) and transfer them maybe in LDA - format on paper tape to your target system. To get started you will need a paper tape reader and punch and a bootstrap loader for the tape. A better approach would be to write your programs in Stand-alone FORTRAN (an option of RT-11 FORTRAN IV V2.5). But still you have the problem of how to transfer your programs to the target system. A good choice in this situation is the MRRT-11 software development system which consists of two parts: 1. Your standard RT-11 V04 development system with all its tools like editors, language processors, linker, debugger etc. and 2. The MRRT-11 run-time system. This is a memory resident version of the RT11SJ monitor If you have loaded MRRT-11 into your target system your application program may use nearly all the facilities of a proven monitor via SYSLIB - calls or Programmed Requests. This includes I/O via device handlers plus a large library of RT-11 oriented routines and programs. Also you can write your application program in any language supported by RT-11. MRRT-11 offers two ways to load a program into your target processor: 1. You can save your application program together with the run-time system and device handlers on a TU58 tape drive. Then you carry the tape drive to your target machine and bootstrap the tape via the TU58 bootstrap in ROM... or 2. You can down-line load your program. In order to do so you have to establish a serial link (DLV11 or MXV11-A) between the host system and your target processor. The baudrate should be set to >= 9600 Baud to accomplish reasonably fast loads. Next you have to generate a special .DSK-file by running the BUILD - program (included in the MRRT-11 package). The .DSK-file resides as a normal RT-11 file on a random access device (preferably a fast hard-disk system e.g. RL01/02) and contains anything a normal RT-11 system device would contain: e.g. bootstrap blocks, directory, monitor, handler, the application program file, data files and even empty areas where your application program could put files if it was to generate any. Now, how is the down-line loading accomplished? Well, the MRRT-11 system provides two essential programs for this RT-11 SUBSYSTEMS PAGE 3 purpose: 1. The DLLOAD - program 2. The XT - handler Before you can switch on your target processor you have to INSTALL and LOAD the XT - handler and run the DLLOAD - program *). The DLLOAD - program is the link between the XT - handler, which on its part communicates with the target computer via the serial line and the device handler of the masstorage device which holds the .DSK-file. This configuration makes the .DSK-file on the host appear identical to a TU58 connected directly to the target system. Therefore the target system can be bootstrapped at power on by using the TU58 boostrap in ROM. For the same reason the application program will see no differences in file I/O (via a DD - handler) between files on a TU58 or files in a .DSK-file on the host. Figure 1 illustrates structure and operation of the DLLOAD - facility. Figure 1 As elegant as the MRRT-11 concept may seem there are a few shortcomings: 1. The BUILD - process is a little awkward If your application program contains an error and you have corrected it on the host system, you have to BUILD a whole ------------ *) DLLOAD can be run as foreground job if you use the FB or XM monitor on the host system. I recommend to do so, if you don't want to block your main system, especially if your application program needs access to the .DSK-file after it has been bootstrapped. RT-11 SUBSYSTEMS PAGE 4 new .DSK-file, instead of just replacing the erroneous program. 2. You don't have access to the files of the target system You have no chance to return any result files your application program might have generated (for example if your application program is a data aquisition program). 3. You can't inspect the directory of a .DSK-file Neither from the host nor from the target machine you can inspect the contents of .DSK-files, so that you have to document their contents very elaborately. 4. You can't inspect any data or result files Neither from the host nor from the target system you can inspect ASCII data files unless you include code for this in your application program. 5. You can run only one application program MRRT-11 provides a program called APPLP.SAV which, if included in the .DSK-file together with one or more application programs, will query you which of the programs you want to run. This is fine, but on exit of the application program you only have the choice of rebooting the MRRT-11 system or rerunning the same program. 6. MRRT-11 does not include the KMON This means that all the nice features of RT-11 which are initialized by keyboard commands, like for example SET options to device handlers, TIME and DATE setting, indirect command files, ASSIGNment of logical device names, RUNning of programs etc. are not availlable to the MRRT-11 user. 7. The MRRT-11 monitor is a single job (SJ) monitor Some applications really may require the use of the foreground/background monitor, especially if your application is real-time process control. In this case you can't use MRRT-11 at all. SO... Wouldn't it be nice to run a standard RT-11 monitor on the target system? Then you could RUN arbitrary programs, TYPE your data files on the target processors terminal, list the DIRECTORY *), execute indirect command files, etc. ------------ *) To accomplish some of these tasks, utility programs like DUP, DIR or PIP need to be included in the .DSK-file. RT-11 SUBSYSTEMS PAGE 5 BUT... Unfortunately your target system doesn't have a system device, so we can forget this idea, can't we? NO ! After all, doesn't the HOST/DLLOAD/XT/.DSK-file combination look like a system device to the MRRT-11 monitor? Wouldn't it be possible to boostrap a normal RT-11 monitor in the same way as the MRRT-11 system? This is indeed the case and if you own the MRRT-11 software package you can try this yourself because it is very easily accomplished. I will assume, that you have established a serial communication link between the host and the target processor, as described in the MRRT-11 Software User's Guide, and that you have installed the XT - handler propperly (see appendix A of the above manual), so that you are able to down-line load MRRT-11 systems. Besides the MRRT-11 system (on device DK: ) you will need access to the files of a normal RT-11(SJ) system and the handler files TT.SYS and DD.SYS which should have the same SYSGEN options as the monitor. ( presumably on device SY: ) Then start the BUILD program and answer the questions like shown in the following dialogue: RUN BUILD BUILD V01.00 Several questions will ... . . . question again. Do you want to down-line load this system [Y or N] (N) ? Y Output file name (MRRT.DSK): dv#:MRRT.DSK[100] { this will generate the .DSK-file on device dv#: ; change this to be the fastest and largest random access device in your system. Make sure, that this device has about 400 contiguous free blocks. The final file will contain 100 free blocks for you to to exercise maybe the EDITor. } MRRT monitor file name (MRRT.MRT): MRRT1.MRT Boot device handler file name (DD.MRT): Do you want to retain the boot device handler [Y or N] (Y) ? Names of other device handlers: * User application program file name (APPLP.SAV): RT-11 SUBSYSTEMS PAGE 6 Names of other application programs: *SY:SWAP.SYS,SY:RT11SJ.SYS,SY:DD.SYS,SY:TT.SYS Names of any data files: *SY:PIP.SAV,SY:DUP.SAV,SY:DIR.SAV,SY:EDIT.SAV { here you may enter 2 additional programs for a total of 6, which you would like to try on your new RT-11 system } ?BUILD-I- System size is XXXXX. bytes Next type: LOAD XT: RUN DLLOAD { or FRUN DLLOAD/BUFFER:1000 } Then DLLOAD will prompt: How many XT units do you want to assign? (1-8) 1 *XT0:=dv#:MRRT Now turn on the target system to start the bootstrap procedure. After a while the system should come up with: MRRT-11 V01.00D Enter program to be run * Type DUP.SAV in response to the prompt. After a few seconds DUP should prompt with a * . Type and DUP should print its version number. Now type the following command: *DD0:A=DD0:RT11SJ.SYS/U This will copy the bootstrap information from DD.SYS and RT11SJ.SYS to the correct blocks of the .DSK-file. When the * reappears, type CTRL-C. The MRRT-11 system will probably halt the processor. Switch off the target machine and on again. After a while the standard RT11SJ - monitor should come up with it's monitor ID and a message that it can't find the start-up file. Now you are ready to go. Type any RT-11 command to verify that the system works correctly. Don't get impatient if some commands seem to take too long time (especially if you are using a low baudrate). I would recommend to try to sucessively increase the baudrate of the serial link, starting with 9600 Baud, until the system fails to boot. Now that you have verified that it is indeed possible to run a standard RT-11 System on your target processor using the DLLOAD/XT RT-11 SUBSYSTEMS PAGE 7 software, only two problems remain to be solved: 1. It still isn't possible to copy files into the .DSK-file without recreating a whole new .DSK system (which could be quite embarrassing if you have unique data in your old .DSK-file). 2. You can't copy files from the .DSK-file to the host system in order to access aquired data. To overcome these limitations I have written a program called Subsystem Utility Program (SUP). This is a program which runs in the host's background (while DLLOAD runs in the foreground). It is able to create and maintain subsystemfiles (.DSK-files) which are accessed by the DLLOAD - facility. SUP can be used to COPY files which reside on a device of the host system to any subsystemfile and vice versa. It is also possible to COPY files from one subsytem to another. Further you may delete or rename files in subsystems from the host. With a DIRECTORY command you can inspect the directories of .DSK-files. In order to totally eliminate the need for the BUILD - program and the awkward bootstrap procedure described above, SUP includes commands to create a new subsystemfile of specified size *) and to copy the bootstrap information from any RT-11 monitor to the bootstrap blocks ( V4.0 and V3.0 bootstrap copies supported) of the subsystemfile. Besides SUP you won't need any part of the MRRT-11 system exept DLLOAD and the XT - handler. If you insist on using the original MRRT-11, SUP still provides you with the ability to copy files into and out of .DSK-files and to inspect the directories. DLLOAD can support up to 8 different target machines (with 8 .DSK-files). So, theoretically you could run 9 independent RT-11 systems (if DLLOAD runs in the foreground, that is) with only one system device. Figure 2 shows this configuration. But practically you should consider that for each additional system DLLOAD needs 256 words of buffer space in the hosts memory and that the XT - handler will be larger. Further subsystemfiles of reasonable size (e.g. 1024 blocks) will consume your masstorage very fast. Finally, if several target computers are requesting disk-I/O simultaneously you may get data overrun errors in the serial line units, so that you have to reduce the baud rate, which again makes the already long load times larger. Thus I would recommend not to install more than one or two target systems. But if you accept these limitations, RT-11 Subsystems really may be a cheap solution to your data aquistion - , process control - or any ------------ *) This size ,however, is limited to a maximum of 512 blocks by the device size in the DRDEF - MACRO of the XT - and the DD - handlers. if you need larger subsystemfiles, change these MACRO - parameters to the maximum needed size, then reassemble and link the handlers. RT-11 SUBSYSTEMS PAGE 8 Figure 2 other problem requiring a front-end processor.