These programs are distributed with sources if available. They have been very useful to us, but carry no guarantee. They are distributed for a copying fee of $50 with available documentation. DX Displays the OS/12 index similarly to DIAL's DX command. Will also print the index with an identification which is also displayed and may be changed. IOPACK Modifications to PIP's I/O package to simplify calling and using. MAP An improved bit map program which will print map, reverse map, ranges or reverse ranges. LIST A paged pretty lister. Lists .LS files, documents or forms with variable tabs, titles, etc. Also lists name of file in large block letters. MARK12 Trivial modifications to MARK12 to mark 128 word blocks with the P option and return to OS/12. TTYLPT A two page handler that simulates the line printer on the teletype. PLT A two page handler that accepts decimal ASCII input and plots on a standard XY plotter with retransmitting slidewire or null detector. Uses relay and D-A converters. IBM Converts OS/12 ASCII files from any input device to EBCDIC files on MAGTAPE (TU10). Also converts in the reverse direction and has an option for forms control to FORTRAN. DIALS8 DIAL to OS/12 converter which looks up files in the DIAL index and outputs standard device independent OS/12 files. PSDIAL A quick and dirty converter for OS/12 to DIAL compatible files. Writes on LINCtape starting at block 0 of Unit 1. A very dangerous program. DX A PROGRAM TO DISPLAY OS/8 DIRECTORY CLYDE G. ROBY, JR. DEPARTMENT OF MEDICINE WEST VIRGINIA UNIVERSITY Abstract DX is a program which runs under the OS/8 system. It is used as a quick and easy method of examining OS/8 device directories. One may change a filename and date from the display. Simple deletion of files and printout on the teletype and the line printer are also available. -1- To run the program, the following is typed in response to the dot typed out by the PS/8 or OS/8 keyboard monitor: .R DX Or .R DX DEV The program then starts up and displays the appropriate directory. If "DEV" is specified, the directory of device DEV: is displayed. If "DEV" is an illegal device, or if no device was specified (as in the first call above), the directory for device DSK: will be displayed. The user may assign a particular device to DSK: before running this program, if he so desires. DX displays a device identification line which may be changed by the user, the current system date, and up to 8 directory entries. One may move forward or backward through the directory via the four following commands: 2 move forward one line W move backward one line 1 move forward one frame (8 lines) Q move backward one frame (8 lines) In addition, the user may delete entries in the directory by first placing that entry on the bottom line of the scope using the above four commands, and then typing 'CTRL/U'. An file of the appropriate length is generated at that entry in the directory. Entries that are deleted in this manner are not made permanent until the directory is written back out. This is done by typing '#'. However, if the user has made mistakes by deleting the wrong file, etc., he may restore his directory if he has not yet typed '#' via the command 'R', which reads the directory back into memory and displays it. The name of an entry in the directory may be changed by placing the entry to be renamed on the bottom line of the scope, and then typing 'RUBOUT'. For each 'RUBOUT' typed, a question mark will appear in the filename or extension field. Any character that is not a 'RUBOUT' will replace the current question mark. Spaces are correctly converted to 00's. After all question marks are replaced, the regular scope commands become available. To make the filename change permanent, type '#' which writes out the directory. The date of an entry may be changed by first placing that entry so it is the last entry displayed on the scope and then typing 'D'. A line of question marks will appear directly below the current date entry. A new date may be entered. 'RUBOUT' deletes the last character typed; carriage return ends the string. When carriage return is entered, the character string is converted and replaces the date entry. Again, to make the date change permanent, type '#' which writes out the directory. -2- A directory identification is also displayed at the top of the scope. However, if there is a very large directory (greater than about 200 entries), there will be no identification. To change the directory identification, type 'I'. A line with question marks shall appear in the center of the scope. You may type any identification up to 26 characters in length. A carriage return ends the input. Single character deletion is performed by hitting 'RUBOUT'. Typing 'CTRL/U' deletes the entire identification. It is important to remember that the identification is not output to the directory of the device until you type '#'. Remember that!! There are two commands to output the directory. The 'T' command outputs the directory as it looks to DX on device DIR:, and if it does not exist, then to device TTY:. The 'P' command outputs the directory to device DIR:, and if it does not exist on the system, then to device LPT:, and finally to TTY: if LPT: does not exist. Attempting to output to a directory-structured device will result in no output. The current directory identification is output followed by the directory listing as printed out with the /E option of PIP. Of course, 'CTRL/C' is always active. 'CTRL/C' typed at any time (display or printout) will cause DX to return to the OS/8 keyboard monitor. To change the device of which you wish to see the directory, type 'CTRL/R'. This will bring in the Command Decoder. At this point, type in the name of the device of the directory which you wish to look at. DX then reads in the directory of the device and displays it. To summarize: # Write out the directory on current device. 1 Move forward one frame (8 lines). 2 Move forward one line. D Change the date for this entry. I Change the directory identification. P Print the current directory on the line printer. Q Move backward one frame (8 lines). R Restore (read) the current device directory. T Print the current directory on the teletype. W Move backward one line. CTRL/C Return immediately to OS/8 keyboard monitor. CTRL/O Stop printout of a directory. CTRL/R Restart, i.e., ask for a new input directory device. CTRL/U Delete last entry displayed on scope. RUBOUT Delete character in filename (change filename entry). -3- IOPACK A generalized I/O handler for OS/8-12 ASCII files The user may allocate his buffers and handlers or allow IOPACK to do it for him. The following parameters may be defined in the calling program. IOPACK's default assumptions are given following each parameter. OUBUF Starting address of output buffer. IOPACK assumes it is 0 and is located in field 0. OUCTL Output control word. Bit 0 must be 1. The next 5 bits are the number of 128 word records in the buffer. The next three bits are the buffer field. IOPACK assumes 5400 - 6 records, 3000(8) words, FIELD 0. OUDEVH Starting location of output device handler. IOPACK assumes 7200. This allows for a two-page handler. INBUF Starting location of input buffer. Assumed 3000 Field 0. INCTL Input control word. Structure the same as OUCTL except that bit 0 is not set. Assumed 1600 - 7 records, 3400(8) words, FIELD 0. INRECS Number of input records. Must agree with INCTL. Assumed 7(8). INRECS = INCTL / 200(8). INDEVH First location of input device handler. Assumed 6600. This allows for a two-page handler. It is convenient to write short programs to live around IOPACK in FIELD 1 and use the assumed values for all parameters. In this case the subroutine need only be called. -4- There are many entry points to IOPACK. These are divided into two useful subsets: those used by a programmer for "standard" I/O and those used by a more advanced programmer. The more useful entry points are: SETUP, XXGET, XXPUT, XXCLOSE, and OTYPE. Each of these is documented in more detail below. 'CF' is the user's calling field. SETUP Entry point to initialize IOPACK. CDF CF CDF 10 JMS I (SETUP /CALL IOPACK INITIALIZATION EX /ASSUMED INPUT EXTENSION FOR /THE COMMAND DECODER EOF /END-OF-FILE PROCEDURE FOR END /OF LAST INPUT FILE XXX /RETURN TO USER WITH AC CLEAR The Command Decoder is invoked and asks for an output file and up to nine input files. The assumed input extension is .EX (stripped ASCII). If no output file is specified, TTY: will be assumed. EOF is an address in the calling field which will be transferred to when the last input file has reached an end-of-file. If this is 0, then the end-of-file procedure will simply close the output file and return to the Keyboard Monitor. The output file is opened and the input files are initialized before return is made to the caller. If output is to PTP: (paper tape punch), 128 frames of leader are output. If no output device is specified, TTY: will be assumed. XXGET Entry point to get a character from the input files. CDF CF CIF 10 JMS I (XXGET /ENTRY POINT TO GET A CHAR XXX /RETURNS WITH A CHARACTER IN AC If any errors occur, a message is printed out and control will return to the Keyboard Monitor. If the final end-of-file is encountered, control will be transferred to the end-of-file address supplied as th second argument to SETUP. XXPUT Entry point to send a character to the output file. CDF CF CIF 10 JMS I (XXPUT /OUTPUT CHARACTER IN AC XXX /RETURNS WITH AC CLEAR -5- The lower 8 bits of the accumulator are sent to the output file. If the character code is 214(8) then 9 zero characters will follow the form feed; if 213, then 5 rubout characters (377) will follow the vertical tab; if 211 then 2 rubout characters will follow the horizontal tab. If any errors occur, an appropriate error message wwill be output and control will return to the Keyboard Monitor. XXCLOSE Normal user entry point to close the output file. CDF CF CIF 10 JMS I (XXCLOSE /CLOSE THE OUTPUT FILE XXX /RETURN WITH OUTPUT FILE CLOSED /AND WITH CLEAR ACCUMULATOR If any errors occur, an error message will be printed out and control will return to the Keyboard Monitor. OTYPE Return with device type of output device. The device type from the DCB table is returned to the accumulator. CDF CF CIF 10 JMS I (OTYPE XXX /RETURN WITH DEVICE TYPE IN AC The following routines are the "guts" of IOPACK and are called by the above routines. For those users who may want to do something else with IOPACK, the following documents the basic I/O routines. IOPEN Initialize input files. This entry point initializes certain flags and pointers which indicate to start at the first of nine files. When an end-of-file is encountered in an input file, the next successive input file is automatically opened. That is, device handlers will be loaded if necessary. CDF CF CIF 10 JMS I (IOPEN /OPEN INPUT FILES XXX /RETURNS HERE WITH CLEAR AC ICHAR Get a character from input files. Returns a character (8 -6- bits) from the input files. CDF CF CIF 10 JMS I (ICHAR /GET A CHARACTER FROM INPUT FILES XXX /IF AC < 0, ERROR OCCURRED /IF AC > 0, END OF LAST INPUT FILE XXX /NORMAL RETURN, CHARACTER IN AC OOPEN Set up output file. If there is no output file, output is inhibited. The output handler is loaded into memory nd certain flags and pointers are initialized. /CAN ONLY BE CALLED FROM FIELD 1 JMS I (OOPEN XXX /IF AC < 0, CANNOT ENTER THE FILE /IF AC > 0, OUTPUT IS INHIBITED XXX /NORMAL RETURN, AC CLEAR OCHAR Send character in accumulator to output file. CDF CF CIF 10 JMS I (OCHAR /OUTPUT CHARACTER IN AC XXX /ERROR RETURN WITH CLEAR AC /OCCURS WHILE DUMPING A BUFFER XXX /NORMAL RETURN WITH CLEAR AC OCLOSE Close the output file. Make the temporary output file permanent. /CAN ONLY BE CALLED FROM FIELD 1 JMS I (OCLOSE /CLOSE THE OUTPUT FILE XXX /ERROR WHILE DUMPING LAST BUFFER OR /WHILE ATTEMPTING TO CLOSE FILE /RETURN WITH AC CLEAR XXX /NORMAL RETURN WITH CLEAR AC -7- A simple program to copy an ASCII file with input extension .DA might be: *200 CLA CLL CDF 00 /CALLING FIELD IS FIELD 0 CIF 10 /IOPACK RESIDES IN FIELD 1 JMS I (SETUP /SETUP THE I/O PACKAGE 0401 /ASSUMED COMMAND DECODER EXTENSION .DA 0000 /USE IOPACK'S END-OF-FILE ROUTINE COPYLP, CIF 10 /IOPACK IN FIELD 1 JMS I (XXGET /GET A CHARACTER FROM INPUT FILE CIF 10 /IOPACK IN FIELD 1 JMS I (XXPUT /PUT A CHARACTER TO OUTPUT FILE JMP COPYLP /STAY IN LOOP OUBUF=400 OUCTL=5000 INBUF=3000 INCTL=1400 PAUSE /TO ASSEMBLE IOPACK -8- A program to copy an ASCII file with input extension .DA and call the Command Decoder for another I/O specification line after each copy might be: *200 START, CLA CLL CDF 00 /CALLING FIELD IS FIELD 0 CIF 10 /IOPACK RESIDES IN FIELD 1 JMS I (SETUP /SET UP THE I/O AND EVERYTHING 0401 /ASSUMED EXTENSION OF .DA EOFILE /USER SPECIFIED END-OF-FILE ROUTINE COPYLP, CIF 10 /IOPACK IN FIELD 1 JMS I (XXGET /GET A CHARACTER FROM INPUT FILES CIF 10 JMS I (XXPUT /PUT CHARACTER TO OUTPUT FILE JMP COPYLP /STAY IN COPY LOOP EOFILE, CIF 10 /IOPACK IN FIELD 1 JMS I (XXCLOSE /CLOSE THE OUTPUT FILE JMP START /ASK FOR MORE I/O SPECS OUBUF=400 OUCTL=5000 INBUF=3000 INCTL=1400 PAUSE /TO ASSEMBLE IOPACK -9- MAP C. G. Roby Jr. MAP prints out a core map listing of a string of binary files saved from assembly output of PAL8 or PAL12. When MAP is loaded it requests input and output files through the command decoder. The assumed input extension is .BN, there is no output extension. There are several switches which MAP recognizes: /F Print out the bit mapping lines only. That is, only lines with at least one bit set are printed. /Z Print out a bit map of those words which are not assigned. This is the complement of the assumed output and is useful for very large programs. /R Print out the ranges of either the assigned locations or the unassigned locations (depending on /Z). All inputs are read in and a core bit map is set up. The output consists of bit assignments from FIELD 0 to 7 and core locations from 0000 to 7777 within each field. The printout consists of a 5-digit address which is always a multiple of 100(8). For output to TTY:, this is followed by a carriage return and line feed; otherwise, it is followed by two spaces. Then the bit map for those 100(8) locations are printed out. Printout from /R are just ranges consisting of two 5-digit locations. -10- "LIST" PAGED PRETTY LISTER CLYDE G. ROBY JR. DEPARTMENT OF MEDICINE MEDICAL CENTER WEST VIRGINIA UNIVERSITY NOVEMBER 1970 DOCUMENTATION FILE LIST.DC ABSTRACT "LIST" MAKES PRETTY PAGED LISTINGS WITH OPTIONS TO LIST CERTAIN EDITOR PAGES, PLACE TITLE AT THE TOP OF EACH PAGE, FIXED OR VARIABLE TABS, OR LIST PAL8 OR PAL12 ASSEMBLY LISTINGS FROM TAPE. -11- USAGE SINCE "LIST" IS DESIGNED TO RUN ON THE PS/8 OR OS/8 SYSTEM, THE USER MUST TYPE IN "R LIST" IN RESPONSE TO THE "." TYPED OUT BY THE KEYBOARD MONITOR. THE COMMAND DECODER THEN ASKS FOR AN OUTPUT FILE AND UP TO NINE INPUT FILES. IF NO OUTPUT FILE IS GIVEN, THE OUTPUT FILE IS ASSUMED TO BE THE TELETYPE (TTY:). AN EXAMPLE OF LOADING "LIST" MAY BE: .R LIST ENTER PROGRAM NAME *LIST.LS /A INPUT FILE IS DSK:LIST.LS OUTPUT IS ASSUMED (TTY:) OPTION CHAR IS "A" THE STARTING ADDRESS OF "LIST" ONCE IT HAS BEEN LOADED IS 200. WHEN PS/8 OR OS/8 LOADS "LIST", IT IS AUTOMATICALLY STARTED AT THIS ADDRESS. AT END OF EXECUTION, "LIST" ASKS THE USER FOR ANOTHER LISTING THROUGH THE COMMAND DECODER (ASKING WITH "*"). THE STANDARD LISTING FORMAT FOR LIST CONSISTS OF A TITLE LINE, A BLANK LINE, AND THE BODY OF THE PAGE. THE TITLE LINE CONTAINS 'PAGE#' FOLLOWED BY THE PAGE NUMBER FOLLOWED BY '.' FOLLOWED BY THE PART OF PAGE# FOLLOWED BY THE USER ENTERED TITLE FOLLOWED BY THE CURRENT DATE. CERTAIN OPTION SWITCHES MAY OVERRIDE THE STANDARD LISTING FORMAT. THE ASSUMED OUTPUT FILE IS TTY: IF NONE IS GIVEN. BECAUSE TTY IS OUTPUT, A PAGE BREAK [------] OCCURS AT END OF PAGES FOR SEPARATION. HOWEVER, IF THE OUTPUT DEVICE IS NOT THE TTY, THEN NO PAGE BREAK IS GENERATED. IF OUTPUT IS NOT TO THE TTY:, THE NAME OF THE OUTPUT FILE WILL BE GENERATED IN LARGE BLOCK CHARACTERS. IF NO NAME IS GIVEN, ASTERISKS (*) WILL BE PRINTED INSTEAD. THE CURRENT DATE WILL ALSO BE PRINTED IN BLOCK LETTERS. THE NAME WILL BE PRINTED BOTH AT THE BEGINNING AND END OF THE LISTING. -12- DESCRIPTION COMMANDS TO LIST ARE IN THE FORM OF OPTION SWITCHES IN THE COMMAND LIST. /A /A MUST BE USED IF INPUT IS A PAL8 OR PAL12 ASSEMBLY LISTING BECAUSE OF THE ASSEMBLERS' OUTPUT METHODS. THE /N SWITCH IS AUTOMATICALLY SET. /B DO NOT OUTPUT PAGE BREAK [------]. /C CHECK FOR CHARACTER OVERFLOW OF A LINE. A CARRIAGE RETURN, LINE FEED IS OUTPUT AT THE END OF 72 CHARS TO END AN OUTPUT LINE. THE REST OF THE LINE IS PRINTED ON THE NEXT LINE. /F REQUESTS FIXED TABS (ASSUMED FIXED EVERY 8 COLUMNS). /I INSTEAD OF THE STANDARD PAGE NUMBER FORMAT OF PP.NN (PAGE NUMBER, PART OF EDITOR PAGE), EACH OUTPUT PAGE IS AN INTEGER. /M SETS PAGE SIZE FOR DR. W. H. MORAN'S ADH PROGRAM. /N THE TITLE LINE IS NOT REQUESTED. IT IS NOT PRINTED AT THE TOP OF THE PAGE WITH THE "PAGE#" EITHER. /P REQUESTS PAGE LIMITS TO BE LISTED. A MINUS SIGN SEPARATES INCLUSIVE PAGES. A COMMA OR SPACE SEPARATES INDIVIDUAL PAGE NUMBERS. TO LIST PAGES 3, 5, AND 10, ONE ENTERS "3,5,10". TO LIST PAGES 3, 4, AND 5, ONE ENTERS "3-5". /T REQUESTS A LEFT TAB MARGIN SETTING. FOR EXAMPLE, IF ONE ENTERED 10 AS THE LEFT TAB MARGIN SETTING, THEN ALL LINES WOULD SKIP TO COLUMN 10 BEFORE BEING PRINTED. /V REQUESTS VARIABLE TABS (ASSUMED 1,9,17,25...). /X EXPAND TABS FOR LISTING FROM PAL12 WITH /X OPTION. SET UP VARIABLE TAB TABLE TO (1, 6, 14, 22, 30, 38, 46, 54, 62, 70, 78). THIS SWITCH AUTOMATICALLY SETS THE /A SWITCH AND THE /N SWITCH. -13- EXAMPLES: 1. FOR A PAL8 OUTPUT LISTING FROM TAPE TO TELETYPE. *TTY: (line feed) AP 0. -21-