Getting in the MUD

Now that TOPS-10 and BCPL is fully operational, the next step is to wade into the MUD.

MUD is provided as a set of source files in a mix of BCPL and MACRO-10. Having downloaded the tape from GitHub and restored it on to my TOPS-10 system, I found that apart from the source there is little or no documentation.

Fortunately I did find a file which summarised what the files that make up the package are:

mud.sub ;This file!
mud.mic ;A mic file to compile it
mud.box ;Improvements/things to do/bugs to be found
dungen.get ;Main getfile
mudlib.get ;Another getfile
dbase.bcl ;Database loader
mud0.bcl ;Database interpreter statics
mud1.bcl ;Start, Check.stuff, parsing things
mud2.bcl ;demon stuff and Move
mud3.bcl ;general support routines
mud4.bcl ;communication parts
mud5.bcl ;Special and Action
mud6.bcl ;Drop, Get and description components
mud7.bcl ;Special's supporting routines
mud8.bcl ;Interact
mudlib.bcl ;Library routines and various other annoying bits and pieces
mboots.mac ;The start address stuff for initialisation
power.bcl ;For producing specified .MUD files! Frig, Start & Dot combined
dbadat.mac ;High segment skeleton of database

Unfortunately it seems that there is some key files missing, notably the MUD.MIC file which contains the script to compile MUD. If this was a simple program it probably would not matter, but it is likely that some special parameters will be needed to compile this and those would have been in the MUD.MIC file.

To remedy the missing file I contacted Richard Bartle who had the original MUD.MIC but only as a printout. Some scanning and re-keying later I had MUD.MIC on my TOPS-10 system, albeit probably with some errors as the printouts were quite faded and not 100%.

Now that I had the MUD.MIC, and corrected a few obvious typos from where I entered it in, it was time to give it a run. The comments in the MUD.MIC helpfully gave instructions on the parameters to pass to get MUD to build. So, lets DO MUD ALL.

.do mud all

.noerror

