home *** CD-ROM | disk | FTP | other *** search
- Text Mode Display Compatibility
-
- Bob Kruggel
- Burlington Vermont Users Group
-
- If you are writing software that is
- supposed to run with either the
- monochrome or graphics display, be
- aware of some significant
- differences between these adapters
- and how they interpret the color
- command. Listed below are the
- meanings of the foreground color for
- the displays.
-
- FORGRND DISPLAY TYPE
- COLOR MONO GRAPHICS
-
- 0 WHITE BLACK
- 1 UNDERLINED BLUE
- 2 WHITE GREEN
- 3 WHITE CYAN
- 4 WHITE RED
- 5 WHITE MAGENTA
- 6 WHITE BROWN
- 7 BRIGHT WHITE WHITE
- 8 BRT UNDLINED GRAY
- 9 BRIGHT WHITE LT BLUE
- 10 BRIGHT WHITE LT GREEN
- 11 BRIGHT WHITE LT CYAN
- 12 BRIGHT WHITE LT RED
- 13 BRIGHT WHITE LT MAGENTA
- 14 BRIGHT WHITE YELLOW
- 15 BRIGHT WHITE BRT WHITE
-
- Add 16 to the foreground color for
- blinking on both display types.
-
- Try to envision what your program
- will look like on the other type of
- display, especially note that there
- is no underline on the graphics
- adapter.
-
- If you are poking directly to the
- display memory, test for the type of
- display being used and adjust your
- segment accordingly, as shown below.
-
- DEF SEG=0
- SEGTYPE=(PEEK(&H410) AND (&H30)
- IF SEGTYPE>32 THEN SEGMENT=&HB000:
- ELSE SEGMENT=&HB800
- DEF SEG=SEGMENT
-
- Not only will these recommendations
- make your software useable on both
- types of adapters, it will make a
- user group library committee's job a
- lot easier.