Re: Problems with FORT and ALGOL in TSS/8

2020-12-08 Thread Josh Dersch via cctalk
On Thu, Dec 3, 2020 at 9:38 PM Josh Dersch  wrote:

> On Thu, Dec 3, 2020 at 6:13 PM Kevin Jordan via cctalk <
> cctalk@classiccmp.org> wrote:
>
>>
>>
>> Specifically, in the case of FORTRAN, the compiler exits with an error
>> code
>> 6204. This occurs even when trying to compile trivial "hello world"
>> programs, and it appears to occur in all other TSS/8 distributions we've
>> tried as well (i.e., this particular problem is not unique to the LCM+L
>> distribution). We haven't found error code 6204 specifically documented in
>> the TSS/8 user/admin manuals, but the manuals do document other error
>> codes
>> in the 62xx range. Documented error codes in the 62xx range appear to
>> reflect file I/O errors, so we're wondering if perhaps one of the files
>> supporting the FORTRAN compiler is corrupt in all of these distributions.
>>
>
> The LCM+L variant is built starting from the same disk image as all the
> other TSS/8 systems out there (which was originally taken from John
> Wilson's TSS/8 system).  I extended the filesystem to a full megaword (the
> maximum supported by TSS/8) for the RK05 image.
>
> I suspect you may be right that FORTRAN is corrupted, I'll take a look
> this weekend.  I'll admit to not having played with it; though I did test
> out everything else.
>

Finally had a chance to look at this.  The 6204 error message is documented
in the EDUSYSTEM 50 guide here:

http://bitsavers.informatik.uni-stuttgart.de/pdf/dec/pdp8/tss8/DEC-08-E50UA-A-D_UG_Aug75.pdf

See page 6-49:

"6204 Error in reading the compiler, FDCOMP.  Must be stored under
account 2."

And yes, the library account (2) is missing FDCOMP.SAV, and I know of no
existing copy of this code anywhere, unfortunately.  Perhaps it will turn
up somewhere someday, on a DECtape gathering dust on someone's shelf.  I
really do wish more TSS/8 stuff was out there, but I suppose we should be
thankful that any of it survived.

- Josh


Re: Problems with FORT and ALGOL in TSS/8

2020-12-04 Thread Paul Koning via cctalk



> On Dec 4, 2020, at 12:38 AM, Josh Dersch via cctalk  
> wrote:
> 
> On Thu, Dec 3, 2020 at 6:13 PM Kevin Jordan via cctalk <
> cctalk@classiccmp.org> wrote:
> 
>> ...
>> The problem we're experiencing with ALGOL appears to be a glaring compiler
>> bug, but the compiler was distributed widely through DECUS, and it is
>> difficult to imagine that it would have been released with an obvious bug,

DECUS just distributed what it was given; there is no QA or review process.  If 
the author submitted bad code, nothing DECUS would  do would get in the way.

>   We suspect that this compiler just has a lot of bugs.
> 
> Note also that Appendix E (page E-1) suggests that ALL 'END' statements be
> followed by a ";".  This seemed to help at least with getting the compiler
> to stop giving us errors.  Note that despite this suggestion, the examples
> in Appendix E fail to follow this guideline.

That's certainly a pretty bizarre suggestion.  It's legal code either way, but 
in ALGOL (and PASCAL) semicolon is a separator, NOT a terminator, and the 
suggestion makes it appear that the authors don't understand the language well 
enough to know this.  That clearly isn't a recipe for a reliable compiler.

I thought ALGOL-11 (by Barry Folsom) was derived from ALGOL-8.  Maybe that's a 
different ALGOL-8, or maybe I'm just confused.  That ALGOL looks like a subset 
of Burroughs extended ALGOL.

paul




Re: Problems with FORT and ALGOL in TSS/8

2020-12-03 Thread Josh Dersch via cctalk
On Thu, Dec 3, 2020 at 6:13 PM Kevin Jordan via cctalk <
cctalk@classiccmp.org> wrote:

> Hi everyone,
>
> The Nostalgic Computing Center  has a
> virtual PDP-8 running TSS/8
> <
> http://www.nostalgiccomputing.org:8080/aterm.html?m=pdp8&t=PDP-8&r=24&c=80
> >
> in its collection. We use the SIMH PDP-8e emulator to support the machine,
> and we recently updated the machine to run the TSS/8 distribution created
> by LCM+L, found here on GitHub
> . The LCM+L
> distribution
> is slightly different from other TSS/8 distributions available on the web
> in that it provides some additional goodies such as ALGOL and LISP.
>
> The NCC demonstrates how various classic computers worked by providing
> automated scripts that interact with the machines in the collection.
> For example, to demonstrate each of the programming languages supported by
> a machine, scripts are provided to create, compile, and run a simple
> Fibonacci sequence generator. We've done this for the TSS/8 system, but the
> scripts aren't working for FORTRAN or ALGOL, and we're wondering if anyone
> on this list might know why.
>
> Specifically, in the case of FORTRAN, the compiler exits with an error code
> 6204. This occurs even when trying to compile trivial "hello world"
> programs, and it appears to occur in all other TSS/8 distributions we've
> tried as well (i.e., this particular problem is not unique to the LCM+L
> distribution). We haven't found error code 6204 specifically documented in
> the TSS/8 user/admin manuals, but the manuals do document other error codes
> in the 62xx range. Documented error codes in the 62xx range appear to
> reflect file I/O errors, so we're wondering if perhaps one of the files
> supporting the FORTRAN compiler is corrupt in all of these distributions.
>

