home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / MADTRB13.ZIP / COLORS.TXT next >
Encoding:
Text File  |  1985-05-26  |  4.4 KB  |  96 lines

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