Installing B on UNIX Fourth and Fifth Edition

I assume you have a working v4 or v5 system configured to have a TC11 DECtape controller and the device files at /dev/tapN. If not, follow the guide for v4 here, or for v5 here.

Installation

Get the B tape and mount it in simh:

sim> at tc0 b.tp 
TC0: 16b format, buffering file in memory
sim> c

On UNIX now create a /usr/b directory, extract all the files there, and run the install script.

# mkdir /usr/b
# chdir /usr/b
# mkdir bilib libb
# chown bin *
# chmod 755 *
# tp 0x
END
# sh install
libb.a: non existent
chdir
chmod
chown
close
creat
ctime
execl
execv
exit
fork
fstat
getchr
getuid
gtty
lchar
link
makdir
open
printf
printn
putchr
read
seek
setuid
sleep
stat
stty
time
unlink
wait
write
char
bilib.a: non existent
a
b1
b10
b102
b103
b11
b112
b113
b114
b115
b116
b117
b12
b120
b13
b14
b15
b16
b17
b2
b20
b3
b4
b5
b6
b7
c
f
n11
n123
n4
n6
n7
s
t
u10
u2
u3
u4
u5
u6
u7
va
vx
x
y
z
brt1
brt2
bc
ba
B
i
ii
III
B
i
ii
III
# chdir bilib
# rm *.o
# chdir ../libb
# rm *.o
# rm *.a

On v5 you have to change the permission of the b command:

# chmod 755 /usr/bin/c

Compiling B code

You can now compile B code:

login: aap
% ed hello.b
?
a
main() {
    printf("hello, UNIX*n");
}
.
w
37
q
% b hello
B
i
ii
III
% a.out
hello, UNIX

TO-DO

I only ported libb over from v1, but have not implemented the signal syscall yet.