FOSBIC1 compiler

Or Basic compiler/system in Fortran IV

I came across fosbic1 on github by accident, so intrigued by the description:

This is the FOSBIC1 compiler developed at the University of Gießen, Germany
in the late 70s for the CDC 3300 batch system.

It is a BASIC compiler and runtime system which is written in FORTRAN IV.

The text book from which the source code was copied implies that it is
a modified version of a BASIC compiler named UWBIC from the University of Washington, developed by William Sharp in 1967, for their IBM 7094.

So, without going into it much further I went ahead and made a few minor changes to get it running on Microsoft Fortran

Compiled!

Instead of some boring example, I thought I’d try some Mandelbrot, so going through this collection on rosettacode, I thought the OS/8 version looked simple enough to work with.

Sadly it doesn’t seem to be very ASCII so it doesn’t understand numerical characters. Maybe I’m doing it wrong I didn’t see anything. Just as my attempt to set a string variable to itself + a new letter then print that string strangely failed. Also it does weird stuff with strings, again it maybe me, but I’m impatient. This is terrible, and yeah I know.

                                        TESTCOMPILER -- BASIC BWL 5 GIESSEN -- VERSION 6/76-04

                   10 X1=59
                   11 Y1=21
                   20 I1=-1.0
                   21 I2=1.0
                   22 R1=-2.0
                   23 R2=1.0
                   30 S1=(R2-R1)/X1
                   31 S2=(I2-I1)/Y1
                   40 FOR Y=0 TO Y1
                   50 I3=I1+S2*Y
                   60 FOR X=0 TO X1
                   70 R3=R1+S1*X
                   71 Z1=R3
                   72 Z2=I3
                   80 FOR N=0 TO 30
                   90 A=Z1*Z1
                   91 B=Z2*Z2
                   100 IF A+B>4.0 GOTO 130
                   110 Z2=2*Z1*Z2+I3
                   111 Z1=A-B+R3
                   120 NEXT N
                   130 REM PRINT CHR$(0062-N);
                   131 IF N=0  THEN 200
                   132 IF N=1  THEN 202
                   133 IF N=10 THEN 204
                   134 IF N=11 THEN 206
                   135 IF N=12 THEN 208
                   136 IF N=14 THEN 210
                   137 IF N=15 THEN 212
                   138 IF N=16 THEN 214
                   139 IF N=17 THEN 216
                   140 IF N=19 THEN 218
                   141 IF N=2  THEN 230
                   142 IF N=20 THEN 232
                   143 IF N=22 THEN 234
                   144 IF N=23 THEN 236
                   145 IF N=24 THEN 238
                   146 IF N=25 THEN 240
                   147 IF N=3  THEN 242
                   148 IF N=30 THEN 244
                   149 IF N=31 THEN 246
                   150 IF N=4  THEN 248
                   151 IF N=5  THEN 250
                   152 IF N=6  THEN 252
                   153 IF N=7  THEN 254
                   154 IF N=8  THEN 256
                   155 IF N=9  THEN 258
                   200 PRINT 'A';
                   201 GOTO 439
                   202 PRINT 'B';
                   203 GOTO 439
                   204 PRINT 'C';
                   205 GOTO 439
                   206 PRINT 'D';
                   207 GOTO 439
                   208 PRINT 'E';
                   209 GOTO 439
                   210 PRINT 'F';
                   211 GOTO 439
                   212 PRINT 'G';
                   213 GOTO 439
                   214 PRINT 'H';
                   215 GOTO 439
                   216 PRINT 'I';
                   217 GOTO 439
                   218 PRINT 'J';
                   219 GOTO 439
                   230 PRINT 'K';
                   231 GOTO 439
                   232 PRINT 'L';
                   233 GOTO 439
                   234 PRINT 'M';
                   235 GOTO 439
                   236 PRINT 'N';
                   237 GOTO 439
                   238 PRINT 'O';
                   239 GOTO 439
                   240 PRINT 'P';
                   241 GOTO 439
                   242 PRINT 'Q';
                   243 GOTO 439
                   244 PRINT 'R';
                   245 GOTO 439
                   246 PRINT '-';
                   247 GOTO 439
                   248 PRINT 'T';
                   249 GOTO 439
                   250 PRINT 'U';
                   251 GOTO 439
                   252 PRINT 'V';
                   253 GOTO 439
                   254 PRINT 'W';
                   255 GOTO 439
                   256 PRINT 'X';
                   257 GOTO 439
                   258 PRINT 'Y';
                   259 GOTO 439
                   439 REM
                   440 NEXT X
                   450 PRINT '-EOL'
                   460 NEXT Y
                   461 PRINT 'END'
                   470 END

