Intel Pascal 286 not supported by p2c! Help! 
Author Message
 Intel Pascal 286 not supported by p2c! Help!

Hi all,

I use to program in Pascal at universite but it was 14 years ago!
I'm mostly a C/C++ programmer since then. That's why I need your help.

I have 80000 code lines to translate into C or C++. The original
code was made in pascal and PLM. The pascal compiler was
Intel Pascal 286 for IRMX.

The destination is C or C++ on QNX. I've start to take a look at
the translator p2c but that translator doesn't support the Intel
Pascal 286 dialect! Is there a way to make it works? Anyone has
done this? I don't remember pascal enough to see what's appening.
And why all these errors. I'll try to find my old pascal book.

Is there a document somewhere that could tell me the syntax difference
between Intel Pascal 286 and any other flavors supported by p2c
(HP, HP-UX, Turbo, UCSD, MPW, VAX, Oregon, Berk, TIP, Apollo)? Is there
a filter that can convert the intel pascal to one of these flavors?

I plan to write a awk/perl/python or what it will need to change
the flavor of my pascal source. Any experience with that?

Best regards,

jean




Tue, 30 Aug 2005 04:23:58 GMT  
 Intel Pascal 286 not supported by p2c! Help!

Quote:

> Hi all,

> I use to program in pascal at universite but it was 14 years ago!
> I'm mostly a C/C++ programmer since then. That's why I need your help.

> I have 80000 code lines to translate into C or C++. The original
> code was made in pascal and PLM. The pascal compiler was
> Intel Pascal 286 for IRMX.

> The destination is C or C++ on QNX. I've start to take a look at
> the translator p2c but that translator doesn't support the Intel
> Pascal 286 dialect! Is there a way to make it works? Anyone has
> done this? I don't remember pascal enough to see what's appening.
> And why all these errors. I'll try to find my old pascal book.

> Is there a document somewhere that could tell me the syntax difference
> between Intel Pascal 286 and any other flavors supported by p2c
> (HP, HP-UX, Turbo, UCSD, MPW, VAX, Oregon, Berk, TIP, Apollo)? Is there
> a filter that can convert the intel pascal to one of these flavors?

> I plan to write a awk/perl/python or what it will need to change
> the flavor of my pascal source. Any experience with that?

> Best regards,

> jean



p2c is supposed to be fairly compliant with the Pascal standard. If your
program was fairly standard, it should be no problem.

In general, unless your program is huge, it will likely be less trouble
to simply modify what is different by hand. If the program is exceedingly
nonstandard, and hand modification is not practical, then I personally
doubt it can be saved.



Tue, 30 Aug 2005 07:17:08 GMT  
 Intel Pascal 286 not supported by p2c! Help!

Quote:

> I use to program in pascal at universite but it was 14 years ago!
> I'm mostly a C/C++ programmer since then. That's why I need your help.

> I have 80000 code lines to translate into C or C++. The original
> code was made in pascal and PLM. The pascal compiler was
> Intel Pascal 286 for IRMX.

> The destination is C or C++ on QNX. I've start to take a look at
> the translator p2c but that translator doesn't support the Intel
> Pascal 286 dialect! Is there a way to make it works? Anyone has
> done this? I don't remember pascal enough to see what's appening.
> And why all these errors. I'll try to find my old pascal book.

> Is there a document somewhere that could tell me the syntax difference
> between Intel Pascal 286 and any other flavors supported by p2c
> (HP, HP-UX, Turbo, UCSD, MPW, VAX, Oregon, Berk, TIP, Apollo)? Is there
> a filter that can convert the intel pascal to one of these flavors?

> I plan to write a awk/perl/python or what it will need to change
> the flavor of my pascal source. Any experience with that?

I suggest you revise your code to standard Pascal, either to
ISO7185 or to ISO10206 (if you need the added capabilities).  You
can compile and test the result with GPC (or any other ISO
compliant system).  When you have a working version in real Pascal
you can then reconsider conversion to C, but you probably won't
want to unless you need to port to places with C and without
Pascal.

