home *** CD-ROM | disk | FTP | other *** search
- TP6MAP - a partial map of the Borland Turbo Pascal 6.0 IDE
-
- Prepared by D.J. Murdoch using TPMAPPER.
-
-
- Introduction
-
- In pushing the new TurboVision library that comes with TP6,
- Borland advertises that the "Integrated Development Environment",
- or IDE, is written using TurboVision. Unluckily for them, the
- Editors unit which is distributed with TP6 is very buggy; it was
- quickly clear to people that the editor in the IDE and the
- Editors unit are two different animals.
-
- When this came out on Compuserve, Borland quickly "clarified"
- their claims: only the "user interface" parts of the IDE are
- actually written using TV; the Editors unit is a demonstration
- only; it's not the actual IDE editor, which is written in
- assembler.
-
- The bugs in Editors had had me very worried. It was clear that
- it hadn't really been tested properly; I didn't want to use other
- parts of TV that were similarly untested. On the other hand, the
- IDE is relatively bug-free. I wouldn't mind using code that was
- incorporated into it. Which code was that?
-
- I asked this question on Compuserve, and didn't get much of an
- answer, so the need for this project was born. I decided to map
- TURBO.EXE, so that I could find out exactly what was in and what
- was out.
-
-
- How the map was created
-
- I've written a program (TPMAPPER) that can read a .TPU file, and
- then go looking through a compiled .EXE file for the code. It's
- much more successful than I would have guessed it would be - the
- map of TURBO.EXE that's included here is almost completely
- automatically generated, with only a bit of fussing on my part.
-
- If you're interested in TPMAPPER, let me know. I haven't decided
- if or how it will be distributed; chances are it won't be free,
- though. If you're desperate for a copy, tell me how much you're
- willing to pay for it.
-
-
- How to read the map
-
- Most of the map looks something like this extract:
-
- Offset Address Size Name in file
-
- 00003340 008C:0000 dos.swapvectors
- 0000BB00 0908:0000 000D overlay.blk0000
- 0001C12B 196A:0000 stddlg.iswild
- 0001C169 196A:0042 0151 Unrecognized
-
- The first column gives an offset (in hex, starting from 0) within
- the TP 6.0 TURBO.EXE file. (In case there's more than one
- version, mine is 325397 bytes and is dated 23 Oct 90, time
- 06:00:00.) The second column is a guess at the corresponding
- address that a .MAP file produced by a compiler would produce;
- the first segment in the program is number 0000, and so on. Most
- of TURBO.EXE is kept in overlays; for the overlay parts
- (everything after System), the segment part of this address is
- meaningless.
-
- The next two columns depend on what sort of line it is. Ones
- like the first one, with nothing in the Size column, give entry
- points to the code. Many more names are given than a standard
- .MAP file would include; some are private, some aren't. The
- "dot" syntax, where the unit name is followed by a dot and then
- the routine name, is used here. Nested procedures get another
- dot and a name, as do methods within objects.
-
- Lines like the second one are for "code blocks", not entry
- points. If TPMAPPER couldn't attach a name, it shows the size of
- the code rather than the entry points. The name given is the
- unit name and a block number; the numbers are the same as my
- INTRFC program would use.
-
- Lines like the last one only show up in the stddlg unit. It
- appears that the version of stddlg used in TURBO.EXE isn't quite
- the same as the one distributed for us to use; when there's some
- code there that doesn't match what's in the .TPU, it's shown as
- "Unrecognized". I've only looked at one of these blocks, and it
- looked as though the only difference was the values being used
- for some constants like cmFileOpen, but I wouldn't trust that to
- be the only change unless I checked everything very carefully.
-
-
- What to do with the map
-
- If you're not just curious the way I was, the next most likely
- thing you might want to do with this map is to use it to find
- patch points. I've done that once for someone; it was relatively
- easy to change the IDE cursor so that in insert mode it was a
- block, and in overwrite mode a line. (The idea was to switch the
- functions of views.tview.blockcursor and
- views.tview.normalcursor.)
-
- If you can tell me some other good use for this map, I'd like to
- hear about it.
-
- Duncan Murdoch
- 24 Feb 1991
-
- DJ Murdoch at Fidonet point node 1:221/177.40
- Internet address dmurdoch@watstat.waterloo.edu
- Compuserve address 71631,122
-
- Postal address: 79 John St. W, Waterloo, Ontario, Canada, N2L 1B7