home *** CD-ROM | disk | FTP | other *** search
- TURBO PASCAL Ver. 3.00B for IBM-PC -- Color Patches
-
- The following information will permit those desiring to create
- their own color scheme for the Turbo Pascal Ver. 3.00B environment
- to do so. This implementation has only been available for a
- short time, so care should be taken in patching (as always!).
-
- <CAUTION>
-
- Be sure to make these code changes in a COPY of your program.
- Be sure the bytes and locations match in YOUR program before
- blindly changing code.
-
- 1. Turbo Pascal Ver. 3.0, like Ver. 2.0 before it, gives you
- a work environment of high intensity yellow foreground on
- black background. The top line of the Editor gives its
- information in low intensity white on black. Your screen
- output will be high intensity yellow on black unless you
- change it with TextColor and TextBackground statements from
- within your program. If you have a color display that supports
- a border color, you get a black border all the time unless you
- change the border color from within your program through the
- use of
- Port[$3D9] := C; {where C is a decimal number }
- { in [0..15] }
-
- Blocks that have been marked in the editor will display in
- low intensity white on black.
-
- 2. The color attributes can be found using DEBUG as follows:
-
- a) Be sure you have installed your copy of TURBO.COM
- with TINST for color.
-
- b) Load DEBUG, and load your COPY of TURBO.COM into
- DEBUG.
-
- c) At locations xxxx:0177 thru 0179 will appear three
- consecutive bytes of 0E 07 07. These correspond to:
-
- xxxx:0177 0E This byte contains black background
- (the 0) and high intensity yellow
- foreground (the E). It controls,
- in the Turbo Menu, the attributes of
- highlighted letters that indicate
- command options. In the Editor, it
- controls the attributes of your typed-
- in Pascal code. At runtime, this will
- be the TextColor if you haven't over-
- ridden it in your code.
-
- xxxx:0178 07 This byte controls the attributes of
- text in the Menu that are NOT high-
- lighted command option letters, i.e.,
- the rest of the words that begin with
- highlighted letters, and some other
- stuff. In the Editor, this controls
- the attributes of the top-line that
- keeps track of your cursor position,
- work file name, etc., and the coloring
- of any control characters that you
- enter.
-
- xxxx:0179 07 This byte controls the color attributes
- of blocks marked within the Editor.
-
- You need only change one or more of these with the DEBUG
- (E)nter command, (W)rite the file back to disk, (Q)uit
- DEBUG, and you're in business with your new colors.
-
- 3. If you want to change the border color, you can experiment
- with this code:
-
- The code starting at xxxx:0100 is a jump to 2CB6. This
- usually indicates a jump over the data area to where the
- first working procedure begins. Looking along the next
- few dozen bytes in this surmised data area, there is a
- run of zeroes from xxxx:012D to xxxx:0154. I have done
- the following:
-
- Using the DEBUG (A)ssemble command, I changed xxxx:0100
- from JMP 2CB6 to JMP 012D. Then I assembled at xxxx:
- 012D
- MOV AL,1 ;1 is blue border. Use anything
- ;in [0..F] hex.
- MOV DX,03D9 ;portaddress of 6845 color select
- OUT DX,AL
- JMP 2CB6 ;Return to the original code
-
- Be sure to (W)rite it back to disk.
-
- I have found this to work fine so far. Please leave me
- a note if this causes trouble or is otherwise repugnant!
-
- Eric Cohane CompuServe 75206,1117