diff --git a/build/Makefile b/build/Makefile index bf120e0..2b9cda8 100644 --- a/build/Makefile +++ b/build/Makefile @@ -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 diff --git a/build/fs/b_readme b/build/fs/b_readme new file mode 100644 index 0000000..5c5099c --- /dev/null +++ b/build/fs/b_readme @@ -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! + + diff --git a/build/proto b/build/proto index 0684456..5270b45 100644 --- a/build/proto +++ b/build/proto @@ -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 $