Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sun Pascal "-xl" Option?

144 views
Skip to first unread message

Michael Engel

unread,
Oct 22, 2012, 5:12:25 PM10/22/12
to
Hi,

I'm currently trying to resurrect a ca. 30 year old code base which
was originally written in Apollo Pascal on Domain/OS and later ported
to SunOS using the Sun Pascal compiler's "-xl" compatibility option.
The code uses various Apollo-isms, including the Apollo coprocessor
for Pascal.

However, the only Sun Pascal version I have access to is actually too
ancient, since it doesn't support the -xl option:

1.1 Pascal Sun-3(TM) SUNBIN, Part Number: 700-1711-10 Rev.A

This was intended for SunOS 4.0 and runs fine on SunOS 4.1.1 on the
tme emulator emulating a 3/160 (that was easier than getting my trusty
old 3/60 out of the basement) but is unfortunately of little help.

Obviously, in order to get this code running, I need a more recent
Pascal compiler. Does anyone know which versions of Sun Pascal
actually supported the compatibility mode? I know Sun WorkShop 4.0
using Sun Pascal 4.2 supports the -xl flag, but I would be interested
which other versions would also work.

Porting the ca. 200k LOC code base to something more recent like Free
Pascal is a long-term option, but that probably won't be trivial.

-- Michael

oscar.d...@gmail.com

unread,
Oct 22, 2012, 6:16:58 PM10/22/12
to
On Monday, 22 October 2012 17:12:25 UTC-4, Michael Engel wrote:

> I'm currently trying to resurrect a ca. 30 year old code base which
> was originally written in Apollo Pascal on Domain/OS and later ported
> to SunOS using the Sun Pascal compiler's "-xl" compatibility option.

wow! :-)

> Obviously, in order to get this code running, I need a more recent
> Pascal compiler. Does anyone know which versions of Sun Pascal
> actually supported the compatibility mode? I know Sun WorkShop 4.0
> using Sun Pascal 4.2 supports the -xl flag, but I would be interested
> which other versions would also work.

docs.oracle.com still has the old docs.sun.com manuals.
Googling for "Sun Pascal site:oracle.com" you can find:

http://docs.oracle.com/cd/E19957-01/801-5054/801-5054.pdf
"Pascal 3.0.2 User's Guide" which mentions the -xl Apollo flag

Good luck!

Cydrome Leader

unread,
Oct 24, 2012, 1:02:33 PM10/24/12
to
200,000 lines of pascal?

this is a joke, right?


Richard B. Gilbert

unread,
Oct 24, 2012, 4:11:52 PM10/24/12
to
If it's a joke, it's a sick joke!

An off the cuff estimate: $24,000,000!!!!!! And that's IF you are very
lucky! It might be faster and cheaper to write it from scratch! Put
your programing team on suicide watch!

Programming in the 1970s and 1980s was done mostly by students who knew
little or nothing about computers and/or programming. Structure???
Hahahahahahahahahahaha!!!!!!!! Documentation??????????????!!!!!!!
Consider yourself lucky if you find ANY documentation 1970-1990!

Ian Collins

unread,
Oct 24, 2012, 4:36:26 PM10/24/12
to
Well.... I worked on a medium sized Pascal project in the early 80s
(DEC PDP11 multi-tasking Pascal, which was rather good) and we had to
supply a ton of documentation. Mind you, the client was the US defence
department and we were convinced they weighed it rather than read it!

--
Ian Collins

Michael Engel

unread,
Oct 24, 2012, 6:17:47 PM10/24/12
to
On Oct 24, 7:02 pm, Cydrome Leader <prese...@MUNGEpanix.com> wrote:
> Michael Engel <cuby.en...@googlemail.com> wrote:
> > Porting the ca. 200k LOC code base to something more recent like Free
> > Pascal is a long-term option, but that probably won't be trivial.
>
> 200,000 lines of pascal?
>
> this is a joke, right?

No. Unfortunately, this was a code base inherited from older (Siemens,
Nixdorf, mainframe) Pascal compilers that did not support modules or
libraries. Thus, we have quite a bit of code duplication. It would be
great to use modern Pascal module features, but this will be quite a
bit more of work, I'm afraid...

Btw., this is the source code base for one of the first HDLs (hardware
description languages), developed in Germany in the 1970's and 1980's
over the course of about 15 years.

I now managed to get most of the code to compile in an Apollo Domain
emulator under Domain/OS 10.4 (sloooow). However, compiling on one of
our Solaris/SPARC machines would probably be more fun. Someone seems
to have thrown away all of our old SPARCompiler/Sun FORTE/Sun Studio
media and licences, it seems...

Best,
Michael

Richard B. Gilbert

unread,
Oct 24, 2012, 8:43:32 PM10/24/12
to Ian Collins
You might be fully justified in your suspicions! I served in the US
Army and many of my observations support your suspicions! The whole
damned Army might die and no one would care as long as the paperwork
was filled out correctly!

