.NONUMBER .LM 0 ^PY^- .PAGE SIZE 58,85 .LM 10 .RM 75 .NO FILL .NO JUSTIFY # .SKIP 5 ^IC0000^IS328^GThe RSX Multi-Tasker^IS204^IC1000^G .SKIP ^IC0000^IS328^GNovember, 1987^IS204^IC1000^G .SKIP .CENTER ^IS144^G"Stand Up, Ed"^IS204^G .SKIP .CENTER Fine Realtime Commentary Since 1975 .SKIP 6 .CENTER ^&Table of Contents\& .SKIP 2 .TAB STOPS 65 Food for Thought RSX-1 The Editor's Corner RSX-1 Productivity and Relative Value RSX-2 Submitting Articles to the Multi-Tasker RSX-4 And That's The Way Things Are RSX-4 The Bag of Tricks: MACRO-11 RSX-5 Bulletin Board Notes RSX-6 Initializing DCL with Node Specific Prompts RSX-6 PDP-11 Performance Benchmark RSX-8 SIG Business Update RSX-9 VT220 Downline Loadable Character Sets RSX-9 Weird RSX Science RSX-18 .JUSTIFY .FILL .SKIP 14 .LM +5 .RM -5 Opinions expressed in the editorial section of the Multi-Tasker are those of the Editor. They do not represent the official position of the RSX SIG or that of DECUS leadership in general. .LM -5 .RM +5 .PAGE .COMMENT .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT Food for Thought .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT # .SKIP 7 .AUTOPARAGRAPH #######################^IC0000^IS328^GFood for Thought^IS204^IC1000^G .SKIP "Another difference between murder and war is when and where they take place. Murder takes place in dark alleys and behind closed doors and when nobody is looking. War takes place on battlefields, out in the open, with newspaper reporters and photographers and even television cameras to record it. Obviously there is something sneaky about murder, as contrasted with war." .SKIP 2 .INDENT 30 ^IS144^G- Richard Armour^IS204^G .INDENT 30 .RM +10 ^IC0000^IS144^G##It All Started with Stones and Clubs^IS204^IC1000^G .RM -10 .COMMENT .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT The Editor's Corner .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT .SKIP 9 ######################^IC0000^IS328^GThe Editor's Corner^IS204^IC1000^G .SKIP .CENTER Bruce R. Mitchell .SKIP Have we got problems up here at the Multi-Tasker offices. What with the polar bears migrating down into Minnesota already, the shower delivering ice cubes again, and the snowmobile not working so I can't get to work, what else can go wrong? Uff da! (= Scandinavian "Oy!") Copy for the September issue got to the DECUS offices just one day too late to be printed in the September issue. OK, says I, we'll print September and October combined in one big issue. The October issue hit the DECUS offices one day later than expected, but still in time. Just one little problem, though - everybody else wanted to publish in that issue. So the October issue was trimmed. September made it into the October issue, at least. I hope so - I have no way of knowing at this writing. So now - if nothing else goes wrong - I hope you are now reading the combined October and November issues. Well, it's all good reading material, and worth waiting for. Got your symposium registration in yet? There will be more RSX activity than you can shake a stick at in Anaheim. Shucks, there'll be more RSX activity than you can shake a stick at ^&anywhere\&. Just a few of the sessions to be presented include: .SKIP .LITERAL o##Advanced Device Driver Techniques o##Digital's Lemons o##Justin L. Hewser's Big Book of System Optimization o##Overlaying: Fast, Quick and Easy o##RSX to VMS Communication Methods o##Running M-Plus on 18-Bit Addressing PDP-11s o##VAX Coprocessor/RSX Update .END LITERAL .SKIP plus the usual RSX sponsored fun and games, including the time-hallowed visit to the VMS Magic session. ^IS144^G(Anything we do more than twice is a time-hallowed tradition. --#The#Editor.)^IS204^G. The Spring 1987 Proceedings recently arrived by dogsled at the well-insulated Multi-Tasker offices. After reading the preface a few times, the Editor would like to serve up a few reactionary comments for your delectation. .TEST PAGE 5 .SKIP 2 .CENTER ----- Productivity and Relative Value ----- Productivity is a big buzzword these days. Extremely clever MBA managers, as well as a slew of writers who have never heard of Frederick W. Taylor and couldn't define a "therblig" if their lives depended on it, have suddenly awakened to the fact that Productivity is a Good Thing. And it should be Encouraged. Well! Somebody above line supervisor level finally realized that making product and getting it out the door is the name of the game. On a seemingly unrelated topic, I now hear that the constituency of the "New DECUS" is not that of the "Old DECUS", and that the "New DECUS" has different needs and different directions to take. The "Old DECUS" membership of technical, laboratory and industrial programmers has lost its mandate, and - I am so much as told - has no business in the new Society, composed of middle managers and supervisors. For a moment, let's discount the results of the recent DECUS Board election as a rebuttal. Instead, let me examine this "interesting" idea from the standpoint of productivity. I shall apply the concept of relative value in this situation. As Robert Heinlein says, given dough and fresh apples, one can make a pie. A professional chef, given the same materials, can create a superior confection of higher value. Conversely, incompetent use can transform the already valuable raw materials into an inedible mess. This is all to say that labor is not a uniform product. Some types of labor are more valuable than other types of labor. It should be obvious that "productive" people are valuable to a company. Likewise, it should be obvious that superior productivity allows a company to compete more effectively in the marketplace. Companies which do not compete effectively in the marketplace do not survive. Therefore, from a company's point of view, the value of an employee to the company is proportional to the "productivity" of that employee. Given two employees of a company - a production programmer and a middle manager - who contributes more? The production programmer writes programs which control machines. The machines take raw materials, add energy and time, and create valuable products. Without the production programmer, those products either would not exist or would be available in lesser quantities, costing more. Basic microeconomics. The paper-shuffling MBA manager, on the other hand, contributes little to the production capacity of the company. Whether the manager is there or not has small effect on production. Take away the manager, the product still goes out the door. The corollary is - or should be - obvious. It may be argued that management is necessary to sell the product, balance the books, and run the show. A limited amount of management is necessary. Good enough; I'll argue it from that point of view as well. Assume that the company has sufficient programmer and management capacity to run at its current level. What is the incremental effect? Adding one production programmer generally has a positive effect on cash flow. Adding one manager doesn't. On that basis, which is more valuable to the company? Is it the MBA who thinks a CNC mill is used for grinding his $5 morning cup of Jamaica Blue Mountain coffee? Or is it the production programmer who forces those greasy, recalcitrant, stupid robots to weld auto frames? Assume that attending DECUS symposia makes one more productive in one's job. Which person should be reading the newsletters and attending symposia? The reason for Japan, Inc.'s success? They produce. A lot. They do it cheaply and well. And much of that is true because they keep management out of the way of production. There are plenty of nice professional management organizations in the good 'ol US of A where managers can go to drink a nice lunch in a nice air-conditioned meeting room and listen to other managers talk about management. Let them stay there. DECUS is our turf. I mean the "Old DECUS", us obsolete old farts who program computers for a living and think MBO is just another damn TLA and a form to fill out. DECUS was once a productive society of productive people. And we're going to make it one again. As it is said: "Push. Pull. Or get out of the way." Because there's a storm rising. .TEST PAGE 5 .SKIP 2 .CENTER ----- Submitting Articles to the Multi-Tasker ----- Please submit machine readable media. RX01/2, RX50 and 9 channel 800/1600 BPI magtape are OK. Almost any medium I can't read I can get converted; don't let that stop you. All RSX volume formats are acceptable, but I ^&can't\& read VMS Backup or ODS-2 stuff. You can also submit articles through the RSX bulletin board system at (612) 777-7664. Send them via MAIL to username MULTITASKER. Submissions which aren't machine readable may 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, please set page size 58,80; left margin 10; right margin 75; and, when changing margins, use incremental changes rather than absolute. The editor blesses you for the consideration. Send your articles and other submissions to the luxurious Multi-Tasker offices: .SKIP .NO FILL .NO JUSTIFY Bruce R. Mitchell Machine Intelligence and Industrial Magic PO Box 816 Byron, MN 55920 (507)#775-6268 .JUSTIFY .FILL .TEST PAGE 5 .SKIP 2 .CENTER ----- And That's The Way Things Are ----- _... this month in Pool Lowbegone, where the drink in the SIG suite is strong, the RSX SIG's Fall Symposium presentation to VMS will be handsome, and the tendency of RSX users toward productive work is above average. .COMMENT .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT The Bag of Tricks .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT .TEST PAGE 15 .SKIP 6 ##############^IC0000^IS328^GThe Bag of Tricks: MACRO-11^IS204^IC1000^G .SKIP .CENTER Richard Neitzel .CENTER 312 Laveta Pass .CENTER Golden, CO###80401 .SKIP In this month's article we examine the problem of counting bits set in a word. There are times when one needs to know how many bits in a word are set or clear. For example, one may be checking a disk's bitmap to see if there is enough free space left. The numeric value of the word is useless to us, and checking each individual bit is clumsy and time consuming. There is a simple algorithm that gives the correct value. It is based on the fact that the logical AND of a number and that number less one clears the lowest set bit in the number. Using the ANDed result as the next value and repeating the process until zero is reached yields the number of set bits. The implementation in Macro is simple, as follows: .SKIP 2 .NO FILL .NO JUSTIFY ; Input: R0 - Integer to be bit counted ; ; Output: R2 - Bit set count ; ; Register dispositions: R0, R1, R2 destroyed ... code precedes ... CLR R2 ; Zero the bit set count 1$: MOV R0, R1 ; Get value to decrement DEC R1 ; Minus one BIT R1, R0 ; AND them together INC R2 ; Increment bit set count TST R0 ; Zero? BNE 1$ ; If not, go try it again ... code continues ... .JUSTIFY .FILL .SKIP And it's quite equally simple when done in Fortran: .SKIP 2 .NO FILL .NO JUSTIFY BIT = 0 ! Zero the bit counter 200 TSTBLK = IAND (TSTBLK,TSTBLK-1) ! .and. the 2 values BIT = BIT + 1 ! Increment bit set count IF (TSTBLK .NE. 0) GOTO 200 ! If result not 0 do more .FILL .JUSTIFY .SKIP Obviously, if the initial value may be zero, one should test for this before starting to avoid incorrect results. .COMMENT .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT Bulletin Board Notes .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT .TEST PAGE 15 .SKIP 6 ####################^IC0000^IS328^GBulletin Board Notes^IS204^IC1000^G .SKIP The BBS lost it big in mid-August; the RK711 disk controller went down in flames, taking the system disks with it. At this writing the BBS management is acquiring a new controller, and hopes that it will be up and available in early October. As of mid-September, RSX MAIL and Kermit are available. Conferencing is unavailable but is a high priority. A Vadic 3451P modem was installed on the system in early September, so the line now supports Vadic as well as Bell protocol. The system still needs hardware. Anything. The biggest needs right now are a couple 80 Mb SMD winchesters and a 2400 baud modem. But anything and everything goes, so pack up all your disused treasure and ship it off to the BBS management c/o your friendly Multi-Tasker editor at the address above. The BBS number: 1-612-SPR-PONG / 1-612-777-7664. This line is autobaud 110 - 1200 baud. To request an account, log in with account name ACCOUNT, password REQUEST. .COMMENT .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT Initializing DCL with Node Specific Prompts .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT .TEST PAGE 15 .SKIP 6 ########^IC0000^IS328^GInitializing DCL with Node Specific Prompts^IS204^IC1000^G .SKIP .CENTER Wayne Steffen .CENTER Cap Gemini America .CENTER 134 Cedar Avenue .CENTER Stirling, NJ###07890 .SKIP We are using DECserver 200s to communicate with several PDP-11s. I am the system manager, so I pop from one PDP to another quite often. I would often become confused as to which system I was on, and enter the right command on the wrong system at the wrong time, such as dismounting the active source disk while the development staff was rebuilding the application system. I found some help by changing the DCL prompt. Those who have learned MCR and continue to refuse to upgrade may leave by the rear exits at this time (most of the programmers at this site). I moved the code in STARTUP.CMD that initializes DCL to occur after the DECnet startup code. I also added the /DPR (default prompt) and /CPR (control-C prompt) switches to my DCL initialization command. The argument to these prompt switches is built from the INDirect special symbol , which receives the executor node name: .SKIP 2 /DPR="<15><12>'' $ " .BREAK /CPR="<15><12>'' DCL $ " .SKIP Here is the command sequence as it appears in STARTUP.CMD after the DECnet NCP SET SYSTEM command: .SKIP 2 .NO FILL .NO JUSTIFY _.ENABLE SUBSTITUTION ; ; Enable DCL CLI ; _.SETS NOD CLI /INIT=DCL/CPR="<15><12>'NOD' DCL $ "/DPR="<15><12>'NOD' $ " .JUSTIFY .FILL .SKIP 2 and here is the command line as it is actually executed on node "DLCC" at system startup time: .SKIP 2 CLI /INIT=DCL/CPR="<15><12>DLCC DCL $ "/DPR="<15><12>DLCC $ " .SKIP When the system is released for use after STARTUP, DCL prompts with the standard sequence: .SKIP DLCC $ .SKIP and, in reponse to a control-C, prompts: .SKIP DLCC DCL $ .SKIP with a space following the $ character in both cases. The next step is to set your CLI to DCL. The MCR command SET /DCL=TI: does this for your terminal, TI: . DCL as the default CLI can be specified in the account file as well, then the user's terminal is automatically set to DCL when the user logs on. Now, by typing a carriage return or control-C, I can see which node I am on before I do something someone may regret. .COMMENT .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT PDP-11 Performance Benchmark .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT .TEST PAGE 15 .SKIP 6 ##############^IC0000^IS328^GPDP-11 Performance Benchmark^IS204^IC1000^G .SKIP .CENTER Richard Neitzel .CENTER 312 Laveta Pass .CENTER Golden, CO###80401 .SKIP Some interesting benchmark numbers from the July 87 issue of BYTE caught my eye recently. I decided that I would try their tests on my 11/73. The results show (at least to me) what a good engine that CPU is. All the tests where coded at closely as possible to BYTE's C code with the Fortran-77 compiler. I didn't bother with all the tests, only those that I could steal time from productive work to write. Here are the results, with the BYTE systems included. All times are in seconds with precision to three places. .SKIP 2 .NO FILL .NO JUSTIFY .TEST PAGE 17 Test Recursive Float Sieve of Savage Fibonacci Eratosthenes Iterations 100 10000 100 25000 ----------------------------------------------------------------- AT, 8 MHz 950 116 26.7 1100 with FPU 121 9.7 25.3 38.3 Deskpro 386 3.1 5.4 6.0 35.1 Mac SE 264 230 64.7 1880 16 MHz w/FPU 71.6 4.2 14.9 8.8 Arete 1100 70.2 2.9 12.8 24.8 11/73 5.0 3.5 58.2 106 .JUSTIFY .FILL .SKIP ^IS144^GWith minor tweaks (/TR:NONE, PRI=125) and an 11/83 or /84, I believe it could run at least twice as fast. Anybody care to try it? #--#The#Editor.^IS204^G .COMMENT .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT SIG Business Update .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT .TEST PAGE 15 .SKIP 6 ####################^IC0000^IS328^GSIG Business Update^IS204^IC1000^G .SKIP In a conference held via the DCS computer system, the RSX SIG Executive Committee, meeting ^IS144^Gad hoc^IS204^G, created the position of SIG Vice-Chair. There is no precedent for creation of such a position. It was decided that creation of the position required approval of a majority of elected positions on the SIG Executive Committee. In votes taken via DCS and tallied 2 September, the following affirmative votes were cast: .SKIP 27-Aug#14:34#EST, Robert Uleski; 28-Aug#12:14#EST, Bruce Mitchell; 29-Aug#18:54#EST, Denny Walthers; 30-Aug#23:14#EST, Ed Cetron; 2-Sep#16:19#EST, Gary Maxwell. No dissenting votes were cast. The SIG By-laws will be amended to reflect creation of this position and the responsibilities pertaining to it. Reported by acting recorder for the SIG Executive Committee, Bruce R. Mitchell. .COMMENT .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT VT220 Downline Loadable Character Sets .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT .TEST PAGE 15 .SKIP 6 #########^IC0000^IS328^GVT220 Downline Loadable Character Sets^IS204^IC1000^G .SKIP .CENTER K. F. Uhland .CENTER Scientific Micro Systems .CENTER 339 North Bernardo Avenue .CENTER Mountain View, CA###94039-7777 .SKIP The documentation set shipped with a VT220 has a phenomenal dearth of information with respect to programming the special features of the terminal, particularly in the area of defining a Downline Loadable Character Set (DLCS). The only programming information provided at all is the ^&VT220 Programmer Pocket Guide\& (DEC P/N EK-VT220-HR-001), hereafter referred to as the ^&Guide\&. On page 19 of the ^&Guide\& are the escape sequences for defining a DLCS as G0, G1, G2 or G3, and for then invoking one of these into GL (Graphics Left) or GR (Graphics Right). On pages 30 and 31 are the escape sequences for downline loading a character set. It is referred to as a "DRCS character set", but nowhere is "DRCS" defined. The (corrected) information on page 30 is reproduced below: .SKIP 2 .NO FILL .NO JUSTIFY ^&Down-Line Loading Characters (DRCS)\& You can down-line load your DRCS character set using the following DECDLD device control string format: DCS Pfn;Pcn;Pe;Pcms;Pw;Pt{DscsSxbp1;Sxbp2;...;Sxbpn ST Parameter descriptions are as follows: ^&DECDLD Parameter Characters\& ^&Parameter Name Description\& Pfn Font 0 and 1. number Pcn Starting Selects starting character in DRCS font character buffer to be loaded. number Pe Erase 0 = erase all characters in this DRCS control set 1 = erase only the characters that are being reloaded 2 = erase all characters in all DRCS sets (this font buffer number and other font buffer numbers) Pcms Character 0 = device default (7 x 10) matrix 1 = (not used) size 2 = 5 x 10 3 = 6 x 10 4 = 7 x 10 Pw Width 0 = device default (80 columns) attribute 1 = 80 column 2 = 132 column Pt Text / 0 = device default (text) full cell 1 = text 2 = full-cell (not used) Dscs defines the character set "name" for the soft font, and is used in the SCS (select character set) escape sequence. Sxbp1;Sxbp2;...;Sxbpn are sixel bit patterns (1 to 94 patterns) for the characters, separated by semicolons. Each sixel bit pattern has the form: S...S/...S where the first S...S represents the upper columns (sixels) of the DRCS character, the slash advances the sixel pattern to the lower columns of the DRCS character, and the second S...S represents the lower columns (sixels) of the DRCS. .JUSTIFY .FILL .SKIP Obviously there are some rather large holes in this description. First of all, the description of parameter ^IS144^GPcms^IS204^Gis defective; ^IS144^GPcms^IS204^G is missing from the first column and there is an extra blank line in the description. (Ed. note: Corrected in text above.) Second, the phrase "starting character number" for parameter ^IS144^GPcn^IS204^G leaves a number of unanswered questions. What number corresponds to which character? Is this character number decimal, hexadecimal or what? Third, and perhaps most important, just what the devil are "sixels", what is meant by "upper columns" and "lower columns" of a DRCS character, and how are all these things related? Finally, there are a few "minor details" like those spaces shown in the command format - are they or are they not to be included in the actual command sent to the terminal? The ^&Guide\& answers none of these questions. True, the following paragraph does appear on page 1 (which isn't numbered, by the way): .SKIP 2 .LM +5 .RM -5 This Pocket Guide provides a summary of the information contained in the VT220 Programmer's Reference Manual EK=VT220-RM which can be ordered from Digital. It is provided for use by people with a knowledge of computer programming to access the VT220 features. .LM -5 .RM +5 .SKIP However, the first entry in the Table of Contents is for page 2. One must accidentally stumble over this paragraph to learn even of the existence of the ^&Programmer's Reference Manual\& (hereafter referred to as the ^&Manual\&. The neophyte programmer would indeed be hard pressed to learn the terminal's secrets without access to the ^&Manual\&; even with it, not much more can be ascertained. One would require either tremendous insight or recourse to trial and error methods. The purpose of this article is to try to demystify the downline loading of characters and to provide additional information not available from DEC that this author discovered while experimenting with the terminal. The ^&Manual\& defines "DRCS" as "Dynamically Redefinable Character Set". The DRCS is composed of those characters whose decimal ASCII codes fall into the range 33 through 126, octal 41 through 176, or in other words, the printable characters ! through ~. These 94 characters are sequentially numbered 1 through 94 in the ^IS144^GPcn^IS204^G parameter of the DECDLD command. Thus, to downline load any of these characters, you subtract 32 from the ASCII code (both in decimal) and use the result* .FOOTNOTE 5 .LM 10 .RM 75 ----------------------------------------------------------------- .BREAK * As with all ANSI escape sequences, this parameter is the ASCII string representing the result, not the character whose ASCII code is the result. In other words, if we want to load a character for decimal ASCII code 92, the Pcn parameter is the two character ASCII string "60". !END FOOTNOTE as the ^IS144^GPcn^IS204^G parameter. The first sixel bit pattern, ^IS144^GSxbp1^IS204^G, loads this character. Each subsequent sixel bit pattern ^IS144^GSxbp2^IS204^G through ^IS144^GSxbpn^IS204^G loads characters ^IS144^GPcn^IS204^G+1 through ^IS144^GPcn^IS204^G+n-1. More about sixels later. VT220 characters occupy a 7 column by 10 row matrix. This matrix looks like the one shown in Figure 1. Characters are composed by "turning on" cells in the matrix, which produces bright spots in the corresponding locations on the screen. .SKIP 2 .TEST PAGE 23 .NO FILL .NO JUSTIFY +---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+ | | | | | | | | | | | | | | | | +---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+ | | | | | | | | | X | X | X | X | X | X | X | +---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+ | | | | | | | | | | X | | | | | X | +---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+ | | | | | | | | | | | X | | | | | +---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+ | | | | | | | | | | | | X | | | | +---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+ | | | | | | | | | | | X | | | | | +---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+ | | | | | | | | | | X | | | | | X | +---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+ | | | | | | | | | X | X | X | X | X | X | X | +---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+ | | | | | | | | | | | | | | | | +---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+ | | | | | | | | | | | | | | | | +---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+ Figure 1. Basic Matrix Figure 2. Pattern for Sigma .JUSTIFY .FILL .SKIP Let us define a special character, the capital Greek letter sigma. The layout for this character is shown in figure 2 above. The cells filled with "X" represent bright spots in the character pattern. To load this pattern into the VT220 via the DECDLD command, it must be converted to a series of ASCII characters. The first step in the conversion is to add two dummy rows at the bottom and then divide the 7 x 12 result into an upper half and a lower half. We also must sequentially number the rows in each group from top to bottom, starting with zero. See Figure 3 below: .SKIP 2 .TEST PAGE 27 .NO FILL .NO JUSTIFY +---+---+---+---+---+---+---+ U | | | | | | | | 0 p +---+---+---+---+---+---+---+ p | X | X | X | X | X | X | X | 1 e +---+---+---+---+---+---+---+ r | | X | | | | | X | 2 +---+---+---+---+---+---+---+ H | | | X | | | | | 3 a +---+---+---+---+---+---+---+ l | | | | X | | | | 4 f +---+---+---+---+---+---+---+ | | | X | | | | | 5 ------+---+---+---+---+---+---+---+------ | | X | | | | | X | 0 L +---+---+---+---+---+---+---+ o | X | X | X | X | X | X | X | 1 w +---+---+---+---+---+---+---+ e | | | | | | | | 2 r +---+---+---+---+---+---+---+ | | | | | | | | 3 H +---+---+---+---+---+---+---+ a | | | | | | | | 4 l +---+---+---+---+---+---+---+ f | | | | | | | | 5 +---+---+---+---+---+---+---+ .JUSTIFY .FILL .SKIP .CENTER Figure 3. Sixel Generation Matrix .SKIP The resulting character cell is divided into two individual character cells for the next step in the process. We now take each six-row column, rotate it clockwise by 90 degrees, and substitute a "1" for each illuminated dot, and a "0" for each dark one. The row numbers we assigned in the previous step are used to represent bit positions. The result is a set of fourteen six-bit binary numbers corresponding to illuminated and dark dots in the character cell. (By now you should be getting an idea of where the term "sixel" comes from.) .SKIP 2 .TEST PAGE 18 .NO FILL .NO JUSTIFY 5 4 3 2 1 0 5 4 3 2 1 0 +---+---+---+---+---+---+ | | | | | X | | 0 0 0 0 1 0 +---+---+---+---+---+---+ | | | | X | X | | 0 0 0 1 1 0 +---+---+---+---+---+---+ | X | | X | | X | | 1 0 1 0 1 0 +---+---+---+---+---+---+ | | X | | | X | | 0 1 0 0 1 0 +---+---+---+---+---+---+ | | | | | X | | 0 0 0 0 1 0 +---+---+---+---+---+---+ | | | | | X | | 0 0 0 0 1 0 +---+---+---+---+---+---+ | | | | X | X | | 0 0 0 1 1 0 +---+---+---+---+---+---+ .JUSTIFY .FILL .SKIP .CENTER Figure 4. Sixel Generation Matrix, Upper Half .SKIP 2 .TEST PAGE 18 .NO FILL .NO JUSTIFY 5 4 3 2 1 0 5 4 3 2 1 0 +---+---+---+---+---+---+ | | | | | X | | 0 0 0 0 1 0 +---+---+---+---+---+---+ | | | | X | X | | 0 0 0 1 1 0 +---+---+---+---+---+---+ | X | | X | | X | | 1 0 1 0 1 0 +---+---+---+---+---+---+ | | X | | | X | | 0 1 0 0 1 0 +---+---+---+---+---+---+ | | | | | X | | 0 0 0 0 1 0 +---+---+---+---+---+---+ | | | | | X | | 0 0 0 0 1 0 +---+---+---+---+---+---+ | | | | X | X | | 0 0 0 1 1 0 +---+---+---+---+---+---+ .JUSTIFY .FILL .SKIP .CENTER Figure 6. Sixel Generation Matrix, Lower Half .SKIP At this point the process is almost done. The next step is to add a binary 111111, octal 77, to each of these six-bit numbers. The result of each addition is interpreted as an ASCII code. .SKIP 2 .TEST PAGE 9 .NO FILL .NO JUSTIFY 000010 + 111111 = 1000001 = A 000010 + 111111 = 1000001 = A 000110 + 111111 = 1000101 = E 000011 + 111111 = 1000011 = B 101010 + 111111 = 1101001 = i 000010 + 111111 = 1000001 = A 010010 + 111111 = 1010001 = Q 000010 + 111111 = 1000001 = A 000010 + 111111 = 1000001 = A 000010 + 111111 = 1000001 = A 000010 + 111111 = 1000001 = A 000010 + 111111 = 1000001 = A 000110 + 111111 = 1000101 = E 000011 + 111111 = 1000011 = B Figure 7. ASCII Lower Half Figure 8. ASCII Upper Half .JUSTIFY .FILL .SKIP The final step is inserting these ASCII characters into the DECDLD command string. Assume that we want to use ASCII code 92, octal 134, to display sigma, and that the name to be assigned to this character set is "$G". (Refer to page 19 of the ^&Guide\& for more information on character set names.) The resulting escape sequence is: .SKIP 2 .TEST PAGE 13 .NO FILL .NO JUSTIFY DCS 0;60;1;0;1;0{$G AEiQAAe/ABAAAAB ST | | | | | | || | +--- ASCII 156 or ESC _\ | | | | | | || +------------------ Sxbpl: Sixel bit pattern | | | | | | |+--------------------- Dscs: "Name" of font | | | | | | +--------------------- Pt: Device default | | | | | +---------------------- Pw: 80 column | | | | +----------------------- Pcms: Matrix size (default) | | | +------------------------ Pe: Erase only this char | | +-------------------------- Pcn: Starting char number 60 | +--------------------------- Pfn: Font 0 +------------------------------ ASCII 144 or ESC P .JUSTIFY .FILL .SKIP .CENTER Figure 9. Font Definition Escape Sequence .SKIP It should be noted that although the command string is shown with spaces embedded for the sake of clarity, spaces should not be included in the actual command. In commands where a space character is required, " sp " is used to indicate the location. This applies to all command strings shown in this article and in the ^&Guide\&. If it were also desired to define ASCII 93, octal 135, "]" in the character set, simply append a semicolon and the sixel definition of the new character to the ^IS144^GSxbp1^IS204^G segment of the command string as follows. What will be displayed by ^IS144^GSxbp2^IS204^G is left as an exercise for the reader: .SKIP DCS 0;60;1;0;1;0{$G AEiQAAe/ABAAAAB;wCAAqAC/?@AANIH ST .SKIP To display the new characters, the information on page 9 of the ^&Guide\& is used. The character set name ($G) is designated as character set G0 and the appropriate ASCII codes are sent to the terminal. By way of example, the command: .SKIP ESC ($G_\] .SKIP designates $G as the G0 character set (ESC $G) and then displays the two characters just defined (#_\]#). To return to the normal ASCII character set, use the command: .SKIP ESC (B .SKIP That's basically all there is to it. As for the ^IS144^GPfn^IS204^G parameter, the ^&Manual\& says: "The VT220 has only one DRCS font buffer. This parameter has two valid values: 0 and 1." Why there are two valid values for the parameter when there is only one font buffer, or why there is even a parameter at all, is never explained. Presumably this is reserved for compatibility with future terminals. The author has tried both values; they appear to behave identically. The ^IS144^GPcms^IS204^G and ^IS144^GPw^IS204^G parameters are similar; various combinations of the specified values have been tried, including ^IS144^GPcms^IS204^G = 1 (allegedly not used). No difference in the display was noted. The ^IS144^GPe^IS204^G parameter does appear to do just exactly what the ^&Guide\& says it does, though exhaustive testing was not attempted. The ^&Manual\& provides the following information about the ^IS144^GPt^IS204^G parameter: "Full cell fonts can individually address all pixels in a cell, while text fonts, in general, may not be able to address all pixels individually." Setting this parameter to 2 (full cell) seems to disable loading a character; the other two values appear to be interchangable. As most of us who have been around DEC equipment and software know, DEC has a curious habit of including "undocumented" features (probably bugs they couldn't get rid of) in their products. The VT100 is loaded with them; try playing with the LEDs or send it a control-Z character sometime. The VT220 is no exception. The ^&Manual\& sort of hints that there might be something more to the DECDLD command than meets the eye. It says that the "DRCS cell size" is an 8 x 10 array, but the "normal terminal character cell size" is only 7 x 10. It even includes an illustration showing the difference. If an eighth column is defined for each character, the terminal accepts the additional information, squirrels it away somewhere in its innards, and then does strange things when that character is requested for display. Extrapolating from known information, one might expect that this additional column represents the gap between two adjacent characters and that dots corresponding to 1s should be illuminated. This does indeed happen, but in addition this dot pattern is inclusive ORed with the first column of the following character. For example, the command: .SKIP DCS 0;60;1;0;1;0{$G AEiQAAEO/ABAAAAB? ST ESC ($G_\ ESC (B_# .SKIP produces the following display: .SKIP 2 .TEST PAGE 25 .NO FILL .NO JUSTIFY +---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | | | | | | | | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | X | X | X | X | X | X | X | | | X | | | X | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | X | | | | | X | | | X | | | X | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | | X | | | | | | X | X | X | X | X | X | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | | | X | | | | X | X | X | | | X | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | | X | | | | | | X | X | X | X | X | X | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | X | | | | | X | | | X | | | X | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | X | X | X | X | X | X | X | | | X | | | X | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | | | | | | | | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | | | | | | | | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+ .JUSTIFY .FILL .SKIP .CENTER Figure 10. Eighth Bit Setting Effect .SKIP One final note: If a particular character is redefined while that character is displayed on the screen, every occurrence of that character is replaced by the new character as soon as the new definition is loaded into the terminal font memory. .COMMENT .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT Weird (RSX) Science .COMMENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COMMENT .TEST PAGE 15 .SKIP 6 #####################^IC0000^IS328^GWeird RSX Science^IS204^IC1000^G .SKIP .CENTER Alan Frisbie .CENTER Flying Disk Systems .CENTER 4759 Round Top Drive .CENTER Los Angeles, CA###90065 .SKIP Transparent spooling (or, as some implementers refer to it, "translucent spooling") allows the user to do some apparently strange things with the system. When a file is opened on a spooled device, what actually happens is that a workfile is created. When the file is closed, the file is automatically spooled to the device and (normally) deleted after spooling. For example, if TT1: is spooled, and one opens TT1:filename, writes it and closes it, one copy of the file is printed on TT1: and the file disappears. This leads me to an interesting interaction between EDT and spooling. Suppose that I want to extract internal documentation from a source file and print it on a spooled printer. The source file is FLZOPN.MAC, and most of it is code I don't care to see. I could, of course, do: .SKIP EDT TEMP.TMP=FLZOPN.MAC .SKIP wipe all but the documentation, exit the editor, and then enter .SKIP PRINT TT1:=TEMP.TMP/DE .SKIP but that seems like a waste of a perfectly good command line, and a long and complex one to type in at that. It's so much simpler to just edit the printer directly. I merely type in the magic command line: .SKIP EDT TT1:=FLZOPN.MAC .SKIP which has the desired effect of letting me edit the source in a temporary file, print the resulting temporary file, and delete it after printing - all in one line.