[Simh] Crowther's Adventure game

Timothe Litt litt at ieee.org
Fri Feb 2 10:20:33 EST 2018


TYPE( ... )  is just WRITE( 5, ...) , where 5 is the DEC LUN for TTY,
which is opened by default. 

Conversion from format carriage control specifiers to device motion (for
TTYs, character such as CR, LF, FF, VT), is the responsibility of the
RTL (or device driver).  Typically, some OS device characteristic
identifies what happens; an interactive or print device converts to
device actions, while disks record the carriage control.  This can
sometimes be influenced by FORTRAN OPEN statement extensions.

RMS based systems handle the conversion in RMS by specifying the record
mode when a file is (RMS) opened.

'/' in a format is 'end of record'.

Similarly, ACCEPT is just READ(5)

There is no magic beyond what the OS reports to the RTL about the device.


On 02-Feb-18 09:46, Clem Cole wrote:
>
>
> On Fri, Feb 2, 2018 at 9:12 AM, Ken Cornetet
> <Ken.Cornetet at kimballelectronics.com
> <mailto:Ken.Cornetet at kimballelectronics.com>> wrote:
>
>     I have vague recollections that FORMAT(/) prints a new line
>
> ​Sounds right - I'm O-O-O, but I​'ll try to verify with the compiler
> folks when I'm on the office again. 
>
>
>     Format(20A5) takes 20 elements of an array and prints them as
>     character stings padded to a width of 5 characters.
>
> ​Right..   -- mAw - means M elements of an input data type (typically
> Integer) as type Alphabet with a width of w.​
>  
>
>
>     "TYPE" is not standard fortran. That must have been a DEC
>     extension. Standard fortran would have used "write".
>
> ​Yes, TYPE was introduced by DEC with PDP-10 Fortran​ to allowed for
> easier terminal I/O on timesharing (original Fortran was designed for
> batch i.e. LPT, or tape style out).  I believe it was picked up on the
> standard with F90 - but again I'll have to ask the Fortran compiler
> folks.   An example of the difference between TYPE and traditional
> WRITE indeed are things like Fortran Lineprinter control, but I've
> forgotten the details.
>
>  
>
>
>     -----Original Message-----
>     From: Simh [mailto:simh-bounces at trailing-edge.com
>     <mailto:simh-bounces at trailing-edge.com>] On Behalf Of Lars Brinkhoff
>     Sent: Friday, February 2, 2018 3:41 AM
>     To: Dave L <davel.rss at googlemail.com
>     <mailto:davel.rss at googlemail.com>>
>     Cc: simh at trailing-edge.com <mailto:simh at trailing-edge.com>
>     Subject: Re: [Simh] Crowther's Adventure game
>
>     Dave L wrote:
>     > Been a long time since I wrote fortran but IIRC the first
>     character on
>     > the output line was to perform carriage-control of the LPT, so you'd
>     > have to always have a leading pad character such as a space in order
>     > to get the output lines to be correct. Some characters were reserved
>     > actions, 1 = FF from memory. I've not looked at the code
>     involved but
>     > that'd be my first thoughts
>
>     Thanks.  Since the SPEAK subroutine is only a few lines, I'll post
>     it here.  Maybe someone hows how TYPE, FORMAT(20A5), and FORMAT(/)
>     work.
>
>
>
>             SUBROUTINE SPEAK(IT)
>             IMPLICIT INTEGER(A-Z)
>             COMMON RTEXT,LLINE
>             DIMENSION RTEXT(100),LLINE(1000,22)
>
>             KKT=RTEXT(IT)
>             IF(KKT.EQ.0)RETURN
>     999     TYPE 998, (LLINE(KKT,JJT),JJT=3,LLINE(KKT,2))
>     998     FORMAT(20A5)
>             KKT=KKT+1
>             IF(LLINE(KKT-1,1).NE.0)GOTO 999
>     997     TYPE 996
>     996     FORMAT(/)
>             RETURN
>             END
>     _______________________________________________
>     Simh mailing list
>     Simh at trailing-edge.com <mailto:Simh at trailing-edge.com>
>     http://mailman.trailing-edge.com/mailman/listinfo/simh
>     <http://mailman.trailing-edge.com/mailman/listinfo/simh>
>     _______________________________________________
>     Simh mailing list
>     Simh at trailing-edge.com <mailto:Simh at trailing-edge.com>
>     http://mailman.trailing-edge.com/mailman/listinfo/simh
>     <http://mailman.trailing-edge.com/mailman/listinfo/simh>
>
>
>>
>
> _______________________________________________
> Simh mailing list
> Simh at trailing-edge.com
> http://mailman.trailing-edge.com/mailman/listinfo/simh

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20180202/38e37872/attachment-0001.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/20180202/38e37872/attachment-0001.bin>


More information about the Simh mailing list