home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / MISC / TNH_PC.ZIP / KRUGGEL.NL < prev    next >
Encoding:
Text File  |  1987-01-14  |  1.8 KB  |  61 lines

  1. Text Mode Display Compatibility
  2.  
  3.              Bob Kruggel
  4.     Burlington Vermont Users Group
  5.  
  6. If you are writing software that is
  7. supposed to run with either the
  8. monochrome or graphics display, be
  9. aware of some significant
  10. differences between these adapters
  11. and how they interpret the color
  12. command.  Listed below are the
  13. meanings of the foreground color for
  14. the displays.
  15.  
  16. FORGRND      DISPLAY TYPE
  17.  COLOR   MONO            GRAPHICS
  18.  
  19. 0       WHITE            BLACK
  20. 1       UNDERLINED       BLUE
  21. 2       WHITE            GREEN
  22. 3       WHITE            CYAN
  23. 4       WHITE            RED
  24. 5       WHITE            MAGENTA
  25. 6       WHITE            BROWN
  26. 7       BRIGHT WHITE     WHITE
  27. 8       BRT UNDLINED     GRAY
  28. 9       BRIGHT WHITE     LT BLUE
  29. 10      BRIGHT WHITE     LT GREEN
  30. 11      BRIGHT WHITE     LT CYAN
  31. 12      BRIGHT WHITE     LT RED
  32. 13      BRIGHT WHITE     LT MAGENTA
  33. 14      BRIGHT WHITE     YELLOW
  34. 15      BRIGHT WHITE     BRT WHITE
  35.  
  36. Add 16  to  the  foreground color for
  37. blinking on both display types.
  38.  
  39. Try to  envision  what  your  program
  40. will look like on the  other  type of
  41. display, especially  note  that there
  42. is  no   underline  on  the  graphics
  43. adapter.
  44.  
  45. If you are  poking  directly  to  the
  46. display memory, test for the type  of
  47. display  being  used and adjust  your
  48. segment accordingly, as  shown below.
  49.  
  50. DEF SEG=0
  51. SEGTYPE=(PEEK(&H410) AND (&H30)
  52. IF SEGTYPE>32 THEN SEGMENT=&HB000:
  53.    ELSE SEGMENT=&HB800
  54. DEF SEG=SEGMENT
  55.  
  56. Not  only will these  recommendations
  57. make  your  software  useable on both
  58. types of adapters,  it  will  make  a
  59. user group library  committee's job a
  60. lot easier.
  61.