If you use GPC make sure you disable the GNU extensions so that
you end up with portable source.  Use either --standard-pascal or
--extended-pascal command line switches.

This won't help you with PLM.  Such sections will need complete
rewriting.  But if the Intel Pascal was any good the remainder of
the revision should be fairly easy, if tedious.  Pascal is
intrinsicaly a much more portable language than C, however
unwarrented extensions and the lack of implementations have caused
C to be the actual portability choice.

--

   Available for consulting/temporary embedded and systems.
   <http://cbfalconer.home.att.net>  USE worldnet address!



Tue, 30 Aug 2005 08:30:26 GMT  
 Intel Pascal 286 not supported by p2c! Help!

Quote:

> This won't help you with PLM.  Such sections will need complete
> rewriting.  But if the Intel Pascal was any good the remainder of
> the revision should be fairly easy, if tedious.  Pascal is
> intrinsicaly a much more portable language than C, however
> unwarrented extensions and the lack of implementations have caused
> C to be the actual portability choice.

I saw the Intel Pascal users manual some years back. They were very
carefull about standardization, including highlighting all the sections
where extentions were discussed.


Tue, 30 Aug 2005 15:16:14 GMT  
 Intel Pascal 286 not supported by p2c! Help!

 > I suggest you revise your code to standard Pascal, either to
 > ISO7185 or to ISO10206 (if you need the added capabilities).

That's what I planed to do but I don't know the difference between
standard Pascal and Intel Pascal!

Any good books or web links to suggest!

Thanks for the reply.

Jean



Tue, 30 Aug 2005 20:06:03 GMT  
 Intel Pascal 286 not supported by p2c! Help!

Quote:

> > I suggest you revise your code to standard Pascal, either to
> > ISO7185 or to ISO10206 (if you need the added capabilities).

> That's what I planed to do but I don't know the difference
> between standard Pascal and Intel Pascal!

> Any good books or web links to suggest!

If it isn't in ISO7185 or ISO10206 it is non-standard.  Just
compile it against one of those standards  and the errors will
give you some initial clues.  When in doubt, look up the
appropriate standard.  They are all available free, as is gpc.
Don't use FPC or any Borland/Turbo stuff, because they are
non-standard.

Scott Moore has been putting a FAQ on this group (ansi-iso)
recently, which leads to various places, including his own site
and PascalCentral.

--

   Available for consulting/temporary embedded and systems.
   <http://cbfalconer.home.att.net>  USE worldnet address!



Wed, 31 Aug 2005 00:03:20 GMT  
 Intel Pascal 286 not supported by p2c! Help!

Quote:


>> > I suggest you revise your code to standard Pascal, either to
>> > ISO7185 or to ISO10206 (if you need the added capabilities).

>> That's what I planed to do but I don't know the difference
>> between standard Pascal and Intel Pascal!

>> Any good books or web links to suggest!

> If it isn't in ISO7185 or ISO10206 it is non-standard.  Just
> compile it against one of those standards  and the errors will
> give you some initial clues.  When in doubt, look up the
> appropriate standard.  They are all available free, as is gpc.
> Don't use FPC or any Borland/Turbo stuff, because they are
> non-standard.

p2c understands the Borland dialects, so that would be no problem. He has to
test to see what the easiest route is.


Wed, 31 Aug 2005 00:20:54 GMT  
 Intel Pascal 286 not supported by p2c! Help!

Quote:


>>>I suggest you revise your code to standard Pascal, either to
>>>ISO7185 or to ISO10206 (if you need the added capabilities).

>>That's what I planed to do but I don't know the difference
>>between standard Pascal and Intel Pascal!

>>Any good books or web links to suggest!

> If it isn't in ISO7185 or ISO10206 it is non-standard.  Just
> compile it against one of those standards  and the errors will
> give you some initial clues.  When in doubt, look up the
> appropriate standard.  They are all available free, as is gpc.
> Don't use FPC or any Borland/Turbo stuff, because they are
> non-standard.

