Essex BCPL pre-requisites

Having restored the BCPL tape, before you can properly install BCPL you must undertake some pre-requisite work. Fortunately the pre-requisites are stated in the BUILD.CTL file that ships on the tape and boil down to three things:

  1. Check the code in LINK recognises compiler code #13 as requiring SYS:BCPLIB.REL as the default library. This code should be in LINK v2 onward.
  2. Check COMPIL recognises the extension .BCL and .BCP as requiring the BCPL compiler.
  3. Set up a BCPL library area identified as BCL: and known to the monitor.

On the face of it, this may seem simple but it turns out that the standard utilities shipped with TOPS-10 7.04 do not meet all these requirements, so we must make some changes to the monitor and the tools in the o/s.

To keep this simple, I decided to go with the easiest first. It is a relatively simple matter to determine if the linker supports BCPL by checking if the linker will take BCPL as an argument for the /SYSLIBRARY switch. As can be seen in the example below, the linker on my system won’t accept any old rubbish, but will accept BCPL, so I conclude the linker is BCPL ready.

.r link

?SCNUSV Unknown switch value FOO



The next step is to make sure the COMPIL command understands BCPL files for input. I have already tried this and currently it tries to compile BCPL with the default FORTRAN compiler, so clearly not. Therefore we have to make some modifications to the COMPIL command to support BCPL. Fortunately, in the BCPL provided files is a file called COM22C.SCM which shows the differences between before and after edits on the COMPIL command source code which should be found in the PPN,SFD of [10,7,COMPIL] on most systems. In order to apply the changes in the COM22C.SCM file we have to manually edit the source file by hand to make the changes and then re-compile the COMPIL command. For this we need to use the SOS editor, which for its days was pretty decent but is still essentially a line orientated teletype based editor.

When making the changes to COMPIL.MAC[10,7,COMPIL] be very aware that the version of COMPIL on Tops-10 v7.04 is going to be a later version from the Essex comparison 1976 version so we will have to adapt the changes as appropriate.

The first step in the edit cycle is to make a backup of the original source. I will call this backup COMPIL.DEC as it is the original supplied by DEC and goes with the naming convention in the COM22C.SCM file above:

.r setsrc

*cp [10,7,compil]



.copy compil.dec=compil.mac


COMPIL EXE 40 <155> 1-Sep-88 22G(605) DSKB: [10,7,COMPIL]
COMPIL MAC 229 <155> 10-Sep-87
COMPIL DEC 229 <057> 21-Feb-18
Total of 498 blocks in 3 files on DSKB: [10,7,COMPIL]


Next, I revert back to my home PPN and take a copy to work on with the SOS editor. I did try and use file transfer to the host and edit using a visual text editor but the files produced by SOS are not plain text and include control characters which break the source file if lost.

.r setsrc

*cp [1,2]



.copy dsk:=compil.mac[10,7,compil]

.sos compil.mac

Now that I have opened COMPIL.MAC for edit, we will need to make all the changes listed in the COM22C.SCM file above. This is a bit tricky because the COMPIL.MAC that I am editing is not the same as the CPOMPIL.MAC that was originally compared with in the differences file. My system is Tops-10 7.04 and the COMPIL.MAC has had many updates since then. As an illustration the DEC version of the Essex original was 3, but my DEC source is now 7 and the Essex VEDIT level is 307 and my source is 605. So we will have to be careful when making changes to ensure that we are making them intelligently in the context of the more recent source rather than just blindly following the instructions. This is particularly true for the edit on original source page 58 which has an relative JUMPL instruction that in my later source is a JUMPL to a label, so I need to be sure what effect the changes are supposed to have before just blindly applying the new BCPL sections.

First lets Find the location of the first change and insert the addition and then print the surrounding lines. When using SOS, the $ character is displayed when I press the key and * is the prompt:

03100 VCOMPIL==22
03300 VEDIT==605 ;EDIT LEVEL

Now lets change VEDIT and VCUSTOM as per the changes listed above. We do this by using the substitute command and apply it to line 3300 which we listed above and then find VCUSTOM and substitute the version on that line. Remember that the $ is the key.

03300 VEDIT==VLOCAL*1000+605 ;EDIT LEVEL

Now continue to make the remaining changes to the file as listed in the differences file above, remembering to be intelligent about the edits as your source file is probably not the same as the original source that the differences listed in COM22C.SCM refers to. The other thing to watch out for is that large files like COMPIL.MAC are divided into pages as the number of lines exceed the maximum that SOS can accommodate. So when specifying where to make a substitution or do a find ensure that you are aware of the page number. Where you do need to specify a line and page number the format is line/page. Look at the SOS help for more details on commands and parameters. For example, here I have found something on page 5 that needs to have an insert done before it:


Page 5
02310 IFN BCPL, ;[1000]

After applying all the edits to the new COMPIL.MAC file, the first test of having successfully done this to see if it will indeed compile.

.compil compil.mac/compile



The fact that it completes the compile suggests that at least the syntax is right, so no silly spelling mistakes have occurred as I would expect the compiler to pick that up.

Next, lets see if it can link, produce an executable program, and execute.

.execute compil.mac/ssave
LINK: Loading
[LNKXCT COMPIL execution]
?CMLNPC No previous command
COMPIL MAC 298 <057> 22-Feb-18
COMPIL REL 52 <057> 23-Feb-18
COMPIL EXE 44 <057> 23-Feb-18 22G(1605)-2
Total of 399 blocks in 3 files on DSKB: [1,2]

