home *** CD-ROM | disk | FTP | other *** search
- The following patch is compliments of P.C. in Texas.
-
- Turbo Pascal is a trademark of Borland.
-
- The following documents the modifying of Turbo Pascal's default
- colors in the compiler. The following patch is for version 2.00B
- and would not apply to any other version. However, anyone familiar
- with the DEBUG facility would be able to figure a patch for other versions
- based on this information.
-
- The information regarding the display characteristics are stored in ds:151
- through ds:153. DS:151 is the regular text color (normally yellow). DS:152
- is the text normally white. DS:153 is the background screen color and
- prompt, normally black background high intensity white prompt.
-
- The following table describes how the color is defined.
-
-
- bit position 0 1 2 3 4 5 6 7 If bit is on (1)
- ^ ^ ^ ^ ^ ^ ^ ^
- ! ! ! ! ! ! ! !-------- Blue foreground
- ! ! ! ! ! ! ------------ Green foreground
- ! ! ! ! ! --------------- Red foreground
- ! ! ! ! ------------------ Highlight text
- ! ! ! !
- ! ! ! ---------------------- Blue background
- ! ! ------------------------- Green background
- ! ---------------------------- Red background
- ------------------------------- Blink
-
- Color Combinations
-
- RED + GREEN = YELLOW ALL BITS OFF = BLACK
- RED + BLUE = MAGENTA
- GREEN + BLUE = CYAN RED + GREEN + BLUE = WHITE
-
- example: 07 = 0000 0111 = white on black background
- 0F = 0000 1111 = bright white on black background
-
-
-
- The following must now be done:
-
- 1) Copy the object code to another disk. (of course)
-
- 2) Install Turbo Pascal with the Color option.
-
-
-
-
-
-
-
-
-
-
- 3) Use the DEBUG facility to patch the object code.
-
- a) A>DEBUG
- -N TURBO.COM
- -L
- -U 907:30D
- ---------------The following should appear------------
-
- 0907:030D 803E5401FF CMP BYTE PTR [0154],FF
- 0907:0312 7406 JZ 031A
- 0907:0314 B0FF MOV AL,FF
- 0907:0316 B3F7 MOV BL,F7
- 0907:0318 B10F MOV CL,0F
- 0907:031A 22C1 AND AL,CL
- 0907:031C A25101 MOV [0151],AL
- 0907:031F A25501 MOV [0155],AL
- 0907:0322 22D9 AND BL,CL
- 0907:0324 881E5201 MOV [0152],BL
- 0907:0328 880E5301 MOV [0153],CL
- 0907:032C C3 RET
-
-
- b) If it does do the following:
-
- -n color.com
- -a 907:312
-
- 0907:0312 MOV AL,1F <--- Normally white text (0E)
- 0907:0314 MOV [0151],AL
- 0907:0317 MOV AL,1F <--- Normally yellow text (07)
- 0907:0319 MOV [0152],AL
- 0907:031C MOV AL,1F <--- Background / prompt color (0F)
- 0907:031E MOV [0153],AL normally
- 0907:0321 MOV AX,000E
- 0907:0324 MOV [0155],AL
- 0907:0327 MOV BX,5007
- 0907:032A NOP
- 0907:032B NOP
- 0907:032C RET
-
- c) -w
-
- Substitute the colors you prefer. This is extremely helpful for
- monochrome monitors on the composite out port of the color graphic monitor
- since you can set inverse video for highlighted text. The patch above
- has all text high intensity white on a blue background. (Sound familiar?)
-
-
- P.C.