Michael Kraemer

unread,
Oct 24, 2012, 9:20:05 PM10/24/12
to
Michael Engel schrieb:

> I now managed to get most of the code to compile in an Apollo Domain
> emulator under Domain/OS 10.4 (sloooow). However, compiling on one of
> our Solaris/SPARC machines would probably be more fun. Someone seems
> to have thrown away all of our old SPARCompiler/Sun FORTE/Sun Studio
> media and licences, it seems...

Some time ago Sun/Oracle had license keys for the older
workshop compilers online for download.
The sun3arc archive seems to have a Pascal compiler as well
(for those 68k boxes you did not want to resurrect :-)

Jim Leonard

unread,
Oct 24, 2012, 10:52:06 PM10/24/12
to
On Oct 22, 4:12 pm, Michael Engel <cuby.en...@googlemail.com> wrote:
> Obviously, in order to get this code running, I need a more recent
> Pascal compiler. Does anyone know which versions of Sun Pascal
> actually supported the compatibility mode? I know Sun WorkShop 4.0
> using Sun Pascal 4.2 supports the -xl flag, but I would be interested
> which other versions would also work.

If you turn up short, for a really long shot, you can try Free Pascal
(www.freepascal.org) which lists requirements of any sparc machine
running sparc Linux. As a lark, you could try compiling and linking a
STATIC binary and then seeing if that runs on a more modern Solaris.

Michael Engel

unread,
Oct 25, 2012, 3:14:11 AM10/25/12
to
On Oct 25, 3:20 am, Michael Kraemer <M.Krae...@gsi.de> wrote:
> Michael Engel schrieb:
>
> > I now managed to get most of the code to compile in an Apollo Domain
> > emulator under Domain/OS 10.4  (sloooow). However, compiling on one of
> > our Solaris/SPARC machines would probably be more fun. Someone seems
> > to have thrown away all of our old SPARCompiler/Sun FORTE/Sun Studio
> > media and licences, it seems...
>
> Some time ago Sun/Oracle had license keys for the older
> workshop compilers online for download.

Thanks, that's extremely useful! I found some reference and a license
file for a non expiring demo on archive.org, including "WS Compiler
Pascal SPARC, 4.2":
http://web.archive.org/web/20080220024130/http://www.sun.com/software/licensingcenter/sundev.xml
(only the first link to a license file actually works, the rest
redirects to Oracle). Now I just need to find the related install
CD...

> The sun3arc archive seems to have a Pascal compiler as well
> (for those 68k boxes you did not want to resurrect :-)

I know. However, that Pascal compiler is in fact too old to support
the -xl flag - I ran it on SunOS 4.1.1 in the tme emulator.

-- Michael

Michael Engel

unread,
Oct 25, 2012, 3:17:49 AM10/25/12
to
The problem is not running the binary (in fact, one of our source code
archives has working binaries compiled for Solaris 2), but finding a
compiler that supports the nonstandard Apollo Pascal extensions that
were introduced into the code base some time in the past. There seem
to be only two compilers that support these extensions - the original
Apollo Pascal compiler on Aegis/Domain/OS and the Sun Pascal compilers
for SPARC.

However, porting the code to a free Pascal compiler will definitely be
a useful approach. I wanted to make sure in advance that the code we
had actually compiled in the original environment. After 20 years, you
never know...

-- Michael

Michael Kraemer

unread,
Oct 25, 2012, 3:23:30 AM10/25/12
to
Michael Engel schrieb:

> Thanks, that's extremely useful! I found some reference and a license
> file for a non expiring demo on archive.org, including "WS Compiler
> Pascal SPARC, 4.2":

That's it, I believe.

> http://web.archive.org/web/20080220024130/http://www.sun.com/software/licensingcenter/sundev.xml
> (only the first link to a license file actually works, the rest
> redirects to Oracle). Now I just need to find the related install
> CD...

I happen to have a Try & Buy Workshop (3?) CD, of 1997 vintage,
for Solaris 2.4 through 2.7, maybe this will do the job?

ChrisQ

unread,
Oct 25, 2012, 5:24:02 PM10/25/12
to
Another option might be to write a parser / translator to remove / convert
the non standard code to something more standard. No idea what the syntax
differences are, but it must be possible to translate. There's so much code
that you really need to find a way to automate the process.

Use all available tools. More than one way to skin the cat etc :-)...

Regards,

Chris

Michael

unread,
Oct 26, 2012, 6:23:03 AM10/26/12
to
Hi,
What a nonse post! where did you work if ever?

/michael


Michael

unread,
Oct 26, 2012, 6:40:37 AM10/26/12
to
Hi,
We did everything in Pascal at that time,crosscompiled on VAXen, big big
system!

Ever heard about Erlang and its predecessor, ERIPascal and ERIOS :)

Guess where they was and are used?


/michael

http://www.gull.us/humor/vaxen.html

