[comp.binaries.ibm.pc.d] TPU converter for Turbo Pascal

et891856@levels.sait.edu.au (It's the Bishop .....) (04/15/91)

Does anyone know of a program that converts between the different TPU
formats used in varying versions of Turbo Pascal ?

thanks
tony
--

                  Anthony Nuttall et891856@lux.sait.edu.au
                     University of South Australia  
          "BlackAdder, you twist and turn like a twisty-turny thing"
                         Lord Melchett, BlackAdder II

ts@uwasa.fi (Timo Salmi) (04/15/91)

In article <16185.2809dc29@levels.sait.edu.au> et891856@levels.sait.edu.au (It's the Bishop .....) writes:
>
>Does anyone know of a program that converts between the different TPU
>formats used in varying versions of Turbo Pascal ?
:

Can't be done.  This is one of the annoying facets of Borland's
upgade policy of its otherwise excellent products.  The only way to
go about it is having the source code of the unit.

...................................................................
Prof. Timo Salmi        
Moderating at garbo.uwasa.fi anonymous ftp archives 128.214.12.37
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun

terra@diku.dk (Morten Welinder) (04/16/91)

ts@uwasa.fi (Timo Salmi) writes:

>In article <16185.2809dc29@levels.sait.edu.au> et891856@levels.sait.edu.au (It's the Bishop .....) writes:
>>
>>Does anyone know of a program that converts between the different TPU
>>formats used in varying versions of Turbo Pascal ?
>:

>Can't be done.  This is one of the annoying facets of Borland's
>upgade policy of its otherwise excellent products.  The only way to
>go about it is having the source code of the unit.

It is possible. One way to do it is:

1. Read and decipher source .Tpu
2. Translate references to System.Tpu to target version offsets
3. Write target .Tpu in target version format.

This should work for converting Tpu's as long as the versions use the same
calling convensions. (There are some diffenrences between 4.x and (5.x,6.x)
when passing extended reals).
(I didn't say anything about this being easy!)

For help on 1. & 3. see the different Tpu-file-listers out there.
On 2.: For each version of the system unit, one might establish a 
       correspondance between offsets and routine names. I think
       most of these pairs (offset,name) can be found when listing
       System.Tpu (correct?)

sag@iplmail.orl.mmc.com (Steve Gabrilowitz) (04/17/91)

In article <1991Apr16.102030.2368@odin.diku.dk>, terra@diku.dk (Morten Welinder) writes:
|> ts@uwasa.fi (Timo Salmi) writes:
|> 
|> >In article <16185.2809dc29@levels.sait.edu.au> et891856@levels.sait.edu.au (It's the Bishop .....) writes:
|> >>
|> >>Does anyone know of a program that converts between the different TPU
|> >>formats used in varying versions of Turbo Pascal ?
|> >:
|> 

|> It is possible. One way to do it is:
|> 
|> 1. Read and decipher source .Tpu
|> 2. Translate references to System.Tpu to target version offsets
|> 3. Write target .Tpu in target version format.
|> 
|> This should work for converting Tpu's as long as the versions use the same
|> calling convensions. (There are some diffenrences between 4.x and (5.x,6.x)
|> when passing extended reals).
|> (I didn't say anything about this being easy!)
|> 
|> For help on 1. & 3. see the different Tpu-file-listers out there.
|> On 2.: For each version of the system unit, one might establish a 
|>        correspondance between offsets and routine names. I think
|>        most of these pairs (offset,name) can be found when listing
|>        System.Tpu (correct?)

One problem here is what to do when converting a 5.5 TPU to a 6.0 if the unit contains any references to FREEPTR.  The whole issue of heap management between these two versions would seem to present something of an enigma...

-- 




                            Steve Gabrilowitz
                            Martin Marietta, Orlando Fl.
                            sag@iplmail.orl.mmc.com
                            Fidonet 1:363/1701

derek@sun4dts.dts.ine.philips.nl (derek) (04/17/91)

ts@uwasa.fi (Timo Salmi) writes:

>In article <16185.2809dc29@levels.sait.edu.au> et891856@levels.sait.edu.au (It's the Bishop .....) writes:
>>
>>Does anyone know of a program that converts between the different TPU
>>formats used in varying versions of Turbo Pascal ?
>:

>Can't be done.  This is one of the annoying facets of Borland's
>upgade policy of its otherwise excellent products.  The only way to
>go about it is having the source code of the unit.

>...................................................................
>Prof. Timo Salmi        

Sorry - didn't see the original. In general, true, but I do have a 
piece of software that proports to convert 4.0 TPUs to .OBJ files,
which could then be linked in to a 5 - 6 code. I haven't tried it,
I don't know if it works or anything. If you (or anyone) are interested,
please mail me, and I'll find out more.

Best Regards, Derek Carr
DEREK@DTS.INE.PHILIPS.NL           Philips I&E TQV-5 Eindhoven, The Netherlands 
Standard Disclaimers apply.

ts@uwasa.fi (Timo Salmi) (04/18/91)

In article <717@sun4dts.dts.ine.philips.nl> derek@sun4dts.dts.ine.philips.nl (derek) writes:
>ts@uwasa.fi (Timo Salmi) writes:
>>In article <16185.2809dc29@levels.sait.edu.au> et891856@levels.sait.edu.au (It's the Bishop .....) writes:
>>>Does anyone know of a program that converts between the different TPU
>>>formats used in varying versions of Turbo Pascal ?
>
>>Can't be done.  This is one of the annoying facets of Borland's
:
>Sorry - didn't see the original. In general, true, but I do have a 
>piece of software that proports to convert 4.0 TPUs to .OBJ files,
>which could then be linked in to a 5 - 6 code. I haven't tried it,
>I don't know if it works or anything. If you (or anyone) are interested,
:

May I take up the following potential idea here.  Since this is a
question that has been adressed to quite often, I take it that many
users have the same problem, and would like to have a solution.  If
you, or anyone else, can find a reasonably safe working solution
that is simple enough to use, let's make it publicly available.  I
understand from your, and an earlier posting that there might be the
tools for a complicated multiphase conversion (although we don't
know quite for sure?), but many users would like to see something
easily manageable.  Would this at all be possible?  I am naturally
offering garbo services for carrying out the distribution part of
the load, if someone works out a solution.

...................................................................
Prof. Timo Salmi        
Moderating at garbo.uwasa.fi anonymous ftp archives 128.214.12.37
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun

bsrdp@warwick.ac.uk (Hylton Boothroyd) (04/24/91)

> Does anyone know of a program that converts between the different TPU
> formats used in varying versions of Turbo Pascal ?

Conversion is only necessary because the creators of TPUs distribute
compiled code rather than source.

I came to the conclusion soon after TPUs appeared in the Turbo Pascal
series that the loss of control in becoming dependent on other people
continuing to be there to upgrade compiled TPUs would outweigh any
benefit to me.

But I also understand the creators' wish to keep control.

Hylton
-- 
Hylton Boothroyd        Janet: h.boothroyd@uk.ac.warwick.cu
Warwick Business School Darpa: h.boothroyd%cu.warwick.ac.uk@relay-nsfnet.ac.uk
University of Warwick   Uucp:  h.boothroyd@warwick.uucp
COVENTRY, England       Earn/Bitnet: h.boothroyd%uk.ac.warwick.cu@UKACRL