It runs in batches, so it’s not interactive. Very mainframe/1960’s minicomputer like. I guess it’s fitting again being in FORTRAN.

******************* EVERYTHING SEEMS OK -- LET'S GO AHEAD

                    PERCENT OF AVAILABLE STORAGE USED               31.081
                    PERCENT OF AVAILABLE DATA STORAGE USED            .000
                    PERCENT OF AVAILABLE NUMBERED STATEMENTS USED   30.294

AA    A    A    A    A    B    B    B    B    B    K    K    K    K    K
K    K    K    K    K    K    K    K    K    K    Q    Q    Q    Q    Q
Q    T    T    T    U    X    F    D    E    T    Q    Q    Q    Q    K
K    K    K    B    B    B    B    B    B    B    B    B    B    B    -EOL

I’m not sure what is up with the AA and after that, it’s all tabulated. I ended up running it through sed to remove the spaces, and using notepad to stitch the lines together. I guess I could have bash’d it some more but.. I’m impatient.

So yeah, it looks like it worked! Very amazing. And of course it’s crazy fast but that should be expected I suppose. I don’t like the hard coded table, but I just wanted to get it to generate an image.

Sadly, the author of the compiler, Weber seems to have disappeared, and the publisher Paul Haupt died in 1978, a year after this being published.

The Oregon Trail for FORTRAN 77

The other day I’d been alerted to this fantastic port of the BASIC game to Fortran 77 by Kidon, bringing it to mainframe and midrange machines of the 1970s!

You can read more information at it’s home page here, along with getting the source code and building it out.

Naturally I had to build it using f2c, and QuickC for Windows. Just some minor tweeks and it runs!

Victory! …?!?

Although victory could have gone a bit better. I know it’s largely my fault trying to introduce a clean way to pause before exiting. Obviously there is tonnes of Fortran compilers out there, for many old platforms, so perhaps this will make the Oregon Trail the ‘DooM’ of machines with F77?! Give it a try, there is extensive build instructions, and a quick list of known good platforms, be sure to update with newer (older) stuff that is found to fun!

Confessions of a paranoid DEC Engineer: Robert Supnik talks about the great Dungeon heist!

What an incredible adventure!

Apparently this was all recorded in 2017, and just now released.

It’s very long, but I would still highly recommend watching the full thing.

Bob goes into detail about the rise of the integrated circuit versions of the PDP-11 & VAX processors, the challenges of how Digital was spiraling out of control, and how he was the one that not only championed the Alpha, but had to make the difficult decisions that if the Alpha succeeded that many people were now out of a job, and many directions had to be closed off.

He goes into great detail how the Alpha was basically out maneuvered politically and how the PC business had not only dragged them down by management not embracing the Alpha but how trying to pull a quick one on Intel led to their demise.

Also of interest was his time in research witnessing the untapped possibilities of AltaVista, and how Compaq had bogged it down, and ceded the market to the upstart Google, the inability to launch a portable MP3 player (Although to be fair the iPod wasn’t first to market by a long shot, it was the best user experience by far).

What was also interesting was his last job, working at Unisys and getting them out of the legacy mainframe hardware business and into emulation on x86, along with the lesson that if you can run your engine in primary CPU cache it’s insanely fast (in GCC land -Os is better than -O9).

