Hello, patient reader!
It's been a while since I've returned to these pages. To be honest, I thought I was mostly done with this project and moved on to different projects. However, lately there was a development, that I just had to report on. A fabulous fellow, called Kevin Jordan (of Nostalgic Computing Center fame) did the impossible. He created a quite comprehensive toolset for the Cray XMP and COS!
This is amazing news. It means that - at least in theory - one can write assembly, C, even Fortran, Basic or Pascal programs and run them in a COS environment. You can find his projects on GitHub with quite complete instructions:
He also added support for the front-end protocol to the simulator, allowing him to connect to a real CDC Cyber mainframe running Cray Station for NOC. You can try all of that out on the afforementioned Nostalgic Computing Center website, where you can also find an installation of UNICOS if you're more interested in that falvor of the past.
But it's not UNICOS I want to write here about. It's COS. More specifically, I want to document instructions on how to run his tools on the simulator on your local machine.
Prerequisites
You need to follow his instructions to build booth COS-Tools and COS-ack. A quick summary:
sudo apt install bison flex gcc lua5.3 make
git clone https://github.com/kej715/COS-Tools.git
cd COS-Tools
make
sudo make install
git clone https://github.com/kej715/ack.git COS-ack
cd COS-ack
./cray-build.sh
sudo make install
Don't forget to make sure that both 'cal' and 'ack' are in the path. You also have to go through the 'install' process in the simulator. A quick re-cap in case you need it:
After starting the simulator, in the IOP0 terminal type:
START COS_117 INSTALL
In the newly opened station window, you'll need to type:
LOGON
STMSG
REPLY,0,GO
REPLY,1,GO
STMSG,I
This is optional, but if you'd like, you can start an interactive session and generate the master and backup catalogs. To do so in the IOP console you need to type:
IAIOP LOG
Then, back in the station windows, type in the following incantations to start an interactive session:
IAC
/LOGON
ACCOUNT,AC=CRAY,APW=XYZZY,UPW=QUASAR.
ECHO,ON=ALL.
OPTION,STAT=ON.
Now that the interactive session is properly started, you can transfer 'GENCAT' and execute it:
FETCH,DN=GENCAT,MF=AP,AC=ST,TEXT=BIN/GENCAT.
GENCAT.
GENCAT will drop you into a new prompt (a '?' one). Here, you need to type the following:
MCD,PDN=$MASTER,R=QUASAR,W=QUASAR,M=QUASAR.
BCD,PDN=$BACKUP,R=QUASAR,W=QUASAR,M=QUASAR.
CREATE,CAT=BACKUP.
CREATE,CAT=MASTER.
EXIT.
Demo
Here we'll run through how to compile and run the canned examples that I've checked in to the simulator repository.
First, you have to (re)create your expander disk with the (compiled) examples on them. You can do that by running the 'build_exp_disk_with_examples' script.
After that, you can restart the mainframe using the 'deadstart' sequence. In the main IOP0 terminal, type:
START COS_117 DEADSTART
STATION
In the newly appearing window (the station one) you should type the following:
LOGON
STMSG
REPLY,0,GO
REPLY,10,CONTINUE
STMSG,I
CLASS,ALL,ON
LIMIT,5
At this point, we need to enter an interactive console. First, in the IOP console you need to type:
IAIOP LOG
Then, back in the station windows, type in the following incantations to start an interactive session:
IAC
/LOGON
ACCOUNT,AC=CRAY.
ECHO,ON=ALL.
OPTION,STAT=ON.
Now that the session is initialized, you can transfer your binary file from the front-end disk to the mainframe:
FETCH,DN=HELLOA,MF=AP,TEXT=BIN/HELLOA.
And execute it:
HELLOA.
What you should see is 'Hello world!' printed on the console. Congratulations! You've just executed your first custom-built program on COS!
The provided C example can be transferred and executed the same way:
FETCH,DN=HELLOC,MF=AP,TEXT=BIN/HELLOC.
HELLOC.
This should greet you with the message:
Hello syslog
If you want to repeat the experience, modify the sources (target/cos_117/examples/helloa) and re-run 'build_exp_disk_with_examples'. This will re-create the expander disk under the running simulator. Luckily there's no caching of any sort implemented in the XMP IOP code, so this is fine: the next time the mainframe tries to access the disk, it will simply see the new content. You can thus re-fetch (under a different 'DN' name) and re-execute your modified code.
Leave a comment
Comments are reviewed before they are published, so yours will not show up right away.
You can use
**strong**and*italic*text,`code`, and lists (lines starting with-or1.). Everything else, HTML included, is shown as it was typed.