home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / PASCAL / 30TURUTL / TURBO.COL < prev    next >
Text File  |  1985-02-23  |  4KB  |  106 lines

  1. The following patch is compliments of P.C. in Texas.
  2.  
  3. Turbo Pascal is a trademark of Borland.
  4.  
  5. The following documents the modifying of Turbo Pascal's default
  6. colors in the compiler. The following patch is for version 2.00B
  7. and would not apply to any other version. However, anyone familiar
  8. with the DEBUG facility would be able to figure a patch for other versions
  9. based on this information.
  10.  
  11. The information regarding the display characteristics are stored in ds:151
  12. through ds:153. DS:151 is the regular text color (normally yellow).  DS:152
  13. is the text normally white. DS:153 is the background screen color and
  14. prompt, normally black background high intensity white prompt.
  15.  
  16. The following table describes how the color is defined.
  17.  
  18.  
  19.   bit position    0  1  2  3   4  5  6  7          If bit is on (1)
  20.                   ^  ^  ^  ^   ^  ^  ^  ^
  21.                   !  !  !  !   !  !  !  !--------  Blue foreground
  22.                   !  !  !  !   !  !  ------------  Green foreground
  23.                   !  !  !  !   !  ---------------  Red foreground
  24.                   !  !  !  !   ------------------  Highlight text
  25.                   !  !  !  !
  26.                   !  !  !  ----------------------  Blue background
  27.                   !  !  -------------------------  Green background
  28.                   !  ----------------------------  Red background
  29.                   -------------------------------  Blink
  30.  
  31.                          Color Combinations
  32.  
  33.        RED   + GREEN = YELLOW           ALL BITS OFF  =  BLACK
  34.        RED   + BLUE  = MAGENTA
  35.        GREEN + BLUE  = CYAN             RED + GREEN + BLUE = WHITE
  36.  
  37.        example:  07 = 0000 0111 = white on black background
  38.                  0F = 0000 1111 = bright white on black background
  39.  
  40.  
  41.  
  42.   The following must now be done:
  43.  
  44.   1) Copy the object code to another disk. (of course)
  45.  
  46.   2) Install Turbo Pascal with the Color option.
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.   3) Use the DEBUG facility to patch the object code.
  58.  
  59.      a)  A>DEBUG
  60.          -N TURBO.COM
  61.          -L
  62.          -U 907:30D
  63.          ---------------The following should appear------------
  64.  
  65.          0907:030D 803E5401FF    CMP    BYTE PTR [0154],FF
  66.          0907:0312 7406          JZ     031A
  67.          0907:0314 B0FF          MOV    AL,FF
  68.          0907:0316 B3F7          MOV    BL,F7
  69.          0907:0318 B10F          MOV    CL,0F
  70.          0907:031A 22C1          AND    AL,CL
  71.          0907:031C A25101        MOV    [0151],AL
  72.          0907:031F A25501        MOV    [0155],AL
  73.          0907:0322 22D9          AND    BL,CL
  74.          0907:0324 881E5201      MOV    [0152],BL
  75.          0907:0328 880E5301      MOV    [0153],CL
  76.          0907:032C C3            RET
  77.  
  78.  
  79.      b) If it does do the following:
  80.  
  81.          -n color.com
  82.          -a 907:312
  83.  
  84.          0907:0312    MOV  AL,1F         <--- Normally white text  (0E)
  85.          0907:0314    MOV  [0151],AL
  86.          0907:0317    MOV  AL,1F         <--- Normally yellow text (07)
  87.          0907:0319    MOV  [0152],AL
  88.          0907:031C    MOV  AL,1F         <--- Background / prompt color (0F)
  89.          0907:031E    MOV  [0153],AL                                normally
  90.          0907:0321    MOV  AX,000E
  91.          0907:0324    MOV  [0155],AL
  92.          0907:0327    MOV BX,5007
  93.          0907:032A    NOP
  94.          0907:032B    NOP
  95.          0907:032C    RET
  96.  
  97.      c)  -w
  98.  
  99. Substitute the colors you prefer. This is extremely helpful for
  100. monochrome monitors on the composite out port of the color graphic monitor
  101. since you can set inverse video for highlighted text. The patch above
  102. has all text high intensity white on a blue background. (Sound familiar?)
  103.  
  104.  
  105. P.C.
  106.