Posted by under PR1MOS,Prime on November 14 2018, 0 comments

For a while now, Jim Wilkcoxson has had a variety of PR1ME Emulators running on his site. They can only be accessed by telnet and the software is not freely available.

To access them, telnet to 8001

Login as user “guest”, password “pr1me”
After logging in, use the Prime HELP command for assistance.
You are welcome to create a directory under GUEST for your files.
The line erase character is ?
There are other Primos revs running on ports 8001-8007

To quote (extensively) from Jim’s original post on USENET (from April 8th 2007!):

As a brief overview, the Prime architecture had 6 major machine modes:
16S, 32S, 32R, 64R, 64V, and 32I.  All except 32I are supported in the emulator.  32I support, and the extended variety, 32IX, are planned.
64R mode is a 64K-word (16-bit word) memory model, whereas 64V is a segmented model with 8192 segments divided into 4 groups of 2048 each.  The segment length on the Prime was 64K 16-bit words.  The first 2 groups of segments are common to each user’s address space, while the second 2 groups of segments are per-user.  Typically, the Primos Ring 0 code resided in the first group, shared system libraries
resided in the 2nd group, user application space was the 3rd group, and per-user system data such as the command line was stored in the 4th group.  Ring 0 and Ring 3 were implemented on the Prime.

64V mode is a 1-address architecture, with 2 16-bit index registers (X and Y), a 16-bit accumulator (A), a 32-bit accumulator (L), a DP FP accumulator, and 4 base registers.  Using the special-purpose “field address and length” registers, character mode instructions are provided to copy, compare, translate, edit, and fill character string fields, and also provide decimal arithmetic support for COBOL and PL/I, including packed and unpacked decimal add, subtract, multiply, divide, picture edit, move, and binary conversion.  64V mode has 16 commonly-used instructions that are a single 16-bit word, another set of 32-bit wide instructions, and some 48-bit instructions for less commonly-used features such as queue instructions (add to top or bottom of queue, test queue length, remove from top or bottom of queue) and loading the field address registers.  It also had hardware / microcode support for procedure calls with argument transfer and process exchange (wait, notify, and process dispatching).

The version of Primos running on this emulator is 19.2, which is circa 1982.  The emulator has most of the Prime languages loaded: FTN (Fortran 66), F77, PL/I Subset G, Pascal, RPG II, BASICV, and CPL, Prime’s command language.  EMACS and C were also available under this revision, but unfortunately I don’t have access to these for 19.2. Prime also had a very sophisticated Source Level Debugger, DBG, but this too is missing and not loaded.  Primos 19.2 is written in a mix of PMA (Prime’s assembly language), Fortran 66 and PLP.  PLP is the special “systems programming” version of PL/I initially used at Prime.  Later versions of Primos migrated to SPL, a more extended version of PLP.  Both PLP and SPL are also loaded on the emulator.  At 19.2, Prime was just starting to launch EPF’s and BIND, which allowed automatic page sharing of code pages and paging from the file system.
This was not officially supported for customers until rev 19.4 I believe, so the EPF support is very minimal on the emulator.  The emulator has the ability to run Primos and Prime code unmodified.  To improve some aspects of usability, a handful of changes have been made to Primos (for example, to support a fast system console).  The version of Primos running on the emulator was completely compiled and
loaded in the emulator environment.  It’s running about 1.4 MIPS on the PS3 with no optimizations other than compiling with -O.  On a high-end Mac G5 the emulator runs around 2.7 MIPS, mostly because it is very branchy and the PS3 does not support out-of-order execution as well as the G4 and G5 PowerPC processors.

The emulator supports 128 connections, 8 disk controllers w/4 drives each, 1 tape controller with 4 drives, a system console terminal, system clock, and PNC Ringnet controller.  The PNC emulation is not yet complete, but eventually should allow multiple emulators to communicate over the Internet as if they are on a ring.  I have some design ideas for allowing a single emulator to connection to multiple rings – something that wasn’t possible with the physical hardware.
The loopback Primenet code is functional, so for example, the Netlink command can be used to do a loopback login (netlink -to em192a).