1
0
mirror of https://github.com/livingcomputermuseum/pdp7-unix.git synced 2026-05-03 22:58:57 +00:00

Added rules to build the B compiler and modified proto to install it

as system/bc. Added a b_readme in dmr's home directory to explain
how to compile hello.b.
This commit is contained in:
Warren Toomey
2016-03-23 22:45:53 +10:00
parent 2cc1097593
commit 945fa20bae
3 changed files with 33 additions and 4 deletions

View File

@@ -6,6 +6,7 @@ ASARGS=--format=ptr
MKFS=../tools/mkfs7
A7OUT=../tools/a7out
FSCK=../tools/fsck7
CC=gcc -Wno-multichar
PDP7=pdp7
# source dirs
@@ -141,7 +142,8 @@ $(BINDIR)/altmkdir: $(ALTSRC)/wktmkdir.s
# The commands that did not come from the scans
others: dirs $(BINDIR)/sh $(BINDIR)/wktcat $(BINDIR)/wktcp $(BINDIR)/date \
$(BINDIR)/ln $(BINDIR)/ls $(BINDIR)/mv $(BINDIR)/stat $(BINDIR)/od
$(BINDIR)/ln $(BINDIR)/ls $(BINDIR)/mv $(BINDIR)/stat $(BINDIR)/od \
$(BINDIR)/bc
# Alternative other commands: no dd, but . and ..
altothers: dirs $(BINDIR)/sh $(BINDIR)/wktcat $(BINDIR)/wktcp $(BINDIR)/date \
@@ -178,6 +180,13 @@ $(BINDIR)/stat: $(OTHERSRC)/wktstat.s
$(BINDIR)/od: $(OTHERSRC)/wktod.s
$(AS) $(ASARGS) -o $(BINDIR)/od $(OTHERSRC)/wktod.s
# B compiler
$(BINDIR)/bc: $(CMDSRC)/bl.s $(CMDSRC)/bi.s ../tools/b.c $(OTHERSRC)/b.b
$(CC) -o b ../tools/b.c 2> /dev/null
./b $(OTHERSRC)/b.b b.s
$(AS) $(ASARGS) -o $(BINDIR)/bc $(CMDSRC)/bl.s b.s $(CMDSRC)/bi.s
rm b b.s
tests:
mkdir -p $(TESTDIR)
$(AS) $(ASARGS) -o $(TESTDIR)/decimal_out $(TESTSRC)/decimal_out.s

14
build/fs/b_readme Normal file
View File

@@ -0,0 +1,14 @@
Here is how to compile and run hello.b:
@ bc hello.b hello.s
@ as ops.s bl.s hello.s bi.s
I
II
ops.s
bl.s
hello.s
bi.s
@ a.out
Hello, World!

View File

@@ -21,6 +21,7 @@ dd drwr- -1 4
display irwr- -1 12
pptout irwr- -1 13
as frwr- -1 bin/as
bc frwr- -1 bin/bc
cat frwr- -1 bin/cat
check frwr- -1 bin/check
chmod frwr- -1 bin/chmod
@@ -43,8 +44,13 @@ dd drwr- -1 4
$
ken drwr- 10
system l---- 3
hello frwr- 10 fs/hello
hello frwr- 10 fs/hello
$
dmr drwr- 12
system l---- 3
dmr drwr- 12
system l---- 3
b_readme frwr- 12 fs/b_readme
bi.s frwr- 12 ../src/cmd/bi.s
bl.s frwr- 12 ../src/cmd/bl.s
hello.b frwr- 12 ../src/other/hello.b
ops.s frwr- 12 ../src/other/ops.s
$