[comp.lang.pascal] Turbo Pascal for UNIX platforms?

rcronh@svin01.win.tue.nl (Ron Helwig) (06/13/91)

Hi netters,

does anyone know wether Borland is considering to port their Turbo Pascal
(and/or Basic, C, C++ etc.) products to the UNIX-workstation (SUN, DEC,
HP, IBM) environment? 
Are there any reasons why they wouldn't consider this?
I haven't followed this newsgroup lately, so this question may have been 
asked before. In that case, could someone e-mail me some postings about
this discussion?

Thanks in advance,

    Ron


=====================================================================
e-mail: rcronh@win.tue.nl       | Ron Helwig            Room  HG 6.01
                                | Eindhoven University  of Technology
phone:  +31 (0)40 472724        | P.O. Box 513, 5600 MB Eindhoven, NL

dmurdoch@watstat.waterloo.edu (Duncan Murdoch) (06/13/91)

In article <1983@svin02.info.win.tue.nl> rcronh@win.tue.nl writes:
>Hi netters,
>
>does anyone know wether Borland is considering to port their Turbo Pascal
>(and/or Basic, C, C++ etc.) products to the UNIX-workstation (SUN, DEC,
>HP, IBM) environment? 

As far as I know, there haven't been any announcements of anything like 
that.  TP, C and C++ have been ported to Windows under DOS, and they've
announced plans to port C++ (and possibly other languages) to OS/2 version
2.0, but so far nothing about Unix.

>Are there any reasons why they wouldn't consider this?

I can think of lots of reasons.  The main one is that the market for Unix
software is completely different from the market for DOS software, and
Borland only knows about DOS now.  For one thing, it's much smaller.  For
another, it's much more diverse.  

Duncan Murdoch
dmurdoch@watstat.waterloo.edu

kirchner@informatik.uni-kl.de (Reinhard Kirchner) (06/14/91)

From article <1983@svin02.info.win.tue.nl>, by rcronh@svin01.win.tue.nl (Ron Helwig):
> Hi netters,
> 
> does anyone know wether Borland is considering to port their Turbo Pascal
> (and/or Basic, C, C++ etc.) products to the UNIX-workstation (SUN, DEC,
> HP, IBM) environment? 
> Are there any reasons why they wouldn't consider this?

The Turbo languages are not 'standard', but contain LOTs of DOS specific and
even Intel 80x86 specific extensions ( link int-calls with registers ).
So you can NOT expect a Turbo program to run on any other processor or
even on a intel unix machine. It may run if it only uses the standard
subset of the language, but it is nearly impossible to write a nontrivial
program on a pc without using these extensions ( think about 64k limitations )

Reinhard Kirchner
Univ. Kaiserslautern, Germany
kirchner@uklirb.informatik.uni-kl.de

kirchner@informatik.uni-kl.de (Reinhard Kirchner) (06/19/91)

>From article <1983@svin02.info.win.tue.nl>, by rcronh@svin01.win.tue.nl (Ron Helwig):
> Hi netters,
> 
> does anyone know wether Borland is considering to port their Turbo Pascal
> (and/or Basic, C, C++ etc.) products to the UNIX-workstation (SUN, DEC,
> HP, IBM) environment? 
> Are there any reasons why they wouldn't consider this?

The Turbo languages are not 'standard', but contain LOTs of DOS specific and
even Intel 80x86 specific extensions ( link int-calls with registers ).
So you can NOT expect a Turbo program to run on any other processor or
even on a intel unix machine. It may run if it only uses the standard
subset of the language, but it is nearly impossible to write a nontrivial
program on a pc without using these extensions ( think about 64k limitations )

Reinhard Kirchner
Univ. Kaiserslautern, Germany
kirchner@uklirb.informatik.uni-kl.de

pshuang@athena.mit.edu (Ping-Shun Huang) (06/22/91)

In article <8066@uklirb.informatik.uni-kl.de> kirchner@informatik.uni-kl.de (Reinhard Kirchner) writes:

 > It may run if it only uses the standard subset of the language, but it
 > is nearly impossible to write a nontrivial program on a pc without using
 > these extensions ( think about 64k limitations )

I agree that code written in Turbo Pascal on Intel platforms would not
easily port to UNIX systems for various reasons, but I don't think this
would be one of the worst problems.  TP's solution for 64Kb code
segments is to implement units; on UNIX systems, a TP-compatible
compiler would simply compile *ALL* calls as being to 32-bit addresses,
whereas the current DOS versions are supposed to be generating 16-bit
calls internally to units and 32-bit calls between units.  Heck, the DOS
compiler could move to 32-bit calls also (thus implementing what C
usually calls the large model without any problems) in my opinion,
unless the programmer did something silly like count on the size of the
pointers.  As for the 64Kb limit on data object sizes, programmers were
left to their own devices, which usually meant that these objects were
broken up into pieces which are less than 64Kb.  When you move to a
linear memory model on UNIX, the broken-up method is less efficient but
should still work.

I would like to hear anyone's comments as to whether my understanding on
this matter is correct, or whether I have left out something important.

--
Above text where applicable is (c) Copyleft 1991, all rights deserved by:
UNIX:/etc/ping instantiated (Ping Huang) [INTERNET: pshuang@athena.mit.edu]

lowey@herald.usask.ca (Kevin Lowey,159 Physics,(306) 966-4826,(306) 249-3232) (06/22/91)

From pshuang@athena.mit.edu (Ping-Shun Huang):

> I agree that code written in Turbo Pascal on Intel platforms would not
> easily port to UNIX systems for various reasons, but I don't think this
> would be one of the worst problems.  TP's solution for 64Kb code
> segments is to implement units; on UNIX systems, a TP-compatible
> compiler would simply compile *ALL* calls as being to 32-bit addresses,
> whereas the current DOS versions are supposed to be generating 16-bit
> calls internally to units and 32-bit calls between units.  Heck, the DOS
> compiler could move to 32-bit calls also (thus implementing what C
> usually calls the large model without any problems) in my opinion,

Turbo Pascal currently has a compiler option that forces far calls for
everything.  Thus, right now, you can have 32 bit calls in MS-DOS.  However,
you are still limited to 64K data segments, and at most 64K an any one code
segment (each unit is in a different segment).

This is accurate to TP 5.5.  I haven't tried 6.0 yet.

- Kevin Lowey

vijay@topsun.Central.Sun.COM (Vijay S. Iyer - South Bay Sales) (06/28/91)

1) Does anybody have some feel for the difficulty involved in converting "SVS
   Pascal" to standard ANSI Pascal ? SVS Pascal is a commercial offering that
   I am told is like UCSD Pascal.

2) Are there any commercial/public_domain tools available that will make the
   conversion easy ?

Vijay.