Peeking into the corners of the internet

This evening I decided that I was going to have a wander through the internet and see what I could dig up about 6502 programming and VAX or VAX/VMS or OpenVMS. The ideal scenario would be an assembler that runs on the VAX and cross-compiles to the KIM-1 6502-based machine (when I get round to finding it!). I’d done this kind of investigation a month or so ago but helpfully didn’t bother recording the results! Doh! (my youngest is currently watching The Simpsons!)

The first interesting titbit I came across was from 6502.org:

In 1983, Rescue on Fractalus and Ballblazer, the first releases from Lucasfilm Games, were built with a system written in Lisp. It was a 6502 assembler with Lisp syntax and a Lisp-style macro facility, written in Portable Standard Lisp, running in Berkeley Unix on a 4MB VAX 11/750. Unfortunately it was eventually abandoned because the developer had left and it was a bit of a strain on the VAX that was shared by the whole development team.

Rescue on Fratalus as rendered on the Atari 5200

Mental note made to fire up either a Spectrum, Atari or CBM-64 emulator at some point and give Rescue on Fractalus! a whirl. Also mentioned on that site is The Influence of the UNIX® 1 Operating System on the Development of Two Video Games which looks to be an interesting read, as well as Garbage In/Garbage Out on the COMFY 6502 assembler.

I did find the link I’d settled on last month, Pascal for Small Machines, here’s a quote:

In 1983 I joined Digital Equipment as system programmer and had access to first the PDP-11 RSX-11M Pascal compiler and a bit later the first versions of VAX/VMS Pascal. And now things were possible that made me return to the Pascal-M compiler: cross-compile on VMS and run on the KIM-1! I had sources, so I spent all my lunch hours typing in the sources, compiling, testing, all possible on those excellent Digital machines!

… a man to my own heart!

Pascal was the first programming language I learned, formally, in the first year of my University Degree, on a VAX. I kept all my coursework for a good few years but ended up dumping literally about five years before I got back into the VAX/VMS ‘scene’ with my first VAX a VAXstation 4000/90. Ho hum. Anyway, I’ve downloaded Pascal-M and will compile it up and have a play.

Little was I aware that first year of college, sitting in the warm computer room on a cold winter day, in front of a DEC VT320 terminal (does this remind you of a certain computer game?) what a fantastic implementation of Pascal I was using. Typically we were set pretty noddy tasks (fair enough on a first year computer programming course I guess) when lurking in the depths of the language was such a powerful implementation with full access to all the facilities. It’s very comforting to know that the architect of Pascal, John Reagan, is now employed by the OpenVMS resurrection company VMS Software.

So, back on track I picked the first 6502 assembler I found down the google search list, as6502.tar.Z clearly was a Unix implementation but what-the-heck, I’ll give it a whirl. Untar on linux, zip it up, ftp it to SIMVAX and unzip it with -a option to ensure everything is converted to text.

Given that I only had a Unix makefile to work with I hand compiled and linked the source files. Well, what do you know:

A successful assemble! You see C can be portable, it just needs to be appropriate vintage!

On the same page an entry crossed my eye:

foogol.tar.Z – foogol foogol compiler for VAX

Hmm… I downloaded it, here is the header of foogol.doc:

One error, and it’s a good one:

I suppose compiler error messages need to be exact, but that is bordering on cryptic!

It sounds to me like remove() is a function already defined in an include file. Maybe if I rename it I’ll cure the compile error? I rename remove() to be removek() and all calls and bingo, compile success.

However, I have no idea what the source file should look like, and no example file is included! Are, right OK, here is the key line from documentation file:

The foogol language is basically a very small ALGOL.

and also there is a small embedded program:

and that seems to compile:

with a file primes.s generated which contains assembler code, looking suspiciously like VAX assembler, but whether it is valid input to the VAX/VMS MACRO assembler is another matter.

Then of course I read the documentation more closely and it says VAX/Unix assembler. Well, I thought I’d give it a go, but the results were predictable:

Which leaves me wondering what variant of Unix we’re talking about here. I took a quick look at the software kits page for the SIMH, it could be one of these:

  • NetBSD for the VAX; click here for installation instructions and a pointer to the installation kit.
  • 4.3BSD for the VAX; click here for the installation directory.

I’m betting 4.3BSD would be the most likely choice (mental note to look into the versions of Unix that VAXen supported back in the day)

Another entry caught my eye:

vforth.tar.Z – vforth a VAX forth interpreter (written in assembler)

this mentions 4.2 in the README:

What follows is a 32-bit forth. In general, it is based on the FIG
model, but it deviates where necessity or religion demanded. It will
run on a VAX running 4.2, and tends to use the UNIX system calls in only
the most generic of ways (read: should move to 4.1 without problems).
It uses subroutine threading and in-line code generation to “up” the
speed; this is explained in the accompanying documentation.

It has been used to implement a 3D viewing system, which runs
rather nicely; if you’re interested in such a thing, send me mail;
if I get enough queries, I’ll post it to net.sources–otherwise, I’ll
send it direct.

Thanks much to Prentiss Riddle for posting this to me! Please
direct all questions to me, not him! We can’t post to notes from here,
but net mail works fine.
Andy Valencia
…!fortune!hpda!vandys
…!ucbvax!hpda!vandys

Heavy legal lines:
The software which follows is put into the public domain for
private use only; using or distributing this software for a profit is
forbidden. This software comes with no support offered or implied–
you’re on your own!

Which I’m guessing is BSD 4.2. Heck, I have a copy of A Quarter Century of Unix somewhere – I’ll have to dig that out, I’m sure it’s all there in gory detail.

The search continues…