On 12/08/2021 00:19, gah4 wrote:
[...]
Post by gah4It depends some one what you are trying to compare.
The math processor was optional for the 386, so compilers could generate
either x87 code or software floating point. (You didn't say if you were
interested in floating point, though that is usual for Fortran.)
Thank you all for the reply!
I'll give some more context. In 1993, when a way a young boy, my parents
bought their first computer, a rather bare-bone 386DX/40MB with 4MB of
ram and a 200MB hard disk (no mouse, no sound card). It was bought
mostly for accountancy tasks, but of course I used it for games
(although it obsolescing really fast) and it played a key role in
developing my interest in computers.
By the time I got to university and became acquainted with numerical
methods and Fortran I had already moved on to a newer system, so I never
did any programming on it.
Not long ago I decided to dig up the old dinosaur from the cellar and
give it a second breath of life. It needed some work (a huge cobweb had
shorted the motherboard, the cmos battery leaked, etc.) but it is now
not only as clean as a whistle but also upgraded with 8MB of ram, a
387/DX floating point unit, a second, larger hard disk, sound card and a
Gotek Floppy Emulator (to read USB pendrives as if they were floppies)
and is now perfectly working.
In a different project, I've been preparing for some time a series of
presentations on methods to solve (=find eigenvalues and eigenvectors)
the one-dimensional Schrodinger equation (quantum mechanics), from very
basic shooting approaches to more advanced ones. Now, on a modern
computer even the slowest-converging methods would probably give
accurate results in a few seconds, so the advantage of faster method
won't probably be very striking. Of course I could artificially slow
down the machine using utilities or emulators, or run the method
repeatedly as register how many passes it does in, say, 10 seconds, but
this seems the perfect occasion to put to good use my resurrected 386.
Also, I've always wondered how much scientific computing one could do on
personal computers in the 1980s and early 1990s.
So the primary purpose is to show pros and cons of various numerical
approaches to the 1D Schrodinger equation and, as a by product and a bit
of fun, to show benchmarks on my DOS 386 and my modern PC. For this
reason I need a programming language which is supported both on the old
and the new system, and Fortran seems to be a good choice (the other
possibility I considered is ANSI C).
Development will take place on the modern system with modern compilers
(gfortran and Intel) but enforcing strict adherence to the Fortran
standard supported by the old system (F77, F90 or F95 depending on what
I can find).
At the moment I found here
https://winworldpc.com/product/fortran-powerstation/1x
a copy of Microsoft FORTRAN Powerstation 1.0a for Dos and Windows 3.1
It fits on three 1.44MB floppies and takes, installed, about 4 MB or so.
It's a F77 compiler with a few F90-like extensions (free format, enddo,
cycle, exit) and it use a 32bit DOS extender. It works fine from the
preliminary tests I did, it makes use of the FPU if present otherwise
uses software emulation.
This is a good start, but if possible I'd prefer to have a compiler with
full F90 (or 95) support.
Post by gah4For some years, compilers would support various DOS extenders
to run 32 bit code under DOS. I believe some Fortran compilers
did that, and, though it would have been later, would still support
older versions of DOS.
You are right, ASAIK the last generation of DOS Fortran compilers (first
half of the 1990s) used 32bit Dos extenders and VxD drivers under
Windows 3.1 (https://en.wikipedia.org/wiki/VxD).
I've done a little more research (sometimes using the wayback machine to
see old versions of websites) and I can confirm the following DOS
Fortran compilers existed:
1. NAGware Fortran 90 v1 (released January 1992 -- the first F90 compiler)
2. NAGware Fortran 90 v2.1, v2.2, v2.11, v2.18 (released between 1993
and 1997 or so -- co-developed with Salford Software)
Nag released its NAGware Fortran 95 compiler in 1997 or 1998 but ASAIK
only for Linux (no Dos versions).
3. Salford FTN90 (possibly the same as NAGware v2.x)
4. Salford FTN95 (released in 1997 --- as far as I can tell the only F95
compiler for Dos)
5. Lahey Fortran 90 (LF90) v3.0 (released in 1996 as far as I can tell)
6. Lahey Fortran 90 (LF90) v4.0, v.4.5 (released in 1998; it should also
support DOS but it's mostly a Windows NT suite as far as I can tell)
Lahey released F95 compilers as Lahey/Fujitsu, but I don't think they
support Dos.
Other people have suggested the Open Watcom F77 (thanks!). The main
problem I see (apart from the old standard) is that it takes 66.4 MB
zipped (I'd have to break it up into 50 floppies to transfer it) and
148.9 MB unzipped, which is just HUGE for my 386 system and also suggest
its memory requirements would probably overwhelm my machine. Also, I'm
not sure I'd gain very much from the Microsoft F77 compiler I already
have and which takes only 4MB or so.
I could install it on the modern machine in Dosbox and then copy to the
old system only the executable, but I'd rather avoid this route if possible.
Thank you all for the help. I'll post any further developments.