Microsoft KB Archive/35831

Cannot Underline ACCEPT and DISPLAY Fields on Color Card

PSS ID Number: Q35831 Article last modified on 04-20-1993

3.00 | 3.00 MS-DOS | OS/2

Summary: When using the underline command on systems with a color adapter, the underline does not appear. This is a limitation of color video adapters. (This is not a problem in the configuration of the ADISCF in COBOL Verison 3.0.) A Hercules monochrome graphics adapter has underline capability, however, color adapters do not. ADISCF allows you to view whether or not underlining and highlighting will work with a certain configuration. When trying to configure the CRT-Under Highlighting option to underline, no underline will appear. To view this option in ADISCF, press F2 upon entering ADICF, then press F2 again. Select the underscore option. No underline will appear if you have an EGA monitor.

More Information: The following explains why underlining is not possible in text mode on an EGA monitor. Underlining is not possible on other color monitors for similar reasons. This information is taken from the book “Programmer’s Guide to PC & PS/2 Video Systems” by Richard Wilton (published by Microsoft Press): The EGA also generates an underline attribute in 16-color alphanumeric modes when the foreground attribute is 1 and the background attribute is 0 or 8. However, you do not normally see an underline in 16-color modes because the video BIOS default value for the CRTC underline Location Register (14H) is 1FH. This value is greater than the number of scan lines normally displayed for alphanumeric characters, so the underline does not appear. The EGA masks out the underline bit in alphanumberic mode (the mode used by COBOL). The underline bit is only valid for the EGA monitor in graphics mode. The bits accessed in alphanumberic mode do not include the underline attribute.

Additional reference words: 3.00 Copyright Microsoft Corporation 1993.