home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / YESNO302.ZIP / COLORS.ZAP next >
Encoding:
Text File  |  1987-09-25  |  4.5 KB  |  98 lines

  1. TURBO PASCAL Ver. 3.00B for IBM-PC -- Color Patches
  2.              Ver. 3.01A for IBM-PC -- Color Patches
  3.              Ver. 3.02A for IBM-PC -- Color Patches
  4.  
  5. The following information will permit those desiring to create 
  6. their own color scheme for the Turbo Pascal Ver. 3.00B environment 
  7. to do so.  This implementation has only been available for a 
  8. short time, so care should be taken in patching (as always!). 
  9.  
  10.                          <CAUTION> 
  11.  
  12. Be sure to make these code changes in a COPY of your program. 
  13. Be sure the bytes and locations match in YOUR program before 
  14. blindly changing code. 
  15.  
  16. 1.  Turbo Pascal Ver. 3.0, like Ver. 2.0 before it, gives you
  17. a work environment of high intensity yellow foreground on
  18. black background.  The top line of the Editor gives its
  19. information in low intensity white on black.  Your screen
  20. output will be high intensity yellow on black unless you
  21. change it with TextColor and TextBackground statements from
  22. within your program.  If you have a color display that supports
  23. a border color, you get a black border all the time unless you
  24. change the border color from within your program through the
  25. use of
  26.               Port[$3D9] := C;  {where C is a decimal number }
  27.                                 { in [0..15]                 } 
  28.  
  29. Blocks that have been marked in the editor will display in 
  30. low intensity white on black. 
  31.  
  32. 2.  The color attributes can be found using DEBUG as follows: 
  33.  
  34.     a)  Be sure you have installed your copy of TURBO.COM 
  35.         with TINST for color. 
  36.  
  37.     b)  Load DEBUG, and load your COPY of TURBO.COM into 
  38.         DEBUG. 
  39.  
  40.     c)  At locations xxxx:0177 thru 0179 will appear three 
  41.         consecutive bytes of 0E 07 07.  These correspond to: 
  42.  
  43.         xxxx:0177  0E       This byte contains black background 
  44.                             (the 0) and high intensity yellow 
  45.                             foreground (the E).  It controls, 
  46.                             in the Turbo Menu, the attributes of 
  47.                             highlighted letters that indicate 
  48.                             command options.  In the Editor, it 
  49.                             controls the attributes of your typed- 
  50.                             in Pascal code.  At runtime, this will 
  51.                             be the TextColor if you haven't over- 
  52.                             ridden it in your code. 
  53.  
  54.         xxxx:0178  07       This byte controls the attributes of 
  55.                             text in the Menu that are NOT high- 
  56.                             lighted command option letters, i.e., 
  57.                             the rest of the words that begin with 
  58.                             highlighted letters, and some other 
  59.                             stuff.  In the Editor, this controls 
  60.                             the attributes of the top-line that 
  61.                             keeps track of your cursor position, 
  62.                             work file name, etc., and the coloring
  63.                             of any control characters that you 
  64.                             enter. 
  65.  
  66.         xxxx:0179  07       This byte controls the color attributes 
  67.                             of blocks marked within the Editor. 
  68.  
  69.         You need only change one or more of these with the DEBUG 
  70.         (E)nter command, (W)rite the file back to disk, (Q)uit 
  71.         DEBUG, and you're in business with your new colors. 
  72.  
  73. 3.   If you want to change the border color, you can experiment 
  74. with this code: 
  75.  
  76.       The code starting at xxxx:0100 is a jump to 2CB6.  This 
  77.       usually indicates a jump over the data area to where the 
  78.       first working procedure begins.  Looking along the next 
  79.       few dozen bytes in this surmised data area, there is a 
  80.       run of zeroes from xxxx:012D to xxxx:0154.  I have done 
  81.       the following: 
  82.  
  83.       Using the DEBUG (A)ssemble command, I changed xxxx:0100 
  84.       from JMP 2CB6 to JMP 012D.  Then I assembled at xxxx: 
  85.       012D
  86.              MOV  AL,1    ;1 is blue border. Use anything 
  87.                           ;in [0..F] hex. 
  88.              MOV  DX,03D9 ;portaddress of 6845 color select 
  89.              OUT  DX,AL 
  90.              JMP  2CB6    ;Return to the original code 
  91.  
  92.       Be sure to (W)rite it back to disk. 
  93.  
  94.       I have found this to work fine so far.  Please leave me 
  95.       a note if this causes trouble or is otherwise repugnant! 
  96.  
  97. Eric Cohane                               CompuServe 75206,1117
  98. Bruce Gavin  (ver 3.01A and 3.02A)        CompuServe 70137,3244