Fortran Programs on the Propeller
Is anyone running a version of Fortran on the Propeller chip?
I have a lot of very useful physics programs that run in this
language and would like to see these on the prop for a future
project.
I have a lot of very useful physics programs that run in this
language and would like to see these on the prop for a future
project.
Comments
I think there's a GCC front end for Fortran, but it would take a lot of work to integrate that and particularly to provide the necessary run-time library.
The Propeller has less memory (32k) but it has acces to some GB of SD card and more processing power than this Odra. I thnk Fortran programming should be possible with it if only someone can write a compiler.
Starting stopwatch... <grin>
OBC
Would be neat to get the other GCC languages with Propeller-GCC.
For sure I rebuilt the zpugcc to support Fortran and then managed to compile at least a simple Hello World program with it.
Can't remember now if I ever got it to run. Perhaps it is mentioned in the Zog thread somewhere.
So I imagine propgcc can do the same. Just enable Fortran in the configure step before building propgcc.
After that what libraries it may need to make it useful is beond me.
Nevada Fortran - running under CP/M
Couldn't run any slower than thos old days when you programmed on punch cards and submitted the deck and waited for your results next day
Well, technically, I am
...If you count Fortran 4 on an IBM 1130 emulator. 16K bytes of memory, 16 bit integers, no booleans, only arithmetic if statements. But it does have "extended precision" (I believe 48 bit) floating point...
That said, there was a gentleman from the local electric company who wrote a series of complex Fortran programs on the 1130 that helped him calculate the costs for building electrical substations.
Here's the output from a sample job (and please note that the "8K" values are referring to words, not bytes):
Walter
Walter, can you direct me to your web site describing the IBM 1130 emulator running on a Propeller chip? Or is this running on a PC?
Humanoido,
It is running on a Propeller. It's still very much a work-in-progress (I just worked out some CPU emulation issues that affected the assembler earlier this month). The CPU emulation is about 3X the speed of the original machine; the disk emulation is about 50-100X faster.
My blog is at http://forums.parallax.com/blog.php?58796-Retrocomputing...and-whatever-else-comes-to-mind. I hope to get another entry posted this weekend as I have made significant progress since my last post.
I would be happy to post a schematic and the source code to date, if you're interested.
Walter
Walter, yes please post the schematic and source code, and any instructions about running it on the Propeller. This is a very interesting project and could lead to some form of Tiny Fortran implement.
The disappointment is that the library is huge, so even a fortran version of "hello world" ends up compiling to 180K or so. There also seems to be a bug in the I/O functions so that only the first part of the message comes out. I'll look at it later, but the huge size of the binaries makes building fortran only useful in XMM or XMMC modes, which is a bit disappointing.
Eric
Humanoido,
I should be able to do this by the end of the week. Was hoping to do so this weekend but didn't get to it--sorry!
Walter
Well, I think Mike nailed it in the second comment on this thread. Getting the GCC fortran compiler itself to work was trivial (a matter of 5 minutes of work). Getting a Propeller friendly runtime library is the hard part. The 180KB or so for the included gfortran library is probably considered tiny these days for PCs, so nobody has bothered to make it smaller (yet).
Of course even without the library gfortran is still usable for some purposes -- for example you could compile fortran functions that could be called from C or from PASM.
Eric
I suppose GCJ and Objective C would have similar results. I know of at least one person who might be interested in contributing to Objective C development. I'm a little worried about growing our current repository though - it's getting tough to make new clones.
An internet search of Fortran-to-C converters shows that f2c is a popular converter. It was developed at Bell Labs, and is open-source software.
Humanoido,
I've attached a zip file containing my (rather hastily assembled) documentation, schematic, source files, and images. Hopefully you can make sense of this work-in-progress... if not, please feel free to ask questions (my direct email is included in the documentation).
Good luck!
Walter