.NONUMBER .LM 0 ^PY^- .PAGE SIZE 58,85 .LM 10 .RM 75 .NO FILL .NO JUSTIFY # .SKIP 5 .CENTER The RSX Multi-Tasker .CENTER October, 1986 .SKIP .CENTER ^IS144^G"All the News that Fits, We Print"^IS204^G .SKIP .CENTER Fine Realtime Commentary Since 1975 .SKIP 6 .CENTER ^&Table of Contents\& .SKIP 2 .TAB STOPS 60 The Editor's Corner RSX-1 Fun Things to Do with Your Spare Time RSX-1 Submitting Articles to the Multi-Tasker RSX-2 Answer to Last Month's Quiz RSX-2 And That's The Way Things Are RSX-2 The Bag of Tricks: MACRO-11 RSX-3 Printing Files on VT100 Attached Printers RSX-5 RSX Brain Teaser RSX-11 .JUSTIFY .FILL .PAGE .COMMENT .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT The Editor's Corner .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT # .SKIP 5 .AUTOPARAGRAPH .CENTER ^&The Editor's Corner\& .SKIP .CENTER Bruce R. Mitchell .SKIP 2 This is a rather thin issue, ladies and gentlemen. What we have is of high quality, but look here, folks: I know that there are those of you out there who read this journal, because my submitters get letters regarding their articles. So why don't you please send the poor Multi-Tasker editor something too? .SKIP .CENTER Submit! .CENTER Submit! In this issue we have three articles. One is a comment on a previous Bag of Tricks which the editor found most enlightening. The next is a really neat command file which saves a lot of running to and from the printer room (if you can scrounge a spare printer for your terminal). And finally, a puzzle for all of the die-hard RSX hackers. Without further delay, let's drop this month's (guest) editorial bombshell on the heathen. .TEST PAGE 5 .SKIP 2 .CENTER ----- Fun Things to Do with Your Spare Time ----- "Spare time" can reasonably be defined as periods when it's not too important if you waste a few hours to a few days doing nothing useful. There are lots of fun things to do in your spare time. Fishing, hacking the Exec, laying out in the sun, tracking down parity errors and other such activities come immediately to mind. It is good to see that DEC feels the PDP-11 user community has much spare time. They have thoughtfully provided us with an amusing spare time activity: Trying to get support for PDP-11 products. 'What is this,' you say? 'This is not an amusing spare time activity. This is Important Business for me!' Perhaps so. It must not be perceived as Important Business by DEC, however, as their sales force seems to have relegated PDP-11s to a spare time activity. Viz.: When the sales force is not busy selling VAXes, they may return your call. They may, from time to time, send you literature. On extraordinary occasions, they may read it themselves. And, if you are a large account, they may stop by occasionally to say 'hello', drop off literature on the newest VAXes, and drink a nice lunch with someone from Purchasing. Wouldn't it be nice if DEC had one sales person per office who was paid on commission, and who sold nothing but PDP-11 products? Wouldn't it be great if DEC took that spare time activity and made it turn a real profit for them? And wouldn't it be just particularly fine if they took that profit and reinvested it in PDP-11s, where it came from? .SKIP .INDENT 35 Yr obd't servant, .INDENT 35 ^IS144^GJustin L. Hewser^IS204^G .TEST PAGE 5 .SKIP 2 .CENTER ----- Submitting Articles to the Multi-Tasker ----- Please submit machine readable media if possible. RX01/RX02 diskette or 800/1600 BPI 9 channel magtape are best. Any format is acceptable except ROLLIN, PRESRV or VMS backup. BRU and DOS FLX formats are well-liked by the Editor's tape drive. Submissions which aren't machine readable take longer to get into print. The editor is lazy and types mass quantities only once a month when progress reports are due. If you preformat a submission in RUNOFF format, please set left margin 10, right margin 75, and when changing margins use incremental changes rather than absolute. The editor will bless you for the consideration. Send all submissions to: .SKIP .NO FILL .NO JUSTIFY Bruce R. Mitchell Machine Intelligence and Industrial Magic PO Box 816 Byron, MN 55920 .JUSTIFY .FILL .TEST PAGE 5 .SKIP 2 .CENTER ----- Answer to Last Month's Quiz ----- The quiz was inadvertently left out. Sorry. .TEST PAGE 5 .SKIP 2 .CENTER ----- And That's The Way Things Are ----- _... this month in Pool Lowbegone, where all the variable typing is strong, all the front panels are good-looking, and all the management is paid above average. .COMMENT .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT The Bag of Tricks .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT .TEST PAGE 15 .SKIP 6 .CENTER ^&The Bag of Tricks: MACRO-11\& .SKIP .CENTER Rob Brown .CENTER G. Michaels Consulting, Ltd. .CENTER Edmonton, Alberta, Canada .SKIP ^IS144^GI wasn't quite sure about the veracity of this response when I received this letter. I put it into storage to be investigated "later". We all know how that goes, right? I finally got around to checking it out, and found that the Taskbuilder manual's Appendix B is somewhat misleading about the task header variable part unless you read it carefully. Because this area is loaded dynamically, the "register contents" at task load are correct, and as stated. Herewith follows a (late) response to a previous "Bag of Tricks" on the GTSK$ directive, and my compliments to Rob for his knowledge of RSX. --- The Editor^IS204^G .PAGE # .PAGE .COMMENT .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT Printing Files on VT100 Attached Printers .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT .TEST PAGE 15 .SKIP 6 .CENTER ^&Printing Files on VT100 Attached Printers\& .SKIP .CENTER Jim Bostwick .CENTER Cargill, Inc. .CENTER Wayzata, MN .SKIP The following command file will print multiple files to the printer port of a VTxxx terminal. It is very handy for printing over a modem setup, which is why VTP was written in the first place. VTP takes a command of the form: "@VTP file[,file...]", and prints each file thru the printer port of the invoking terminal. A banner page (of sorts) is printed before each file, and formfeeds are inserted as necessary to avoid printing over perfs. VTP also determines the characteristics of the input file, and adjusts its output to handle the three "normal" types of carriage control: FORTRAN, CRLF, and NONE. The file's record length of is also determined, and the terminal buffer width adjusted to accomodate 132-column files. Since the printer I use at home is of the "dumb" variety, the subject of dynamic printer setup has not been addressed. It would be easy to add such features, however. For example, if a LA50 is being used, it might be nice to switch between 10cpi and 16.5cpi based on record length. VTP has gone through several revisions; a classic case of "creeping elegance". In the process, a number of INDirect tricks have found their way into the code. So, even if you don't need printer-port support, you may find something of use for your indirect application. Note: If you keep VTP.CMD in the INDirect "default directory" on your system, you won't have to keep multiple copies of it around. .SKIP 3 .NO FILL .NO JUSTIFY _.; VTP.CMD - print on VTxxx printer port _.; JMB 20-JUL-1986 _.; 7-AUG-1986 _.; 8-AUG-1986 _.; _.; This command file will kick a VTxxx CRT with printer port into _.; 'printer controller' mode, print the file(s) in P0, separated _.; by a formfeed, then restore CRT mode. It prints sort of a _.; banner page before each file, keeps line count for formfeeds, _.; and handles (mostly) the three carriage-control file types. _.; _.; 20-JUL-1986 JMB - Complete rewrite of earlier version. _.; 7-AUG-1986 JMB - Determine file type from after _.; opening file. _.; Dispatch proper routine to handle common _.; carriage control types. _.; 8-AUG-1986 JMB - Fix buffer width settings _.; .enable substitution .enable quiet .setn oldwid ; save input buffer setting .setn lpp 66. ; lines per page .setn escn 33 .sets esc "'escn%v'" ; escape char _.; .sets esc "|" ; pseudo-escape char for debug .sets pon esc+"[5i" ; turn printer port on .sets poff esc+"[4i" ; turn printer port off .setn ffn 14 .sets ff "'lfn%v'" ; a .setn lfn 12 .sets lf "'lfn%v'" ; a .setn crn 15 .sets cr "'crn%V'" ; a .sets ftnctl " 01+$" ; FTN carriage control bytes _.; _.; If input params (@VTP file(s)), use them, else _.; prompt for some. _.; .sets cmd p1 .if ne 0 .goto gotit .asks cmd "file(s) to print:" .on error .goto finis _.gotit: _.; _.; Open up TI: and issue the switch-to-printer escape sequence. _.; .open _#0 TI: .data _#0 'pon' _.; _.; Now parse off and process file names. _.; _.Floop: .test cmd .if eq 0 .goto finis .parse cmd "," fnam cmd .test cmd "[" ; pick up partial UIC? .if eq 0 .goto L10 ; br if no .parse cmd "," fnam2 cmd ; get rest .sets fnam fnam+fnam2 ; merge full filespec _.L10: .testfile 'fnam' .if ne 1 .goto skipit ; no such file - skip it .openr _#1 '' ; open file for read .setn lc 0 ; lc is line count _.; _.; Determine file's carriage control type, and set up 'crproc' _.; to point at appropriate handler. _.; .gosub filtyp _.; _.; put out poor_man's banner _.; .gosub banner _.; _.; now, copy file from unit 1 to unit 0 _.; _.inner: .read _#1 line .ift .goto done _.; _.; Dispatch to carriage control handler. Note - this technique _.; avoids considerable overhead for each print line. _.; .goto 'crproc' _.; _.; Process files with FORTRAN style carriage control. _.; The first byte is a carriage control byte, remainder _.; is print line. _.; _.crftn: .sets crbyte line[1:1] .test line .setn len - 1 .sets line line[2:LEN] .test ftnctl crbyte ; which control char? .goto ftn'' ; dispatch _.ftn2: .; it's a 0 - double space .if lpp-lc lt 2 .goto ftn3 ; if no room, do formfeed .data _#0 .goto crdone _.ftn3: .; its a 1 - formfeed .data _#0 'ff' .setn lc 0 ; reset line count .; fall thru _.ftn4: .; a "+" - overprint .; we really can't handle this - treat as single space .; fall thru _.ftn5: .; a "$" - 'prompting' .; we can't handle this either - treat as single space .; fall thru _.ftn1: .; it is a space, we're corpulent after the fashion of a .; rodent .goto crdone _.; _.; Process files with cr=NONE. This implies imbedded carriage _.; control. Since INDIRECT appends to each DATA line, _.; we must remove one pair from the file to prevent double-spaced _.; output. _.; _.; Parse out the first and first in line. _.; Assume multiple are for intentional multiple _.; spacing, and leave them alone. _.; _.crnone: .; strip out first .parse line lf L1 L2 .sets line L1+L2 ; re-assemble line .; strip out first .parse line cr L1 L2 .sets line L1+L2 ; re-assemble line .goto crdone _.crcrlf: .goto crdone .; fd.crlf says put out a CR-LF with each print line - .; which is exactly what INDIRECT does naturally! _.; _.; Common return from carriage control processing. _.; Output the line (finally), and bump line counter. _.; Output formfeed when appropriate. Note additional _.; test for embedded formfeeds, which simply reset _.; line counter. _.; _.crdone: .data _#0 'line' .test line ff .if ne 0 .goto inn20 ; yes - br .inc lc ; bump line counter .if lc lt lpp .goto inner ; test for end of page .data _#0 'ff' ; kick out new page _.inn20: .setn lc 0 ; reset line counter .goto inner ; go get next line _.done: .close _#1 ; done with input file _.; _.; The next data statement handles an oddity of my printer. If _.; it doesn't see a CR, it leaves the carriage sitting out on the _.; line - and starts the next line there! So, I dump a blank line _.; to ensure carriage at column 1 for next print job. _.; .data _#0 .data _#0 'ff' _.skipit: .goto Floop ; go parse off next file _.finis: .data _#0 'poff' ; restore to CRT mode .close _#0 _.; _.; Restore original terminal width, and exit _.; SET /BUF=TI:'oldwid'. .exit _.; _.; Subroutines follow... _.; _.; _.; Subroutine to put out poor_man's banner _.; _.banner: .setn bc 10. .gosub bannam ; put out 10 banner lines .setn bc 40. .gosub banln ; now 40 blank lines .setn bc 10. .gosub bannam ; another 10 banner lines .data _#0 'ff' .return _.; _.; Subroutine to output pseudo-banner lines, each containing _.; the file name. Note that filename is from , so don't _.; open another file before outputting the banner. _.; _.bannam: .data _#0 <<<<<<<<<<<<<<<<< '' >>>>>>>>>>>>>>>>> .dec bc .if bc gt 0 .goto bannam .return _.; _.; Subroutine to output 'bc' blank lines _.; _.banln: .data _#0 .dec bc .if bc gt 0 .goto banln .return _.; _.; Subroutine to determine file's carriage control type, and set _.; up a pointer to an appropriate handler. Record length also _.; determined, used to set terminal buffer as appropriate. _.; _.filtyp: .parse "," fixvar carctl arsize rest .; .; fixvar = 1 -> fixed length record .; = 2 -> variable length record .; .; carctl = 0 -> none (embedded carriage ctrl) .; = 1 -> fd.ftn (FORTRAN carriage ctrl) .; = 2 -> fd.cr (CRLF carriage ctrl) .; .; rsize = record size (or max record size) .; .setn rsize 'arsize'. .sets crproc "crnone:" ; assume embedded .if carctl eq "1" .sets crproc "crftn:" .if carctl eq "2" .sets crproc "crcrlf:" _.; _.; See if we need to set buffer to 132, and do so _.; .if oldwid eq 132. .goto fil10 .if rsize le 80. .goto fil10 _.; _.; NOTE: "SET /BUF" won't work so long as a file is open to TI: _.; .close _#0 SET /BUF=TI:132. .open _#0 TI: _.fil10: .return .FILL .JUSTIFY .COMMENT .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT RSX Brain Teaser .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT .TEST PAGE 15 .SKIP 6 .CENTER ^&RSX Brain Teaser\& .SKIP ^IS144^GThe following puzzle appeared, as though by magic, on the Editor's desk one day. It contains no less than 60 words, famous names, abbreviations, assembly mnemonics, directives, utility task names and other phrases of interest to RSX users. (No driver names.) The Editor has a list of all of the above that were designed into the puzzle, and also has a little something for the first reader to come up with all of them - or for the best attempt. Results will be published in the Multi-Tasker in two months, along with the official solution and any which may have crept in unnoticed. Any takers? --- The Editor^IS204^G .SKIP 4 .CENTER L E S S M I L C D E F L Y E A P .SKIP .CENTER E P E V I T U C E X E O D C R L .SKIP .CENTER X A V M S O S R E S U L P M S A .SKIP .CENTER A T L S I H B R O R E J E A D Q .SKIP .CENTER V G M U L T I T A S K I N G R E .SKIP .CENTER L I K R A M L D A L E M E I A S .SKIP .CENTER I S S U C E D A E D P D P C Z T .SKIP .CENTER S L I N D A O L E B R H O X I M .SKIP .CENTER T U S E V I T C E R I D D S W R .SKIP .CENTER S N B E Q R U Z R T N A I R B T .SKIP .CENTER R S U M S S E M G I B N C D E C