The LCM+L variant is built starting from the same disk image as all the
other TSS/8 systems out there (which was originally taken from John
Wilson's TSS/8 system).  I extended the filesystem to a full megaword (the
maximum supported by TSS/8) for the RK05 image.

I suspect you may be right that FORTRAN is corrupted, I'll take a look this
weekend.  I'll admit to not having played with it; though I did test out
everything else.


>
> For example, here is a transcription of a simple session demonstrating the
> problem:
>
>



>
> Note that BASIC, FOCAL, and LISP all seem to run very nicely on the
> machine.
>
> The problem we're experiencing with ALGOL appears to be a glaring compiler
> bug, but the compiler was distributed widely through DECUS, and it is
> difficult to imagine that it would have been released with an obvious bug,
>

I don't know if that's an accurate statement.  Have you looked at Appendix
E of the manual?  There are a ton of errata there.  For example, on page
E-2:

"Boolean operator 'AND' does not function properly at all times for example:
 T = true
 F = false
 T 'AND' T -> T Correct
 T 'AND' F -> T Wrong, should be F
 F 'AND' T -> T Wrong, should be F"

The TSS/8 version of ALGOL fixes this bug but there are others.  A friend
of mine recently spent an evening trying to get a small ALGOL program to
compile and run on my online TSS/8 system and failed utterly; after a lot
of effort it finally compiles, but produces no output when run and we're
both pretty stumped about it.  We suspect that this compiler just has a lot
of bugs.

Note also that Appendix E (page E-1) suggests that ALL 'END' statements be
followed by a ";".  This seemed to help at least with getting the compiler
to stop giving us errors.  Note that despite this suggestion, the examples
in Appendix E fail to follow this guideline.

- Josh


Problems with FORT and ALGOL in TSS/8

2020-12-03 Thread Kevin Jordan via cctalk
Hi everyone,

The Nostalgic Computing Center  has a
virtual PDP-8 running TSS/8

in its collection. We use the SIMH PDP-8e emulator to support the machine,
and we recently updated the machine to run the TSS/8 distribution created
by LCM+L, found here on GitHub
. The LCM+L distribution
is slightly different from other TSS/8 distributions available on the web
in that it provides some additional goodies such as ALGOL and LISP.

The NCC demonstrates how various classic computers worked by providing
automated scripts that interact with the machines in the collection.
For example, to demonstrate each of the programming languages supported by
a machine, scripts are provided to create, compile, and run a simple
Fibonacci sequence generator. We've done this for the TSS/8 system, but the
scripts aren't working for FORTRAN or ALGOL, and we're wondering if anyone
on this list might know why.

Specifically, in the case of FORTRAN, the compiler exits with an error code
6204. This occurs even when trying to compile trivial "hello world"
programs, and it appears to occur in all other TSS/8 distributions we've
tried as well (i.e., this particular problem is not unique to the LCM+L
distribution). We haven't found error code 6204 specifically documented in
the TSS/8 user/admin manuals, but the manuals do document other error codes
in the 62xx range. Documented error codes in the 62xx range appear to
reflect file I/O errors, so we're wondering if perhaps one of the files
supporting the FORTRAN compiler is corrupt in all of these distributions.

For example, here is a transcription of a simple session demonstrating the
problem:

.R EDIT

 INPUT:
OUTPUT:FTEST
A
  WRITE(1,10)
10FORMAT(5HHELLO,/)
  END

E
^BS
.R FORT

 INPUT:FTEST
OUTPUT:
6204^BS

.


We tried enabling the floating point processor to see if lack of FPP might
cause FORT to abort, but enabling the FPP did not solve the problem. The
SIMH configuration file for the machine currently looks like:

set throttle 800K
set df disabled
set rf disabled
set rk enabled
set dt enabled
att rk0 tss8_rk_lcm.dsk

set cpu 32k
attach ttix 4000

load boot.bin
run 200


Note that BASIC, FOCAL, and LISP all seem to run very nicely on the machine.

The problem we're experiencing with ALGOL appears to be a glaring compiler
bug, but the compiler was distributed widely through DECUS, and it is
difficult to imagine that it would have been released with an obvious bug,
so we are wondering if perhaps we're not interpreting the user manual

correctly. Here is a transcription of a session that exhibits the problem:

.R EDIT

 INPUT:
OUTPUT:ATEST
A

'BEGIN'

  'INTEGER' I;

  I := 1;

  WRITE(1, I); SKIP

'END'
$


E
^BS
.R ALGOL

 INPUT:ATEST
OUTPUT:

*TOO MANY UNDEFINED [UEXPRESSION*

^BS
.


The compiler seems to be complaining that the simple assignment statement
on line 3 of the program is somehow incorrect. If we change the statement
to "I := 1 + 0;", the error message goes away,  and the program runs, but
it prints "0" instead of the expected "1".  Also, if we change the program
to:

'BEGIN'
  'INTEGER' I;

  'FOR' I := 1 'STEP' 1 'UNTIL' 10 'DO'
  'BEGIN'

WRITE(1, I); SKIP
  'END'
'END'

$


it compiles successfully and it prints what is expected, the numbers 1
through 10.

Does anyone have experience with the ALGOL/8 compiler? If so, does this
behavior make sense, and can you let us know what we're doing wrong?

Note that the same ALGOL60 program compiles and runs as expected on the CDC
mainframes and the TOPS-20 system at the NCC.

thanks!
Kevin