The most significant part towards the end of course is where he ‘rewinds’ his story to go into his interest in simulations, and of course how he started SIMH when he had some idle time in the early 90’s. SIMH of course has done an incredible amount of work to preserve computing history of many early computers. He also touches on working with the Warren’s TUHS to get Unix v0 up and running on a simulated PDP-7 and what would have been a challenge in the day using an obscure Burroughs disk & controller modified from the PDP-9.

Yes it’s 6 hours long! But really it’s great!

Microsoft Fortran PowerStation for NT 1.00

So I came across this recently, and unlike the previous version I had for Windows 3.1, This version is for Windows NT.  And unlike the Windows 3.1 version this version does actually run on the shipping version of Windows NT 3.1, and thus will work all the though including Windows 10 on x64.  The setup program unfortunately doesn’t complete leaving it ‘unlicensed’ however it’ll still run.

The diskettes for the Windows 3.1 version I have are dated 11-23-93, but once installed the compiler is actually from February of 1993, with the Windows NT version being dated October of 1993.

So the nice thing with the Windows NT version is that you don’t have to mess with the compiler, and linker, it’ll just run.  And just like Visual C++ 1.0 / 1.10 for NT the linker doing a release build will always result in an exe being at least 2 megabytes in size.

I know that this is pretty much useless for 99.9999% of people.  Yes it’s ancient Fortran.  Yes Fortran PowerStation 4.0 is far more comprehensive.  Yes after it was sold to Compaq as part of some deal over the collapse of Dec & Windows NT, then sold out to Intel.  And GFortran is free.

But here we go.

32bit Fortran from 1993 in 2018!

Dungeon 2.5.6 on MacOS

Years and years ago I had bought this copy of Language Systems Fortran for MacOS with the intention of using my Quadra to build Dungeon for MacOS.  Except I couldn’t figure out the first thing about MPW, and life was always busy and I never did figure it out.  Well after getting GCC to compile something on MacOS, I thought I’d dig up some images I made of the disks, and without the benefit of having the manuals anymore see if I could figure it out.

FORTRAN Dungeon 2.5.6 on MacOS

FORTRAN Dungeon 2.5.6 on MacOS

And much to my amazement it compiled without any real issues.  All the EOF markers in the files had to be fixed up, and gdt.f for some reason was mangled at the end, but it was trivial to repair.  I didn’t bother trying to integrate the gettime call, so the clock and any clock events don’t work correctly.  I guess I should make the seconds increment by 15 between calls, or something.  Oh well I don’t think anyone will really care.  I compiled it for the 68020 with 68881 hooks, although I doubt it even makes any calls.  It runs for me.

If anyone cares, the binary is here:dungeon-2.5.6-m68k-MacOS.sit

As always, you’ll have to read the 404 screen to get the download.

VAX Snoopy!

Hey Snoopy!

Hey Snoopy!

Following up on Adventures with Snoopy, Mihai has delivered!  Snoopy printed out from a VAX onto a real 9 pin printer, onto paper!

Just the way we used to do things a million years ago!

Be sure to check out the whole thing on hawk.ro,  complete with pictures, and source material!  Totally check it out, for that real programmer’s vibe!

And for those who have no idea, here is where it all started.

Bringing back the WinZork demo via jsDOSBox

So with all the excitement with jsDOSBox it was about time I tried to get something from my old java dosbox stuff running again.

As a quick note, as of right now, you cannot boot into a disk image… Nor can you really run bat files, or any kind of drivers beforehand.  It’s basically either use a script that adds files one by one, or use an image file which gets mounted, and you run your exe/com file from that.

So here we go, back again is the old Fortran Dungeon (zork) compiled with QuickC for Windows, running on the working model version of Windows 3.0.

Dungeon via F2C

Dungeon via F2C

Click here, and enjoy!

For anyone interested my old post about this Fortran/Zork adventure is here.