VAX virtual bare-metal programming

| | Comments ()

I was always curious about VAX architecture disrupting computer architectures around '80s and supporting a succesfull and challenging strategy for DEC in those years.

With this post I am releasing my last snippets of code exploring VAX architecture. Those snippets of code contain the required code developed from scratch to bootstrap a simple kernel supporting an interactive shell. Among the goals for programming this simple kernel were checking the minimal bootstrapping code, MMU programming, interrupt handling, I/O (console support) and multitasking on VAX.

At the beginning I was not thinking about releasing code but several weeks ago, and while I was chating with Chema about licenses, hacking, source code, etc. my mind changed. I guess Chema did good points and I made the decision to release this code under a BSD license eventually.

I think this action is coherent with the way I chose to resolve lack of available documentation and/or making long manual transcriptions. I found useful the NetBSD VAX port bits in this point.

Returning to VAX, this mature design is key to understand one of the most influential processor architectures, together with PDP-11, from '70s to '90s. It supported VMS, one of the public and commercial DEC's operating systems (together with RSX11-M) being the precursors to Windows NT.

Well, I am using the 'public' word here because MICA got canceled. MICA was the operating system for PRISM. This non-released code became the Microsoft's NT kernel for the coming years as you know.

With the Star/Starlet project roadmaps in mind you realize the ambition for VAX coming from DEC. On the top of this architecture plenty of current software commodities, true innovations 30 years ago, took shape while future hardware architects would get truly inspiration for the new designs.

Hacking into VAX in those years is synonym of programming a computer class know as Minicomputers. A "mini" is a class of smaller computers that evolved in the mid-1960s and sold for much less that mainframe and mid-size computers. This class of computers were designed/used for control, instrumentation, human interaction and communication switching mainly.

Okay, programming a Mini sounds great although acquiring/hosting this hardware could be an inconvenient though. I addressed this issue with virtual hardware developed by The Computer History Simulation Project. This project is a loose Internet-based collective of people interested in restoring historical significant computer hardware and software systems by simulation.

SIMH, the flagship of the project, is a highly portable multi-system simulator. Developed by Bob Supnik, a former DEC engineer and DEC vice president, has been in development in one form or another since the 1960s.

SIMH v3.9, the version I picked to hack in VAX, supports two different VAX models: the VAX-11/780 and the MicroVAX 3900. MicroVAX 3900 got my attention quickly.

The MicroVAX 3800 and MicroVAX 3900, code-named "Mayfair III", were introduced in April 1989 as high-end models in the MicroVAX family, replacing the MicroVAX 3500 and MicroVAX 3600, and were intended to compete with the IBM AS/400. These systems used the KA655 CPU module, which contained a 16.67 MHz (60 ns cycle time) CVAX chip set. They supported up to 64 MB of memory.

Checking SIMH's virtual MicroVAX 3900 it implements CPU and memory (CVAX CPU/16MB-64MB), console, real time clock, CR11/CD11 card reader, LPV11 line printer, DZV11 multiplexor, DHQ11 multiplexor, cartridge, floppy, disk, magnetic tape and DELQA/DEQNA ethernet controller. The real Mini behind of this virtual MicroVAX 3900 could look like the previous picture.

So in order to test/play with this code, a simple bootstrapping code + kernel + interactive shell driving a MicroVAX 3900 you will need to grab the following software:

  • SIMH v3.9. Virtual hardware for MicroVAX 3900
  • SVK. Simple VAX kernel


~$ ./scripts/

VAX simulator V3.9-0

KA655-B V5.3, VMB 2.7
 1) Dansk
 2) Deutsch (Deutschland/�sterreich)
 3) Deutsch (Schweiz)
 4) English (United Kingdom)
 5) English (United States/Canada)
 6) Espa�ol
 7) Fran�ais (Canada)
 8) Fran�ais (France/Belgique)
 9) Fran�ais (Suisse)
10) Italiano
11) Nederlands
12) Norsk
13) Portugu�s
14) Suomi
15) Svenska
 (1..15): 5
Performing normal system tests.
Tests completed.
>>>boot dua1:


booting ...
loading kernel ...
starting kernel ...
RAM 67043328 bytes
VM enabled
SCB initialized
clock started
console started
console buffer initialized
scheduler initialized
running shell...
# help
available commands:
help - show help
ver - show version
run_all_tests - run all test cases
run_nil_mutex_test - run non interlocked mutex test
run_il_mutex_test - run interlocked mutex test
run_clk_test - run clock test
run_cons_input_test - run console input test
multitask_on - enable multitask, run proof of concept processes
multitask_off - switch to process 0, switch off multitask
# ver
Simple VAX Kernel (SVK) 0.1


comments powered by Disqus

Recent Entries