The error after the compile is produced by COMPIL.EXE, so this suggests that not only does it compile and link, but successfully executes and reports that no file name was passed to COMPIL.

Having produced (presumably) a successful EXE with BCPL support, now lets install the new COMPIL command. If you are not already, login as OPR, then copy dsk:[10,7,compil]=compil.exe and copy sys:<055>=compil.exe after which the new COMPIL should be in place. Notice the new version number and date in the directory below.

.dir sys:compil.exe

COMPIL EXE 44 <055> 22-Feb-18 22G(1605)-2 DSKB: [1,4]

Now we have the new COMPIL command that supports BCPL, we can add a BCL: ersatz device to the monitor. To do that we must go through MONGEN.

First, lets choose and create the directory for BCL:

.r credir

Create directory: [5,24]/protection:775
Created DSKB0:[5,24].UFD/PROTECTION:775
Create directory: ^Z

I have used the PPN of [5,24] as this is the next in sequence after the reserved PPNs for language sources listed in Appendix D-2 of the Operating System Commands Manual.

Now lets set up the ersatz device in MONGEN.

.r setsrc
*cp [10,7,mon]



.r mongen

MONGEN for 704 monitors

MONGEN will generate any known TOPS-10 configuration. For information
about which configurations are supported, please refer to the SPD.

Which GEN (SYS,F) : s
DECsystem10 (KL,KS) : ks
System name : PDP10
CPU0 serial number (1-10000) : 4097
Exclude monitor overhead from user run time (YES,NO) : y
Account verification (YES,NO) : n

Autoconfigured device options:
Include Ethernet service (NO,YES,PROMPT): n
Prompt for RP0x/RM0x Massbus disks (NO,YES): n
Include TM02/TM03 magtapes (NO,YES,PROMPT): y
Include UNIBUS/LP20 printers (NO,YES,PROMPT): y
Include UNIBUS/CD20 card readers (NO,YES,PROMPT): n

Local terminal configuration:
DZ-11 TTY lines (0-32) : 32

OPR octal line number (CTY,0-37) : cty
Data set lines

Number of Jobs (1-511) : 127
Maximum pages of core for each job (0,0-16384) :
Total amount of system core in K (512-4096) : 1024
Clock ticks per second (60,50) : 60
Allow jobs to be locked in core (YES,NO) :
Guaranteed number of pages for unlocked jobs (0,0-16384) :
Number of pages reserved for locking jobs in Exec Virtual Memory (10,0-?) :
Number of high priority interrupt queues (0,0-15): 15
Meter (NO,YES) :
Disk sets (ALL) :
Configure non-autoconfigured hardware (NO,YES) :
Number of KMC/DUP Lines (0,0-2) :
Number of PTYs (20,1-476) :

Network software (YES,NO) : n

Decimal "symbol,value"

Octal "symbol,value"

SIXBIT "symbol,value"

Type "device-mnemonic,PI-channel" for special devices

Type "device-mnemonic,PI-channel,no.-of-devices"

Type "device-mnemonic,PI-channel,highest-ac-to-save"

Type "ersatz-device,P,Pn,search-list-type"

Type "command-name,dispatch,flags,unique-bits,PRVTAB-name"

Terminal class :

Additional terminals for classes:

Class to extend :

System default terminal type (TTY) :

Which GEN (SYS,F) : f
Feature set (KL10,KS10) : ks10
Standard settings (YES,NO) :
File DSK:F.MAC Closed

Which GEN (SYS,F) : ^Z


.compile/compile f,s


.compile/compile devprm,dteprm,netprm,d36par


.compile/compile syscnf+<common,comdev,commod>


.r link

*sys2/save/noinitial/hash:13k = /locals -
[LNKRLC Reloc. ctr. initial value current value limit value
.LOW. 0 64443 344000
.HIGH. 344000 607662 720000
.INIT. 740000 764722 771000
.TWIC. 771000 772401 1000000
Absolute code loaded]



This has now created a new system monitor in [10,7,mon] called SYS2.EXE which should now include the BCL: ersatz device. Lets check it works by booting with the new system.

[Loading from DSKB:SYS2.EXE[10,7,MON]]

PDP10 23-Feb-18
Why reload: sch
Startup option: g

PDP10 20:32:10 CTY system 4097
Connected to Node CENTRA(0) Line # 42
.LOGIN 1,2

[CCPWFD Waiting for file daemon to start]
%%TTY STOMPER – Starting

The system boots! Now lets check if the BCL: device exists.


.dir bcl:

%WLDDEM Directory is empty bcl:


That shows that the BCL: device is linked to the empty directory in [5,24] that I created earlier.

So, now all the pre-requisites are complete, lets install BCPL! We will also want to make SYS2.EXE[10,7,MON] our default SYSTEM, but we can do that later when we are sure everything works.

About Quentin

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

4 Responses to Essex BCPL pre-requisites

  1. Drew says:

    Minor hiccup – your MONGEN instructions include the line:

    .compile/compile syscnf+

    This should be:

    .compile/compile syscnf+

    I suspect the ≤ > HTML tags got mangled somehow.

  2. Drew says:

    Hmm, mangled again. WordPress issue? I’ll try ampersand lt; and gt;

    .compile/compile syscnf+<common,comdev,commod>

  3. Quentin says:

    Hi Drew

    Yes, a wordpress “feature”. I think Ive debugged it now.

Leave a Reply

Your e-mail address will not be published. Required fields are marked *