Microsoft Fortran Powerstation 1.0

While going through my stuff, I did manage to find some diskettes for Microsoft FORTRAN PowerStation 1.0 …  I recall using this under Windows 3.1 but there was some reason we never really used it under Windows 95 & NT …

So I loaded it up on a VM with Windows 3.1 and quickly found out why:  While it produces win32 exe’s they are built with pre-release tools, and will *NOT* work under any released version of Windows NT, (Yes, including Windows NT 3.1!!).

I’m sure others may find themselves down the path with failed exe’s that crash with:

RtlExAllocateHeap not found in ntdll.dll

Microsoft had a fix, named beta2fix.  It renamed the references to ntdll.dll into beta2.dll.  Which sounds fun, except the resulting exe’s DONT WORK. Nothing like a ‘solution’ that took missing references into exe’s that just crash.

Naturally the ‘fix’ is to upgrade to 4.0 which.. is impossible to find, or track down Compaq fortran, or even Intel fortran.  Or just run it in a MS-DOS/Windows 3.1 VM and be happy for emulation.

But I figured what the hell, perhaps it’s possible to replace some of the key parts with old versions of Visual C++ and use HX DOS as an extender instead of an ancient Phar Lap TNT.

Googling around, the issue lies with the linker, link32.exe. 

Now on my Visual C++ 1.0 cd there is a link32.exe that just calls link.exe.  On the Visual C++ 2.0 & 4.0 CD’s there is no link32.exe.  Seeing that Visual C++ 1.0 just calls through I just made a ‘stub’ program to call link.

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void main(int argc,char* argv[])
char command[255];
int rc;
int j;

sprintf(command,"link ");
        sprintf(command,"%s %s",command,argv[j]);
printf("running [%s]\n",command);
printf("return code was %d\n",rc);
        {printf("I think it’s too many nested DPMI things between TNT & whatnot\n");}

Ok, it’s not work of art, but it’ll get the job done.  You’ll need some kind of MS-DOS 16 bit real mode compiler to build this thing.  I would imagine Watcom’s C++ compiler can still build 16bit dos realmode exe’s, or Borland has something in their museum thing.  I’m using QuickC for Windows in a Windows 3.0 VM…

Ok so now with our ‘link32.exe’ replacement, copy it into the f32\bin directory overwriting the existing one.

Next we will need the link.exe from Visual C++ 2.0 (or higher I figure), and copy that into the f32\bin directory, along with it’s needed files dbi.dll & msvcrt20.dll.

Next, download and unzip the HX runtime And you can either place it’s bin directory onto the fl32\bin, or unzip it to it’s own directory, and add a statement in your autoexec.bat adding it’s bin directory to the path.

Reboot to pickup the hxrt’s bin directory, unless you copied it’s bin into fl32\bin

Now we need to alter Visual C++ 2.0’s linker to run under MS-DOS. Simply run

pestub \f32\bin\link.exe

And now you should be able to run link.exe under MS-DOS.

Finally replace the libc.lib & kernel32.lib with ones from your Visual C++. Naturally these are in the \f32\lib directory. Visual C++ 2.0 will link without complaining, 4.0 gives some weird messages, but it still works.  I never did test Visual C++ 6.0 & beyond.

So building a simple ‘hello.for’ (mention in the prior blog post)

c:\F32>fl32 hello.for
Microsoft (R) FORTRAN PowerStation Optimizing Compiler Version 1.0
Copyright (c) Microsoft Corp 1984-1993. All rights reserved.

Microsoft (R) 32-Bit Incremental Linker Version 2.50     
Copyright (C) Microsoft Corp 1992-94. All rights reserved.

running [link  -link @C:\TEMP\003635lk]
return code was 0

The only caveat here, is that because of HXDOS it *thinks* it’s running on Windows NT, (beta 2!) and will not run the bindmsf.exe program… Not that it mattered as it was broken. I suppose if I were more brave I could read the link file, and scan for a ‘-out’ and run pestub on the output.. But I don’t so you will have to.  Otherwise when you run hello.exe you’ll get:

This program cannot be run in DOS mode.

But running pestub.exe:

c:\F32>pestub hello.exe
pestub: hello.exe modified successfully


Ok, so with all this work, we’ve managed to restore the basic functionality of Microsoft Fortran here.  Now the bigger question, will hello.exe run on say Windows Vista x64?


Microsoft Windows [Version 6.0.6002]


Not to bad, eh?

Oh and onto zork:

c:\F32\DUNGEON>fl32 *.for
Microsoft (R) FORTRAN PowerStation Optimizing Compiler Version 1.0
Copyright (c) Microsoft Corp 1984-1993. All rights reserved.

DEMONS.FOR(520) : warning F4999: RLIGHT : variable declared but not used
DEMONS.FOR(520) : warning F4999: RSER : variable declared but not used
DGAME.FOR(781) : warning F4999: PROTCT : variable declared but not used
NP.FOR(397) : warning F4999: DFLAG : variable declared but not used
NP.FOR(397) : warning F4999: QHERE : variable declared but not used
NP.FOR(507) : warning F4999: DFLAG : variable declared but not used
NP.FOR(780) : warning F4999: DFLAG : variable declared but not used
NP.FOR(1154) : warning F4999: DFLAG : variable declared but not used
NP.FOR(1277) : warning F4999: DFLAG : variable declared but not used
ROOMS.FOR(1195) : warning F4999: F : variable declared but not used
Microsoft (R) 32-Bit Incremental Linker Version 2.50     
Copyright (C) Microsoft Corp 1992-94. All rights reserved.

running [link  -link @C:\TEMP\000731lk]
return code was 0

The exe works fine on Vista, and pestub will allow it to run on MS-DOS.

*NOTE that the fortran compiler will *NOT* run on Vista/XP/NT.  The compiler was also linked with bad libraries & linker and it just won’t work.  I doubt forcedos would help for 32bit NT systems as the phar lap stuff is all out of date.  However DOSBox will happy run the compiler.

I haven’t even tried to debug anything, as I figure the best environment would have been a virgin copy of PowerStation 1.0 running under Windows 1.0… I did say keep a copy right!!!

This entry was posted in DOSBox, Fortran by neozeed. Bookmark the permalink.

About neozeed

What is there to tell? I've loved UNIX like things since I was first exposed to QNX in highschool (we had the Unisys ICONS!), and spent the better time of my teenage years trying to get my own UNIX... I should have bought Coherent in retrospect.. Anyways latched onto Linux in 1992, and then got some old BSD admin books and have been hooked on the VAX BSD & other big/ancient things since...!

6 thoughts on “Microsoft Fortran Powerstation 1.0

  1. I remember reading about a Fortran PowerStation 1.0a for DOS that fixed the problem while preserving DOS support . BTW, MASM 6.1 and Visual C++ 1.0 also had the same problem.

    • I found a copy of Fortran 1.0a, and.. they “fixed” the runtime, but the compiler is still the same, bound with the same broken runtime so you can’t run it under NT. You’d think they would have taken the time to do that much but apparently not.

      • I’d suggest replacing FL32 with a copy from Fortran PowerStation 1.0 for Windows NT. You’d think MS would consolidate the two products into one.

      • Was there a PowerStation 1.0 for NT? I was under the impression it was an MS-DOS only product, with NT pre-release tech.

    • All I can think is that it was built around the time of the NT 3.1 betas’ and the Win32 hype machine that kind of fell flat until Windows 95. There was a lot of hope and excitement, especially in an OS that was POSIX, and Windows compliant with an eye to the future. Sadly that OS wouldn’t be Windows NT.

      Windows 7 with SUA was about as good as it got, then they killed off SUA for reasons unknown, and subverted Windows with metro. Kind of amazing to see how the new “leadership” destroyed the twin pillars of Office, and Windows in a few short years.

Leave a Reply

Your email address will not be published.

Notify me of followup comments via e-mail. You can also subscribe without commenting.