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:
+10
-1
@@ -6,6 +6,7 @@ ASARGS=--format=ptr
|
|||||||
MKFS=../tools/mkfs7
|
MKFS=../tools/mkfs7
|
||||||
A7OUT=../tools/a7out
|
A7OUT=../tools/a7out
|
||||||
FSCK=../tools/fsck7
|
FSCK=../tools/fsck7
|
||||||
|
CC=gcc -Wno-multichar
|
||||||
PDP7=pdp7
|
PDP7=pdp7
|
||||||
|
|
||||||
# source dirs
|
# source dirs
|
||||||
@@ -141,7 +142,8 @@ $(BINDIR)/altmkdir: $(ALTSRC)/wktmkdir.s
|
|||||||
|
|
||||||
# The commands that did not come from the scans
|
# The commands that did not come from the scans
|
||||||
others: dirs $(BINDIR)/sh $(BINDIR)/wktcat $(BINDIR)/wktcp $(BINDIR)/date \
|
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 ..
|
# Alternative other commands: no dd, but . and ..
|
||||||
altothers: dirs $(BINDIR)/sh $(BINDIR)/wktcat $(BINDIR)/wktcp $(BINDIR)/date \
|
altothers: dirs $(BINDIR)/sh $(BINDIR)/wktcat $(BINDIR)/wktcp $(BINDIR)/date \
|
||||||
@@ -178,6 +180,13 @@ $(BINDIR)/stat: $(OTHERSRC)/wktstat.s
|
|||||||
$(BINDIR)/od: $(OTHERSRC)/wktod.s
|
$(BINDIR)/od: $(OTHERSRC)/wktod.s
|
||||||
$(AS) $(ASARGS) -o $(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:
|
tests:
|
||||||
mkdir -p $(TESTDIR)
|
mkdir -p $(TESTDIR)
|
||||||
$(AS) $(ASARGS) -o $(TESTDIR)/decimal_out $(TESTSRC)/decimal_out.s
|
$(AS) $(ASARGS) -o $(TESTDIR)/decimal_out $(TESTSRC)/decimal_out.s
|
||||||
|
|||||||
@@ -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!
|
||||||
|
|
||||||
|
|
||||||
+9
-3
@@ -21,6 +21,7 @@ dd drwr- -1 4
|
|||||||
display irwr- -1 12
|
display irwr- -1 12
|
||||||
pptout irwr- -1 13
|
pptout irwr- -1 13
|
||||||
as frwr- -1 bin/as
|
as frwr- -1 bin/as
|
||||||
|
bc frwr- -1 bin/bc
|
||||||
cat frwr- -1 bin/cat
|
cat frwr- -1 bin/cat
|
||||||
check frwr- -1 bin/check
|
check frwr- -1 bin/check
|
||||||
chmod frwr- -1 bin/chmod
|
chmod frwr- -1 bin/chmod
|
||||||
@@ -43,8 +44,13 @@ dd drwr- -1 4
|
|||||||
$
|
$
|
||||||
ken drwr- 10
|
ken drwr- 10
|
||||||
system l---- 3
|
system l---- 3
|
||||||
hello frwr- 10 fs/hello
|
hello frwr- 10 fs/hello
|
||||||
$
|
$
|
||||||
dmr drwr- 12
|
dmr drwr- 12
|
||||||
system l---- 3
|
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
|
||||||
$
|
$
|
||||||
|
|||||||
Reference in New Issue
Block a user