[Simh] Crowther's Adventure game

Timothe Litt litt at ieee.org
Sat Feb 3 15:02:57 EST 2018


IFILE (and OFILE) don't allow specifying a file extension.  In fact,
they only support 5 (or fewer) character file names.  (5 x 7-bit =
36-bit word - don't ask about the extra bit.)  They're a hack to allow
specifying a filename at runtime; earlier, you had to use a hardcoded
name associated with each LUN.

There were two RTLs for TOPS-10 FORTRAN.  F40 originally shipped with
LIB40, also known as FORSE.

It subsequently shipped with FOROTS - the "new" RTL for FORTRAN-10.

LIB40 doesn't support OPEN, which is necessary for control of record
conversion.

FOROTS does.  With F40, one uses CALL OPEN ; with FORTRAN-10, the OPEN
statement.

If you have FOROTS, you can replace the IFILE call with OPEN/CALL OPEN,
as documented for FORTRAN-10.

The fact that the shipped filename is 6 characters indicates that FOROTS
is expected - I don't believe that IFILE was extended for FOROTS, but
OPEN certainly allows a full filespec. 

So it looks like you have a data file intended for use with FOROTS, with
code that someone tried to adapt to use with LIB40 by substituting IFILE
for OPEN and changing the name.

You're going to have to change something.  Either the format (to discard
the carriage control), or the IFILE to OPEN (to tell the RTL discard it
for you).  If it's only read with one format statement, I'd go for that.

You can write portable FORTRAN, but this is a classic example of how
early implementations made it hard at the edges.

On 03-Feb-18 14:17, Lars Brinkhoff wrote:
> Timothe Litt wrote:
>> Is the file extension .DAT? that may trigger this.
> It is.
>
>> Is there an OPEN statement for that file? If so, what does it include?
> There's no OPEN statement.  The input is opened by this:
>
>         CALL IFILE(1,'TEXT')
>
> The accompanying file is called ADVENT.DAT.  The IFILE call expects
> TEXT.DAT instead.
>
>> What fortran compiler/runtime? DEC's F40? FORTRAN-10? Something else?
> DEC F40.
>
>> You need the reference manual for whichever compiler/RTL you're using.
> I have the FORTRAN IV (F40) PROGRAMMER'S REFERENCE MANUAL from
> bitsavers.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20180203/3c931341/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4577 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20180203/3c931341/attachment.bin>


More information about the Simh mailing list