Patching FMS-11 Forms for VT100 Special Features + ________________________________________________ Ian Darwin There are two ways of modifying FMS-11 forms to make use of the VT100 line drawing set and the double-height, double-width lettering. One is by patching escape sequences into text segments on the form; the other is by patching the form attributes for a text segment. The first way is easier, but uglier. Neither way is supported by DEC. We have used the first means extensively. There is also a way to get just boxes on a form. This way uses FED only; it is fully supported by DEC but not quite as elegant. 1.0 Patching Text + _____________ To patch the text fields, you must start by making up a form, called for example ESCFRM, and then make all your forms from it. You patch ESCFRM, then make up new forms with the patched text. This relies on the (undocumented?) feature that the forms driver will pass escapes which it finds in the text without clobbering them. THIS IS NOT GUARANTEED TO CONTINUE, in fact I don't even warrant that it works on any Forms Driver except RT-11, although it probably does. Your ESCFRM would look something like this: This is a form with some text attributes. $#3This is double height (top half). $#4This is double height (bottom half). $#5This is normal text. $#6This is double width single height. $(0This enters graphics mode. $)0This leaves graphics mode. ESCFRM now contains the ANSI escape sequences needed to put the VT100 into the specified modes (you could use VT-52 compatible escape sequences). Just type ESCFRM up using FED and typing a dollar sign where there ought to be an escape. Then run whatever DUMP program is on your system to get an ASCII-and-byte dump of the form file. Finally, use whatever binary-file-patch program is on your system (PATCH on RT-11 V3, for example) to convert the "$" characters to 233 octal (use 233, not 033, to work on most systems). Once you have done this, use FED to look at the ESCFRM form to make sure that the escape sequences are correct (I got them from a manual, not from a working copy of ESCFRM, which is on another system right now) and that you have patched them correctly. Now make up a new form from ESCFRM, using FED's cut-and-paste feature to move the escapes in front of the text in your form. For graphics, see the VT100 manual for the translation from lower case letters to line drawing set. YOU WILL HAVE TO DO SOME EXPERIMENTING because FED behaves somewhat strangely. Use CTRL/W whenever you have put the escapes in a different place. Remember that FED thinks it has 80/132 column lines when in fact some of the lines will be displayed with half that many characters. Have fun with this, but don't call me (or DEC) when it breaks! 2.0 Patching Attributes + ___________________ Patching the attributes is a more sophisticated way of doing the same thing. You edit the form with FED and then use PATCH (or better yet write an intelligent program to do the same thing) to turn on the attribute bytes for things like Double Height Double Width letters for the appropriate text segment. This is not described here in detail because I HAVEN'T DONE IT YET although the FMS developers have told me that it works for some of the attributes (I'm not sure which work and which don't). To use this, you will have to read the article "FMS-11 Internal Form Structure", which will be in the next issue of the SCHEMA, to get the details of the internal form format. 3.0 If boxes are all you want... + ____________________________ There is a way to draw boxes on a VT100 with AVO (Advanced Video Option) that is fully supported and will continue to work in future releases of FMS-11. The only tool you need is the standard Forms Editor FED. The method is to use the reverse video to make the box around your text. The boxes are bigger than those made with the line set, but they are much faster to make up. Basically you SELECT a region where you want the outline of your box to be, and mark it VIDEO REVERSE. You then select an inner region (one line below the top and above the bottom, and two columns in from either side), and mark it VIDEO CLEAR. It's actually easier to do this than to describe it; hopefully the following crude diagram will clarify it. The screen after writing the region: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Then after clearing the inside: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX XX XX XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX It looks much better on a real VT100; I have used X's to show where the VT100 will use solid background because my printer doesn't have a good way of doing solid blobs. 4.0 Summary + _______ You can make boxes or use extra features of your terminal by patching the forms; in so doing you may be boxing yourself in later. If boxes are all you really need, make them with FED and save yourself time now and hassles later.