> Scott Moore has been putting a FAQ on this group (ansi-iso)
> recently, which leads to various places, including his own site
> and PascalCentral.

Thanks for the hints! I just install fpc!!! I'll install gpc
insteed! I'll look at different dialects in parallel to find
which one is closer to Intel Pascal to do a script converter
between those.

Thanks again for the information.

regards,

Jean



Wed, 31 Aug 2005 01:25:48 GMT  
 Intel Pascal 286 not supported by p2c! Help!

Quote:


> > > I suggest you revise your code to standard Pascal, either to
> > > ISO7185 or to ISO10206 (if you need the added capabilities).

> > That's what I planed to do but I don't know the difference
> > between standard Pascal and Intel Pascal!

> > Any good books or web links to suggest!

> If it isn't in ISO7185 or ISO10206 it is non-standard.  Just
> compile it against one of those standards  and the errors will
> give you some initial clues.  When in doubt, look up the
> appropriate standard.  They are all available free, as is gpc.
> Don't use FPC or any Borland/Turbo stuff, because they are
> non-standard.

> Scott Moore has been putting a FAQ on this group (ansi-iso)
> recently, which leads to various places, including his own site
> and PascalCentral.

> --

>    Available for consulting/temporary embedded and systems.
>    <http://cbfalconer.home.att.net>  USE worldnet address!

You can find a text document going over the rules of standard Pascal
at:

http://www.moorecad.com/standardpascal/isorules.txt

You can find the documents that describe the official standards, in
various formats, here:

http://www.moorecad.com/standardpascal/standards.html



Wed, 31 Aug 2005 02:20:11 GMT  
 Intel Pascal 286 not supported by p2c! Help!
Hi Jean,
If you haven't found a solution to this problem Pascal to C/C++, perhaps I
can help you.  

I am the inventor and major implementer of the X4MR software translation
system, as described in www.actworld.com.  We have Production systems that
can translate complete software systems(Pascal, PL/M, CHILL,...) into
compilable/maintainable C/C++ "overnight".

If you would like a demonstration and quote for the complete job, respond
to the website and with a ZIP file of representitive Pascal and a
description of the problems/size/rest, or even the whole thing!

Regards, Bob



Quote:
>Hi all,

>I use to program in pascal at universite but it was 14 years ago!
>I'm mostly a C/C++ programmer since then. That's why I need your help.

>I have 80000 code lines to translate into C or C++. The original
>code was made in pascal and PLM. The pascal compiler was
>Intel Pascal 286 for IRMX.

>The destination is C or C++ on QNX. I've start to take a look at
>the translator p2c but that translator doesn't support the Intel
>Pascal 286 dialect! Is there a way to make it works? Anyone has
>done this? I don't remember pascal enough to see what's appening.
>And why all these errors. I'll try to find my old pascal book.

>Is there a document somewhere that could tell me the syntax difference
>between Intel Pascal 286 and any other flavors supported by p2c
>(HP, HP-UX, Turbo, UCSD, MPW, VAX, Oregon, Berk, TIP, Apollo)? Is there
>a filter that can convert the intel pascal to one of these flavors?

>I plan to write a awk/perl/python or what it will need to change
>the flavor of my pascal source. Any experience with that?

>Best regards,

>jean





Sat, 03 Sep 2005 22:04:54 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. 286/287 instructions are not enabled

2. Help with protected mode on a 286

3. TLINK 6.0 won't work on 286

4. BDE on PC 286

5. Capability Not supported.....why not?

6. ANNOUNCEMENT: p2c -- David Gillespies Pascal to C translator

7. Help: TUpdateSQL not support updates for MEMO field!!

8. BatchMove - Capability not supported ? Help

9. Help! DBGrid does not support clipboard

10. please help. looking for pascal will run on old 286

11. borland pascal programs don't run with intel pentium II

12. GNU Pascal on Intel

 

 
Powered by phpBB® Forum Software