Michael Engel

unread,
Oct 26, 2012, 10:47:04 AM10/26/12
to
(crossposted to comp.lang.pascal.misc - I found a weird bug while
using an old Sun Pascal compiler on an ancient code base and am
wondering if it's the compiler or myself who is wrong here...)

Hello all,

first, thank you all for your helpful and interesting comments. An
estimate of $24 million for our 200k LOC Pascal code base sounds nice.
Fortunately, it's not a commercial, but an academic project, so we are
used to wasting money anyways :-).

Thanks to a helpful reader, I managed to obtain the Sun SC4.2 Pascal
compiler and the related license key, which run happily on a Sparc
V240 under Solaris 9. There is a y2k-related patch (Patch-ID#
104632-11) that also seems to cure some problems with incorrectly
generated code, however the following strange problem remains.

When I try to check if a value is an element of a given set (in the
condition of an IF or UNTIL clause) and the expression giving the
result set to test against is a composite expression, incorrect
results are returned. I managed to create a rather small example,
derived from our 20 years old original code base:

program t(input, output);

type tok = 0..250;
var fsyms: set of tok;
var q: set of tok;
var i: integer;
var SY_A, SY_B, SY_C, SY_D: integer;
var SymMax: integer := 250;

begin
SY_A:=7;
SY_B:=42;
SY_C:=111;
SY_D:=214;

fsyms := [SY_A, SY_B, SY_C];
q := [SY_D];

write('Add var+const: ');
for i := 0 to SymMax do if i in (fsyms+[SY_D]) then write(i);
writeln;

write('Add const+var: ');
for i := 0 to SymMax do if i in ([SY_D]+fsyms) then write(i);
writeln;

write('Add var1+var2: ');
for i := 0 to SymMax do if i in (fsyms+q) then write(i);
writeln;

write('Add var2+var1: ');
for i := 0 to SymMax do if i in (q+fsyms) then write(i);
writeln;

write('var preadded: ');
fsyms := fsyms + [SY_D];
for i := 0 to SymMax do if i in (fsyms) then write(i);
writeln;

end.

The code base was developed (among others) using Apollo's Domain
Pascal compiler, so it has some extensions over ISO Pascal (enabled by
the -xl command line flag for Sun Pascal) and also some omissions. One
notable omission is that an iterator like "for i in [set] do...end;"
is not available. Thus the workaround in the code above in order to
print a set's contents.

The program is compiled using the command line
$ pc -xl -o t t.pas
and generates the following result:

Add var+const:
Add const+var: 7 42 111
Add var1+var2: 7 42 111 214
Add var2+var1: 7 42 111 214
var preadded: 7 42 111 214

I would have expected that all five variants return the same
information, i.e. the set [7,42,111,214]. To me, this seems like a
compiler bug. However, since my last serious Pascal programming is >20
years ago, I would be happy if someone could confirm that my code is
actually correct.

The problem showed up when trying to run our code base newly compiled
using that Sun Pascal compiler (on Apollo Pascal the original code
from which I extracted that example runs without any problems, older
Solaris binaries of the affected program compiled with an unknown (to
me), older version of Sun Pascal from ca. 1991 work as expected.

In addition, if anyone knows where to find more recent patches for Sun
Pascal, that might also be helpful.

Thanks, Michael

Richard B. Gilbert

unread,
Oct 26, 2012, 2:30:34 PM10/26/12
to
U.S. Army and then Princeton University,School of Engineering and
Applied Science. I was writing FORTRAN code for the IBM 360 Model 91.
In 1970, practically no one knew anything about computer programming. I
learned Assembler Language for SDS 900 series in the Army. I learned
FORTRAN for the IBM System/360 from "A Guide to FORTRAN Programming" at
Princeton University. I spent almost twenty years at Princeton. By that
time computers and, particularly, 80x86 PCs had become quite common.

Twenty years later, the PC had become commonplace! Students almost
had to have one. I don't recall if having a PC was mandatory but it was
close!

Cydrome Leader

unread,
Oct 30, 2012, 1:48:47 PM10/30/12
to
students and schools still know nothing about programming.

cfengine and amanda come to mind as completeley stupid products written by
people that have never worked for a real business.


Jim Leonard

unread,
Oct 30, 2012, 2:52:41 PM10/30/12
to
On Oct 30, 12:48 pm, Cydrome Leader <prese...@MUNGEpanix.com> wrote:
> cfengine and amanda come to mind as completeley stupid products written by
> people that have never worked for a real business.

What is your preferred alternative to cfengine? (I'm guessing puppet)

Cydrome Leader

unread,
Nov 1, 2012, 5:34:53 PM11/1/12
to
Jim Leonard <moby...@gmail.com> wrote:
lists, loop and scp.

I can actually control what's happening with that, and generate logs and
expect predictable behavior.

cfengine is more insane that the people who yell at trash cans at the bus
station.


0 new messages