.if ($A#"") .goto all

.
.r macro

*dbadat=dbadat
Assembling Database for MUD version 3

NO ERRORS DETECTED

HI-SEG. BREAK IS 403411
PROGRAM BREAK IS 000000
CPU TIME USED 00:00.032

10P CORE USED

*mboots=mboots
% .SGPPN will be obsolete; please use GETTAB .GTRDI instead.
% .SGDEV will be obsolete; please use GETTAB .GTRDV instead.

NO ERRORS DETECTED

HI-SEG. BREAK IS 400160
PROGRAM BREAK IS 000206
CPU TIME USED 00:00.133

36P CORE USED

*^Z

.
.r bcpl

*mud0/o
BCPL: MUD0 400501/400
*mud1
BCPL: MUD1 403343/21
*mud2
BCPL: MUD2 404030/14
*mud3
BCPL: MUD3 402677/42
*mud4
BCPL: MUD4 402336/30
*mud5
BCPL: MUD5 422144/11
*mud6
BCPL: MUD6 407277/67
*mud7
BCPL: MUD7 403653/15
*mud8
BCPL: MUD8 410477/13
*mudlib
BCPL: MUDLIB 417106/1471
*^Z

EXIT

.
.r link

*mud0,mud1,mud2,mud3.mud4.mud5.mud6.mud7.mud8.mudlib,mboots/counter/set:.high.:5
01501
?SCNDEX Double extension illegal MUD5

*dbadat/o
?SCNABS Ambiguous switch O

*^C

.ssa
LINK saved

.if ($A="all") .goto DB

.
.r bcpl

*dbase/o
BCPL: DBASE
get "bcl:rfs"
^
(E36-15) Unable to get GETFILE

(E53-396) Non 'MANIFEST' name in constant
AC

(E53-397) Non 'MANIFEST' name in constant
AC

(E53-1718) Non 'MANIFEST' name in constant
ONE

(E53-1719) Non 'MANIFEST' name in constant
P

(E53-1720) Non 'MANIFEST' name in constant
AC

(E53-1720) Non 'MANIFEST' name in constant
P

(E53-1721) Non 'MANIFEST' name in constant
AC

(E53-1722) Non 'MANIFEST' name in constant
AC

(E53-1726) Non 'MANIFEST' name in constant
P
420213/2770
% 10 Errors
*^C

.r link

*/set:.high.:430000
*dbase,sys:bcplib/search/set:.high.:501501,dbadat/g

EXIT

.nsa
?nsa?

.mic exit

This looks surprisingly good for how it could have gone. Immediately obvious issues are that there is a missing library header RFS plus what I am guessing are one or two typos. Of course, whether the outputs produced are any good is another matter.

Probably the biggest issue is the RFS library, because if we haven’t got that we are stuck as everything else should be fixable. After inspecting my BCL: directory and the original BCPL supplied tape files there area few library headers that are missing. The files appear in the the BCPLIB.MAS archived source and in the directory which I restored BCPL to, but were not copied over to the libraries when installing BCPL using the BUILD.CTL batch job file. This is easily remedied by copying the missing libraries and headers to BCL:.

.cop bcl:=*.get[10,7,bcpl]

.cop bcl:=*.rel[10,7,bcpl]

.dir bcl:

ACS GET 1 <055> 2-Nov-77 DSKB: [5,24]
BCPLIB GET 2 <055> 23-Oct-75
BITS GET 2 <055> 25-Feb-75
ERRORS GET 2 <055> 8-Jun-78
IOLIB GET 1 <055> 23-Oct-75
IOPACK GET 1 <055> 7-Oct-78
IOUUO GET 1 <055> 7-Feb-75
JOBDAT GET 1 <055> 7-Feb-75
SCB GET 5 <055> 21-Feb-78
USEFUL GET 1 <055> 7-Oct-78
KERNEL GET 1 <055> 7-Oct-78
BCPLIB MAS 227 <055> 12-Feb-80
GLOBAL REL 83 <055> 13-Mar-75
LOWLIB REL 131 <055> 8-Feb-80
ARRLIB GET 1 <055> 15-Aug-75
CMDLIB GET 1 <055> 10-Sep-75
COROUT GET 3 <055> 20-Nov-75
DICLIB GET 3 <055> 23-Jul-76
RFS GET 3 <055> 15-Sep-75
RFSLIB GET 1 <055> 19-Sep-75
ARRLIB REL 3 <055> 15-Aug-75
BCPLDT REL 97 <055> 23-Mar-76
CMDLIB REL 6 <055> 21-Feb-78
COROUT REL 5 <055> 26-Jan-77
DICLIB REL 12 <055> 23-Jul-76
RFSLIB REL 28 <055> 19-Feb-76
SYNLIB REL 10 <055> 15-Apr-75
Total of 632 blocks in 27 files on DSKB: [5,24]

Note that you should not need BCPLIB in BCL: as it is copied to SYS: by the BUILD.CTL install job. For completeness, I deleted BCPLIB.REL in BCL:.

There were also some typos in the MUD.MIC, particularly on the linker line where I put full stops instead of commas between the various object files. Additionally the 7.04 monitor on my TOPS-10 system does not support NSAVE command as this seems to not be required. A quick substitute in SOS fixed that plus a few other typos. The corrected MUD.MIC is now uploaded to the PDP10/MUD1 GitHub repo.

With the libraries in place and the corrections made, now when we DO MUD ALL, we get the following output:

.do mud all

.noerror

.if ($A#"") .goto all

.
.r macro

*dbadat=dbadat
Assembling Database for MUD version 3

NO ERRORS DETECTED

HI-SEG. BREAK IS 403411
PROGRAM BREAK IS 000000
CPU TIME USED 00:00.017

10P CORE USED

*mboots=mboots
% .SGPPN will be obsolete; please use GETTAB .GTRDI instead.
% .SGDEV will be obsolete; please use GETTAB .GTRDV instead.

NO ERRORS DETECTED

HI-SEG. BREAK IS 400160
PROGRAM BREAK IS 000206
CPU TIME USED 00:00.016

36P CORE USED

*^Z

.
.r bcpl

*mud0/o
BCPL: MUD0 400501/400
*mud1
BCPL: MUD1 403343/21
*mud2
BCPL: MUD2 404030/14
*mud3
BCPL: MUD3 402677/42
*mud4
BCPL: MUD4 402336/30
*mud5
BCPL: MUD5 422144/11
*mud6
BCPL: MUD6 407277/67
*mud7
BCPL: MUD7 403653/15
*mud8
BCPL: MUD8 410477/13
*mudlib
BCPL: MUDLIB 417106/1471
*^Z

EXIT

.
.r link

*mud0,mud1,mud2,mud3,mud4,mud5,mud6,mud7,mud8,mudlib,mboots/counter/set:.high.:5
01501
[LNKRLC Reloc. ctr. initial value current value limit value
.LOW. 0 2716 1000000
.HIGH. 400000 502644 1000000]
%LNKDRC Decreasing relocation counter .HIGH. from 502644 to 501501
*dbadat/g
?
?Illegal memory reference at user PC 602205

.ssa
LINK saved

.if ($A="all") .goto DB

.
.r bcpl

*dbase/o
BCPL: DBASE 420112/2770
*^C

.r link

*/set:.high.:430000
*dbase,sys:bcplib/search/set:.high.:501501,dbadat/g

EXIT

.replaced NSA with SAVE for 7.04 monitor
save
DBASE saved

.mic exit

Whilst much seems to work the output suggests that there is still an issue with linking the program together as highlighted below.

.r link

*mud0,mud1,mud2,mud3,mud4,mud5,mud6,mud7,mud8,mudlib,mboots/counter/set:.high.:5
01501
[LNKRLC Reloc. ctr. initial value current value limit value
.LOW. 0 2716 1000000
.HIGH. 400000 502644 1000000]
%LNKDRC Decreasing relocation counter .HIGH. from 502644 to 501501
*dbadat/g
?
?Illegal memory reference at user PC 602205

So what is causing this illegal memory reference?

To my stunned amazement, following another helpful comment from John Forecast I have discovered that the MUD.TAP tape file on GitHub contains a compiled working version of MUD1 rather than the just the source files, which is what I had assumed. Let that be the lesson! So I can jump ahead by skipping the whole build form source stage and get to:

.ru mud

You shouldn't run MUD privileged!
I don't seem to be able to access :F.MUD[166055000000,0], it's
not your fault, sorry.

However, I think that this journey is not complete if I don’t build from scratch and the suggestion is that the MUD.MIC file that I have transcribed is still not quite right for target all. The next step then is to explode the MUD.MAS file which contains the source from the tape to see what lies within.

About Quentin

Im just a normal bloke.
This entry was posted in Retro Computing and tagged , , , , . Bookmark the permalink.

2 Responses to Getting in the MUD

  1. John Forecast says:

    It looks like there’s a mismatch between the MUD.MIC you transcribed and the source tree – the high segment is possibly getting truncated by the /SET:… switch. If you use the MUD.MIC from MUD.tap it will build without the error message. You will have to make a few changes:

    r dskf:bcpl[1,4] => r bcpl
    .nsa => save
    .nss => ssave

    Now when I run MUD I get:

    .run mud

    isn’t available at the moment. Try again tomorrow?

    I have DECnet running on the PDP-10 and also a Raspbian installation on a Raspberry Pi so I think I’ll copy the source over so I can use some more modern tools, like grep!

Leave a Reply

Your email address will not be published. Required fields are marked *