Board index » delphi » Porting Borland Pascal Code

Porting Borland Pascal Code

Dear All,

A question I hope somebody may be able to help me with. I've written a
program which is in distribution via the internet. Its written in
Borland Pascal 7.0, and runs under DOS. It uses nothing other than good
'ol DOS, and no OOP techniques.

I received a question the other day, asking if my program ran, or would
ever run under Unix. They knew it was written in Borland Pascal, and
asked if I had considered, or was in the process of, porting it to GNU
Pascal (Which I've been unable to locate, I'm not sure if it exists, and
is probably a misunderstanding on their part).

As I've been unable to find GNU pascal, I wanted to ask the Pascal
programmers on these groups (comp.lang.pascal.misc and
comp.lang.pascal.borland) if anybody has any experience with taking a
Borland Pascal program to a Unix pascal compiler. I'm keen to use a
freely available Pascal compiler for Unix, but have so far been unable
to locate anything other than ISO compliant compilers (which will make
taking BP code there quite difficult), or pascal to C compilers (p2c),
which defeats the objective somewhat (although it does look quite
promising). The Free compilers list is quite out of date (the html
version included). Any suggestions, comments, thoughts, ideas, etc.?

On this note, the p2c compiler supports SOME but not all of the Borland
Pascal unit operations, notably "Findfirst" and "Findnext" for file
operations - does anybody know of any modifications that have been made
to support these operations?

Look forward to hearing from you soon.

Regards,

Richard Leyton.

(Sidenote - could you cc me on replies to this note if you can, our
newsserver has been a bit flakey of late)
--
Richard Leyton, AMS Management Systems Deutschland GmbH
mailto:richard_ley...@mail.amsinc.com
  http://www.brookes.ac.uk/~e0190404/home.html
  http://www.amsinc.com/
Opinions are my own, and not representative of AMS.

 

Re:Porting Borland Pascal Code


In article <315A8CA6....@mail.amsinc.com>
           richard_ley...@mail.amsinc.com "Richard Leyton" writes:

Quote
> A question I hope somebody may be able to help me with. I've written a
> program which is in distribution via the internet. Its written in
> Borland Pascal 7.0, and runs under DOS. It uses nothing other than good
> 'ol DOS, and no OOP techniques.

good 'ol DOS is half your problem...

Quote
> I received a question the other day, asking if my program ran, or would
> ever run under Unix. They knew it was written in Borland Pascal, and
> asked if I had considered, or was in the process of, porting it to GNU
> Pascal (Which I've been unable to locate, I'm not sure if it exists, and
> is probably a misunderstanding on their part).

It _does_ exist, (I don't know where, try gnu.misc perhaps?)

Quote

> As I've been unable to find GNU pascal, I wanted to ask the Pascal
> programmers on these groups (comp.lang.pascal.misc and
> comp.lang.pascal.borland) if anybody has any experience with taking a
> Borland Pascal program to a Unix pascal compiler. I'm keen to use a
> freely available Pascal compiler for Unix, but have so far been unable
> to locate anything other than ISO compliant compilers (which will make

There is also an alpha version of GNU Turbo Pascal, which is basically
a portable version of TP :-))  It's a bit flaky from what I've heard, which
is why its not fully released yet (but it is available)

Quote
> taking BP code there quite difficult), or pascal to C compilers (p2c),
> which defeats the objective somewhat (although it does look quite
> promising). The Free compilers list is quite out of date (the html
> version included). Any suggestions, comments, thoughts, ideas, etc.?

IME, p2c is useless; it hasn't worked for anything I've put through it yet,
and I've only fed it simple things recently.  I may have an old version
though.  YMMV.

Quote
> On this note, the p2c compiler supports SOME but not all of the Borland
> Pascal unit operations, notably "Findfirst" and "Findnext" for file
> operations - does anybody know of any modifications that have been made
> to support these operations?

Well, FindFirst and FindNext are a slightly different kettle of fish, as they
are essentially DOS functions wrapped up in a nice bit of TP code.  
Under unix, the equivalent functions are opendir(), readdir(), closedir()
and stat().  I don't know how you access them under gnu pascal.
Try comp.unix.programmer for info on accessing the system.

.splitbung
--
* TQ 1.0 * The 'Just So Quotes'.
"Research is what I'm doing when I don't know what I'm doing."
        -- Wernher von Braun

Re:Porting Borland Pascal Code


Quote
Tom Wheeley <t...@tsys.demon.co.uk> writes:
> There is also an alpha version of GNU Turbo Pascal, which is basically
> a portable version of TP :-))  It's a bit flaky from what I've heard, which
> is why its not fully released yet (but it is available)

Hmmmm. How much trouble would it be porting it to an 8-bit system, or
is that inherent in the existing code? I've got several 8-bit systems I
still use, and being able to use TP (even if I had to use it as a
cross-compiler) would be nice.

Leonard Erickson (aka Shadow)
 sha...@krypton.rain.com   <--preferred
leon...@qiclab.scn.rain.com        <--last resort

Re:Porting Borland Pascal Code


Quote
Mike Chapin wrote:

> I've heard of GNU Pascal. It's supposed to be a Borland Pascal compatible 32
> bit compiler with DOS and Unix versions. I think I saw it on
> ftp://x2ftp.oulu.fi/pub/msdos/programming/gnu

Upps, I think that you are wrong!
Can you or anyone else tell me where to get this compiler?

Tnx

--
-=!------------------------------------------------------------------------!=-
 Have a look at our WWW-Page http://www.informatik.uni-oldenburg.de/~virtech/
 Get the latest games, programs and demos from vIRtECH!  Get cool SOURCE CODE
 (Pascal/x86asm).  Have a look at our CPC Page or just make a journey through
 the BUNKR.   ATTENTION: The SOURCE of our PC Spiel Pinball is now available!

Re:Porting Borland Pascal Code


Quote
Mike Chapin wrote:

> I've heard of GNU Pascal. It's supposed to be a Borland Pascal compatible 32
> bit compiler with DOS and Unix versions. I think I saw it on
> ftp://x2ftp.oulu.fi/pub/msdos/programming/gnu

Upps, I think that you are wrong!
Can you or anyone else tell me where to get this compiler?

Tnx

--
-=!------------------------------------------------------------------------!=-
 Have a look at our WWW-Page http://www.informatik.uni-oldenburg.de/~virtech/
 Get the latest games, programs and demos from vIRtECH!  Get cool SOURCE CODE
 (Pascal/x86asm).  Have a look at our CPC Page or just make a journey through
 the BUNKR.   ATTENTION: The SOURCE of our PC Spiel Pinball is now available!

Other Threads