Uncle Warthog wrote:
drogon wrote:
Is there (was there?) a 6502 FORTRAN system? (a quick google suggests there was at least an Apple version, but I don't recall ever seeing it)
I have Apple Fortran but it isn't a 6502 compiler; It runs under Apple's Pascal environment and compiles to UCSD P-Code.
Yea, UCSD had a P-Machine Fortran. I've never seen or used it. They also had a BASIC.
My Dad had a copy of Fortran for the TRS-80. I spent a couple of days, even borrowed a book on Fortran, trying to suss it out to no avail.
It was my first programming classic college, and we got to use Fortran V/Fortran 77 (as in 1977). Fortran V was much better, it was much easier for character work (just say no to Hollerith kthx). Fortran 4/IV was known as Fortran 66 (1966).
The microcomputer was not the typical environment in which Fortran was used, so the book wasn't super helpful. Great for the language, but I couldn't even get "Hello World" to work. So, I left it.
In Fortran V:
Code:
PROGRAM TEST
WRITE(*,*) 'HELLO WORLD'
END
Pretty sure that's close, and that "just worked". The problem I was having on the TRS-80 was that I had no idea what the unit numbers were for reading and writing the keyboard. And I didn't even know I was looking for unit numbers. The "*,*" specified the unit number and... something else...a format line? Maybe? Anyway, I think in the end, they were like 2 and 3 on the TRS-80, (maybe it was 4 and 5, but like stdin and stdout, the mappings are "common knowledge"), but I didn't know that. The book I was reading was talking about cards and tape drives. Not really helpful.
I wrote a simple BBS in Fortran back in the day.
And I will say this about Fortran. Before college, I was working on PETs and the TRS-80. In College I got dumped in to a time share CDC Cyber 780 mainframe. Let me tell you how utterly different these two environments are. From PET BASIC to NOS with a line editor (XEDIT) and Fortran.
I don't think I could have picked a better thing to have done than Fortran on the Cyber. They were great examples of the commonality of computing, along with their vast differences. Cryptic job control language vs BASIC. Disk files and persistent storage. Data record processing (which I had little experience with in BASIC, having done only a class grading program for a teacher). 60 bit words vs 8 bit. But also, a multi user system vs standalone. Way different, but much the same as well.
It was great to let someone use the differences and details to focus on the abstractions that they represented. It (to me) was important to have that experience early rather than later. One of my computing epiphanies. (First was INPUT and PRINT and simple expressions in BASIC, second was Arrays, third was this with fortran, and utterly different computer architecture, 4th was dynamic memory and pointers in Pascal -- the light that goes on when you keep a linked list in your head, it's bright one, and, finally, let and lambda in Scheme, and all the AHA that brings).
I took to the mainframe environment like a duck to water. Later, when I saw everyone learning on PCs with DOS and Turbo Pascal instead of the Cyber or PDP, it was just...a sad day.
The only reason for Fortran on micros is to port other code. As others have said, it's just not expressive enough for what most folks want to do. Not easily. No doubt there were Fortran extensions that would let you Peek and Poke in to raw memory. But Fortran was noted for it's floating point math, its first class COMPLEX math, masterful array handling, and all the scary hacky fun times that can be had with static data, and infinite ways to map in to them. Thank you Mr. COMMON Block.
Micros back in the day were not Floating Point powerhouses, so "real work" was done on "real computers" with Fortran.
I did many early Data Structure assignments in Fortran, grateful I didn't have to write any compilers in it.