How can I modify this source from VAX to Sun ? 
Author Message
 How can I modify this source from VAX to Sun ?

Source is below:
      PROGRAM MAIN(INPUT,OUTPUT,TAPE5=INPUT,TAPE6=OUTPUT,TAPE2,TAPE3,    0001
     1 TAPE7=512,TAPE8=512,TAPE9=512,TAPE10=512,TAPE12=512,              0002
     2 TAPE13=512,TAPE14=512,TAPE17,TAPE18=128)
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC   0003
C      TAPE0  : DUMP ARRAY LOCATION IN IQ(6OOOO)                         0004
C      TAPE3  : SCRATCH FILE                                             0005
C      TAPE6  : SCRATCH FILE
C      TAPE12 : SCRATCH FILE                                             0006
C      TAPE17 : DUMP
C      TAPE18 :
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC  0019

I think I must open some files with the OPEN statement.
How can I convert this source's first line for SUN fortran?
Whould you please help me?



Sun, 01 Aug 1999 03:00:00 GMT  
 How can I modify this source from VAX to Sun ?


Quote:
>Source is below:
>      PROGRAM MAIN(INPUT,OUTPUT,TAPE5=INPUT,TAPE6=OUTPUT,TAPE2,TAPE3,    0001
>     1 TAPE7=512,TAPE8=512,TAPE9=512,TAPE10=512,TAPE12=512,              0002
>     2 TAPE13=512,TAPE14=512,TAPE17,TAPE18=128)

Most likely, that program started life on a CDC or Cray machine.
The "TAPEnn" items in the PROGRAM statement were the method used
that for external files, before there was an OPEN statement.
You should replace each one of them with an OPEN statement,
using the UNIT=nn clause, with the number matching the one in
the TAPEnn part.  The reference to INPUT and OUTPUT means just that
the program will use the default I/O on units 5 and 6.

I'm not sure, but I think that the numbers after the "=" signs
are blocksize values.  Since the word size is different, you can
probably ignore them for now, and optimize them (in a BLOCKSIZE=??
clause) later, when you have the program running.



Sun, 01 Aug 1999 03:00:00 GMT  
 How can I modify this source from VAX to Sun ?


Quote:

> Source is below:
>       PROGRAM MAIN(INPUT,OUTPUT,TAPE5=INPUT,TAPE6=OUTPUT,TAPE2,TAPE3,    0001
>      1 TAPE7=512,TAPE8=512,TAPE9=512,TAPE10=512,TAPE12=512,              0002
>      2 TAPE13=512,TAPE14=512,TAPE17,TAPE18=128)

Looks like CDC, *not* VAX fortran to me. I don't have my CDC manuals
with me. Working from memory, the program statement on CDC processors
allowed a programmer to establish a connection between "fun" (fortran
unit number(s)) and names known to the OS (e.g. tape17) which could
further be redirectd via CCL ({*filter*} control language, or equivalent).

Reduce the program statement to

        PROGRAM MAIN

One can use OPEN statements, or some other facilities to associate
file names with fortran unit numbers. You may not be able to have some
of the "features" (looks like several different files are associated
with the same logical unit number, which is a very nonstandard and
dangerous extension.  I don't recall what IQ(600000) is likely to be,
the address of a PP??)

Quote:
> CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC   0003
> C      TAPE0  : DUMP ARRAY LOCATION IN IQ(6OOOO)                         0004
> C      TAPE3  : SCRATCH FILE                                             0005
> C      TAPE6  : SCRATCH FILE
> C      TAPE12 : SCRATCH FILE                                             0006
> C      TAPE17 : DUMP
> C      TAPE18 :
> CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC  0019

> I think I must open some files with the OPEN statement.

--


 2550 Garcia UMPK16-304   415 786-9296   | (415 7869296) fax
Mountain View, CA 94043  <speaking for myself, not Sun*> Copyright 1997


Sun, 01 Aug 1999 03:00:00 GMT  
 How can I modify this source from VAX to Sun ?


Quote:

>> Source is below:
>>       PROGRAM MAIN(INPUT,OUTPUT,TAPE5=INPUT,TAPE6=OUTPUT,TAPE2,TAPE3,    0001
>>      1 TAPE7=512,TAPE8=512,TAPE9=512,TAPE10=512,TAPE12=512,              0002
>>      2 TAPE13=512,TAPE14=512,TAPE17,TAPE18=128)

> Looks like CDC, *not* VAX fortran to me. I don't have my CDC manuals
> with me. Working from memory, the program statement on CDC processors
> allowed a programmer to establish a connection between "fun" (fortran
> unit number(s)) and names known to the OS (e.g. tape17) which could
> further be redirectd via CCL ({*filter*} control language, or equivalent).

> Reduce the program statement to

>    PROGRAM MAIN

> One can use OPEN statements, or some other facilities to associate
> file names with fortran unit numbers. You may not be able to have some
> of the "features" (looks like several different files are associated
> with the same logical unit number, which is a very nonstandard and
> dangerous extension.  I don't recall what IQ(600000) is likely to be,
> the address of a PP??)

>> CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC   0003
>> C      TAPE0  : DUMP ARRAY LOCATION IN IQ(6OOOO)                         0004
>> C      TAPE3  : SCRATCH FILE                                             0005
>> C      TAPE6  : SCRATCH FILE
>> C      TAPE12 : SCRATCH FILE                                             0006
>> C      TAPE17 : DUMP
>> C      TAPE18 :
>> CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC  0019

>> I think I must open some files with the OPEN statement.

> --


>  2550 Garcia UMPK16-304   415 786-9296   | (415 7869296) fax
> Mountain View, CA 94043  <speaking for myself, not Sun*> Copyright 1997

the old cdc systems allowed file name replacement at
run time. you could type

fred(,,,another,,yetanother)

and get io redirected to these files at run time.

i don't have any cdc manuals anymore but it may be that the
numeric values are buffer sizes. if so then you won't have
anything to worry about with those files.

there was the concept of direct i/o from a pp to an area
of memory (a pp handled all interaction with the outside world)
and it was common to stream data from a magnetic tape
directly into memory, allowing the cpu to get on with
numeric work.

one of the systems i worked on had 10 pps, and i think
oneof the others had 20, and also had 2 cpus. these old
cdc systems could get through a lot of work.

ian chivers



Sun, 01 Aug 1999 03:00:00 GMT  
 How can I modify this source from VAX to Sun ?



Quote:
>Source is below:
>      PROGRAM MAIN(INPUT,OUTPUT,TAPE5=INPUT,TAPE6=OUTPUT,TAPE2,TAPE3,    0001
>     1 TAPE7=512,TAPE8=512,TAPE9=512,TAPE10=512,TAPE12=512,              0002
>     2 TAPE13=512,TAPE14=512,TAPE17,TAPE18=128)

As others have already noted, this is CDC Fortran.  I'll just point out
that the purpose of the TAPE5=INPUT,TAPE6=OUTPUT specifications is to
make unit 5 synonymous with standard input, and unit 6 synonymous with
standard output.  I believe the Sun compiler does this for you
automatically, and therefore no OPEN statements are required, but it's
possible that on some processor you might want to use explicit OPEN
statements.  

The specification TAPE7=512 merely assigns a buffer size for unit 7 on
the memory-limited CDC machines.  You may ignore the rest and just
shorten the header to

        PROGRAM MAIN

--

      ++++ stop the execution of Mumia Abu-Jamal ++++
    ++++ if you agree copy these lines to your sig ++++
++++ see http://www.xs4all.nl/~tank/spg-l/sigaction.htm ++++



Sun, 01 Aug 1999 03:00:00 GMT  
 How can I modify this source from VAX to Sun ?


Quote:
>Source is below:
>      PROGRAM MAIN(INPUT,OUTPUT,TAPE5=INPUT,TAPE6=OUTPUT,TAPE2,TAPE3,    0001
>     1 TAPE7=512,TAPE8=512,TAPE9=512,TAPE10=512,TAPE12=512,              0002
>     2 TAPE13=512,TAPE14=512,TAPE17,TAPE18=128)
>CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC   0003
>C      TAPE0  : DUMP ARRAY LOCATION IN IQ(6OOOO)                         0004
>C      TAPE3  : SCRATCH FILE                                             0005
>C      TAPE6  : SCRATCH FILE
>C      TAPE12 : SCRATCH FILE                                             0006
>C      TAPE17 : DUMP
>C      TAPE18 :
>CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC  0019

>I think I must open some files with the OPEN statement.
>How can I convert this source's first line for SUN fortran?
>Whould you please help me?

A blast from the past.  This is CDC Fortran (or possibly Cray, which
took over the syntax.)
Essentially, you don't have to do a thing.  Just use "PROGRAM MAIN" or
leave it off altogether (a PROGRAM statement is optional.)
The statement above says it will use unit 5 as input and unit 6 as output,
and that's the way Sun treats these units anyway.
The other units will appear on a Sun as files "fort.2", "fort.3", etc.
You only have to supply OPEN statements if you want to use different file
names.
The weird numbers in TAPE13=512 etc. are buffer sizes.  Buffer size by
default was (I believe) 2048 words, which was a lot of memory on a machine
with 128K words, so people who had lots of files cut down on buffer size
at the expense of I/O efficiency.  But this is merely a matter of historical
interest.  (Does anyone know if there is still a machine running NOS or
NOS/BE somewhere? )

Daan Sandee
Burlington, MA          Use this email address:  sandee (at) east . sun . com



Mon, 02 Aug 1999 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Vax to Sun, Source code conversion

2. Error in recompling VAX source to AXP source

3. GNU Adaed modified for Sun Sparc

4. Forth for VAX, Sun

5. Forth on VAX or Sun

6. Modula 2 for PC, Sun, VAX

7. Motif Ada libaries for VAX and SUN ?

8. Reading VAX direct access files on a SUN

9. Sun F77 compiler with Vax binary file Query

10. File I/O problem porting FORTRAN from VAX to Sun

11. HELP : Porting from VAX to Sun.

12. Sun/VAX/DEC Fortran question: optional arguments

 

 
Powered by phpBB® Forum Software