APPLICATION NOTE #181 USING XYWRITE ON A GRAY-SCALE MONITOR Rev. 01 Gray-scale monitors produce 64 shades of gray by transforming the red-green-blue color values of the VGA (Video Graphics Array) and MCGA (Multi-Color Graphics Array) into gray-scale values. This application note describes the settings in XyWrite that optimize the various display mode attributes on screen. STANDARD DISPLAY MODES XyWrite defaults to the following display modes on a gray-scale monitor. MD NM=7 White characters on black MD BO=15 White characters on black MD UL=1 Light gray characters on black MD BU=9 Gray characters on black MD RV=112 Gray characters on light gray MD BR=120 Black characters on light gray MD SU=122 Light gray characters on light gray MD SD=121 Gray characters on light gray Because the default settings do not sufficiently distinguish the various modes on a gray-scale monitor, following are the recommended mode settings in XyWrite: MD NM=12 Gray characters on black MD BO=7 White characters on black MD UL=44 Gray characters on light gray MD BU=46 White characters on light gray MD RV=120 Dark gray characters on light gray MD BR=113 Black characters on light gray MD SU=91 White characters on dark gray MD SD=92 Gray characters on dark gray You can use any setting you want, as long as you have a different shade for each mode. Once you have selected the shades you prefer, you need to modify your printer file with the appropriate mode commands. The steps for selecting different shades of gray and modifying the printer file are described in the following sections. SELECTING SHADES OF GRAY The easiest way to select the shades you want is to use XyWrite's LONG.HLP file to view the available shades of gray on your screen. 1. Be sure LONG.HLP is loaded. 2. Display the help screen. Press: Alt-F9 3. Move the cursor to WORD and press _. Result: A fill-in-the-blank menu displays on the screen. 4. Enter the phrase "color table" and press . Result: A color table appears on screen. This table displays the number of each mode in its associated shade of gray. 5. Write down the numbers of the shades of gray you want to use for each display mode (e.g., 12 for normal, 7 for bold). Be sure to choose a different shade for each mode. 6. Exit from help. Press: Alt-F9 MODIFYING THE PRINTER FILE Once you have determined the shades of gray you want to display, enter the new values in the printer file with the MD command in the following format: MD nm=n where nm is a two-letter mode command (NM, BO, UL, etc.) and n is the number that corresponds to the shade of gray you want to assign to the mode. Enter the MD commands before the PT (Print Type) tables in the printer file. If you prefer, you can create a separate printer file exclusively for these settings. If you do, be sure to load this separate file before your standard printer file. As an example, let's change the mode settings for underline and bold underline. In this example, we'll create a special printer file for the new mode settings. 1. Create a printer file for the mode settings. Type: F5new display.prn 2. Enter the label that identifies this file as a printer file. Type: ;PR; 3. Enter the mode settings you want to change. In this case, we'll change the underline display to gray characters on a light gray background and bold underline to white characters on a light gray background. On the line below the label identifier: Type: MD UL=44 Type: MD BU=46 4. Store the new printer file: F5store 5. Modify STARTUP.INT so that your new display mode settings are loaded each time you enter XyWrite. (XyWrite III users, refer to Note #5.) You must load the file which contains the mode settings (e.g., DISPLAY.PRN) before you load your printer-specific file. Type: F5call startup.int Locate the line which loads your standard printer file (for example, 3EPSONFX.PRN). Edit the line to appear as follows: BC load display.prn+3epsonfx.prn 6. Store the startup file. Result: The next time you load XyWrite, the new display settings will take effect. USING ADDITIONAL DISPLAY MODES XyWrite does not limit you to the standard display modes described at the beginning of this application note. You can use the MD command to display text in up to 255 additional modes. To do this, choose the shade of gray you want to use (for example, 31) and, with your text file displayed on screen: Type: F5md 31 Result: The text that follows the command appears in white characters on a dark gray background. You can use any number from 1 to 255 to specify the shade of gray you want (as shown in the color table). If you want to take advantage of the additional display modes, be sure to modify the PT (Print Type) tables in the printer file so that each of the display modes has a printing style associated with it. (The default is to use the printing style associated with normal mode in the default PT.) Refer to Chapter 6 in the XyWrite III Plus Reference Guide for information on modifying the PT tables. Note #1 Header Colors. The default colors for the header are 7 (white characters on black) for the information that appears within the field and 112 (black characters on light gray) for the XyWrite field names. The procedure for changing these shades is slightly different. 1. Select the shades of gray you want to use, as described above. 2. Enter the HR (Header Reverse, for field names) and HN (Header Normal, for field content) settings in the printer file you set up for display modes. For example, call the file DISPLAY.PRN and type: HR=63 HN=11 Result: After you load the printer file, the field names will appear in white characters on a light gray background (63) and the information in the fields will appear in white characters on a black background (11). You must choose a different number for each of these settings; however, either or both can match a mode number (typically, the number specified for HN is the same as the number for NM). Note #2 XyWrite A La Carte Users. You can use the A La Carte system to customize your screen display. With no open file, press F6 to access the menus, then press X for XyWrite, D for Defaults, and M for screen modes. This displays both a color table and a menu for you to fill in the mode numbers of your choice. Be sure you use different numbers for each mode. Note #3 Underline. If you are using a VGA card which does not display underline, you can obtain a copy of UNDERLN.EXE from Technical Services. This utility, developed by XYQUEST, allows you to turn on underlining for modes 1 and 9, which are the default display modes for underline (MD UL) and bold underline (MD BU). Please note that this utility will not work with MCGA cards. Note #4 BX Setting. The next-to-last value of the BX setting determines how the borders of HELP menus will display. (By default, it is set to mode 112.) Take care when selecting display modes that you do not set MD BR or MD UL to match this value. If you do, it will cause erratic cursor behavior in HELP menus. Note #5 XyWrite III Users. The LOAD command is not available in XyWrite III. In the example above, you would modify the STARTUP.INT file as follows. Define and copy an existing line in the file. Be sure the new line is before the line which loads your standard printer file. Edit the new line to appear as follows: BC lp display.prn ##