From 13db06903d7c1afa9d37ab20a919b68549e102a3 Mon Sep 17 00:00:00 2001 From: Tom Everett Date: Sat, 19 Mar 2016 18:41:04 -0600 Subject: [PATCH 01/11] ignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 7a67ce5..fdd1ee7 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ build/a.lst build/a.rim build/image.fs +build/bin +build/n.out From 3456d6517e549df76a299ef987b1389d74b8aa10 Mon Sep 17 00:00:00 2001 From: Tom Everett Date: Sat, 19 Mar 2016 18:55:32 -0600 Subject: [PATCH 02/11] makefile updates --- Makefile | 27 ++------------------------- build/Makefile | 29 +++++++++++++++++++++++++++-- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/Makefile b/Makefile index 0913396..1c2ba34 100644 --- a/Makefile +++ b/Makefile @@ -1,31 +1,8 @@ -# Top level makefile to build the tests and everything else -AS=tools/as7 -ASARGS=--format=ptr -TESTDIR=tests -all: buildit testit +all: buildit buildit: - cd build && make - -runsh: all - cd bin && ../tools/a7out sh - -testit: - mkdir -p $(TESTDIR) - $(AS) $(ASARGS) -o $(TESTDIR)/decimal_out src/tests/decimal_out.s - $(AS) $(ASARGS) -o $(TESTDIR)/fork_test src/tests/fork_test.s - $(AS) $(ASARGS) -o $(TESTDIR)/octal_test src/tests/octal_test.s - $(AS) $(ASARGS) -o $(TESTDIR)/testmul src/tests/testmul.s - $(AS) $(ASARGS) -o $(TESTDIR)/write_test src/tests/write_test.s - -runtests: tests - cd tests && ../tools/a7out decimal_out - cd tests && ../tools/a7out fork_test - cd tests && ../tools/a7out octal_test -# cd tests && ../tools/a7out testmul -# cd tests && ../tools/a7out write_test + cd build && make all clean: - rm -rf $(TESTDIR)/* cd build && make clean diff --git a/build/Makefile b/build/Makefile index 0d31b31..288e0f3 100644 --- a/build/Makefile +++ b/build/Makefile @@ -3,11 +3,15 @@ AS=../tools/as7 ASARGS=--format=ptr MKFS=../tools/mkfs7 +A7OUT=../tools/a7out +FSCK=../tools/fsck7 SYSSRC=../src/sys CMDSRC=../src/cmd OTHERSRC=../src/other +TESTSRC=../src/tests BINDIR=../bin +TESTDIR=../tests all: cmd others a.rim image.fs @@ -25,12 +29,16 @@ coldboot: image.fs: $(MKFS) --format simh proto - + $(FSCK) image.fs + clean: - rm -f a.rim image.fs a.lst n.out $(BINDIR)/* + rm -f a.rim image.fs a.lst n.out + rm -rf $(BINDIR) + rm -rr $(TESTDIR) dirs: mkdir -p $(BINDIR) + mkdir -p $(TESTDIR) cmd: dirs # $(AS) $(ASARGS) -o $(BINDIR)/adm $(CMDSRC)/adm.s @@ -66,3 +74,20 @@ others: dirs $(AS) $(ASARGS) -o $(BINDIR)/ls $(OTHERSRC)/wktls.s $(AS) $(ASARGS) -o $(BINDIR)/mv $(OTHERSRC)/wktmv.s $(AS) $(ASARGS) -o $(BINDIR)/stat $(OTHERSRC)/wktstat.s + +testit: + mkdir -p $(TESTDIR) + $(AS) $(ASARGS) -o $(TESTDIR)/decimal_out $(TESTSRC)/decimal_out.s + $(AS) $(ASARGS) -o $(TESTDIR)/fork_test $(TESTSRC)/fork_test.s + $(AS) $(ASARGS) -o $(TESTDIR)/octal_test $(TESTSRC)/octal_test.s + $(AS) $(ASARGS) -o $(TESTDIR)/testmul $(TESTSRC)/testmul.s + $(AS) $(ASARGS) -o $(TESTDIR)/write_test $(TESTSRC)/write_test.s + +runtests: tests + cd $(TESTDIR) && $(A7OUT) decimal_out + cd $(TESTDIR) && $(A7OUT) fork_test + cd $(TESTDIR) && $(A7OUT) octal_test +# cd $(TESTDIR) && $(A7OUT) testmul +# cd $(TESTDIR) && $(A7OUT) write_test + + From 38dcd9256ef531439c26b48d25c6013f17627759 Mon Sep 17 00:00:00 2001 From: Tom Everett Date: Sat, 19 Mar 2016 19:00:31 -0600 Subject: [PATCH 03/11] makefile --- README.md | 14 +++++++++++++- build/Makefile | 13 +++++++------ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ec81851..9dde802 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,19 @@ system fully up on a PDP-7 system, fix any bugs and document everything. We have a [real PDP-7](http://physics.uoregon.edu/outreach/movies/pdplives/) and [SimH](http://simh.trailing-edge.com/) as target platforms. +## Running pdp7-unix + +You will need [simh](http://simh.trailing-edge.com/) 4.0 to run pdp7-unix. You can get the source code [here](https://github.com/simh/simh). To compile it: + +`make pdp7` + +to run pdp-unix from the pdp7-unix source tree + +`make run` + +Press `ctl-e` to break out the simulator into simh + + ## Source Tree The code in the original scans are (c) Novell who own the rights to the Unix @@ -37,7 +50,6 @@ source code. Everything that didn't come from the scanned files is GPLv3. * /tools holds the source for the tools written to assist the project * /build is an area to build the kernel & filesystem and run them * /misc holds miscellaneous notes and information -* /pdp7parse holds a Java parser for pdp7 source code ## Travis Status diff --git a/build/Makefile b/build/Makefile index 288e0f3..ad09828 100644 --- a/build/Makefile +++ b/build/Makefile @@ -12,11 +12,12 @@ OTHERSRC=../src/other TESTSRC=../src/tests BINDIR=../bin TESTDIR=../tests +IMAGEFILE=image.fs -all: cmd others a.rim image.fs +all: cmd others a.rim image # Manually make all before make run -run: +run: clean all pdp7 unixv0.simh a.rim: @@ -27,12 +28,12 @@ coldboot: $(AS) -f rim -o a.rim $(SYSSRC)/sop.s $(SYSSRC)/s[1-9].s $(AS) -n -f list -o a.lst $(SYSSRC)/sop.s $(SYSSRC)/s[1-9].s -image.fs: +image: $(MKFS) --format simh proto - $(FSCK) image.fs - + $(FSCK) $(IMAGEFILE) + clean: - rm -f a.rim image.fs a.lst n.out + rm -f a.rim $(IMAGEFILE) a.lst n.out rm -rf $(BINDIR) rm -rr $(TESTDIR) From 514ff1057ab8850a983b13ce96f728d46f61bb06 Mon Sep 17 00:00:00 2001 From: Tom Everett Date: Sat, 19 Mar 2016 19:02:11 -0600 Subject: [PATCH 04/11] fixed typo, can now make run from root --- Makefile | 3 +++ build/Makefile | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1c2ba34..96837ec 100644 --- a/Makefile +++ b/Makefile @@ -4,5 +4,8 @@ all: buildit buildit: cd build && make all +run: + cd build && make run + clean: cd build && make clean diff --git a/build/Makefile b/build/Makefile index ad09828..452cecc 100644 --- a/build/Makefile +++ b/build/Makefile @@ -35,7 +35,7 @@ image: clean: rm -f a.rim $(IMAGEFILE) a.lst n.out rm -rf $(BINDIR) - rm -rr $(TESTDIR) + rm -rf $(TESTDIR) dirs: mkdir -p $(BINDIR) From c9d394642b965569db5aa1c99fa9afd1dbb6d86f Mon Sep 17 00:00:00 2001 From: Tom Everett Date: Sat, 19 Mar 2016 19:11:30 -0600 Subject: [PATCH 05/11] moved the location of bin and test --- build/Makefile | 4 ++-- build/proto | 30 +++++++++++++++--------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/build/Makefile b/build/Makefile index 452cecc..c82d462 100644 --- a/build/Makefile +++ b/build/Makefile @@ -10,8 +10,8 @@ SYSSRC=../src/sys CMDSRC=../src/cmd OTHERSRC=../src/other TESTSRC=../src/tests -BINDIR=../bin -TESTDIR=../tests +BINDIR=bin +TESTDIR=tests IMAGEFILE=image.fs all: cmd others a.rim image diff --git a/build/proto b/build/proto index a4f4bef..579838f 100644 --- a/build/proto +++ b/build/proto @@ -19,22 +19,22 @@ dd drwr- -1 4 ttyout irwr- -1 11 display irwr- -1 12 pptout irwr- -1 13 - as frwr- -1 ../bin/as - cat frwr- -1 ../bin/cat - chmod frwr- -1 ../bin/chmod - chown frwr- -1 ../bin/chown - chrm frwr- -1 ../bin/chrm - cp frwr- -1 ../bin/cp - date frwr- -1 ../bin/date - ds frwr- -1 ../bin/ds - ed frwr- -1 ../bin/ed - init frwr- -1 ../bin/init - ln frwr- -1 ../bin/ln - ls frwr- -1 ../bin/ls - mv frwr- -1 ../bin/mv + as frwr- -1 bin/as + cat frwr- -1 bin/cat + chmod frwr- -1 bin/chmod + chown frwr- -1 bin/chown + chrm frwr- -1 bin/chrm + cp frwr- -1 bin/cp + date frwr- -1 bin/date + ds frwr- -1 bin/ds + ed frwr- -1 bin/ed + init frwr- -1 bin/init + ln frwr- -1 bin/ln + ls frwr- -1 bin/ls + mv frwr- -1 bin/mv password frw-- -1 password - sh frwr- -1 ../bin/sh - stat frwr- -1 ../bin/stat + sh frwr- -1 bin/sh + stat frwr- -1 bin/stat $ ken drwr- 10 system l---- 3 From 9149bf9d478bd0ee564992740be276855a5b4c52 Mon Sep 17 00:00:00 2001 From: Tom Everett Date: Sat, 19 Mar 2016 19:19:58 -0600 Subject: [PATCH 06/11] fixed tests --- build/Makefile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/build/Makefile b/build/Makefile index c82d462..1c1c711 100644 --- a/build/Makefile +++ b/build/Makefile @@ -1,15 +1,19 @@ # Build the kernel, the utilities, the filesystem and run SimH +# tools AS=../tools/as7 ASARGS=--format=ptr MKFS=../tools/mkfs7 A7OUT=../tools/a7out FSCK=../tools/fsck7 +# source dirs SYSSRC=../src/sys CMDSRC=../src/cmd OTHERSRC=../src/other TESTSRC=../src/tests + +# targets BINDIR=bin TESTDIR=tests IMAGEFILE=image.fs @@ -39,7 +43,6 @@ clean: dirs: mkdir -p $(BINDIR) - mkdir -p $(TESTDIR) cmd: dirs # $(AS) $(ASARGS) -o $(BINDIR)/adm $(CMDSRC)/adm.s @@ -76,7 +79,7 @@ others: dirs $(AS) $(ASARGS) -o $(BINDIR)/mv $(OTHERSRC)/wktmv.s $(AS) $(ASARGS) -o $(BINDIR)/stat $(OTHERSRC)/wktstat.s -testit: +tests: mkdir -p $(TESTDIR) $(AS) $(ASARGS) -o $(TESTDIR)/decimal_out $(TESTSRC)/decimal_out.s $(AS) $(ASARGS) -o $(TESTDIR)/fork_test $(TESTSRC)/fork_test.s @@ -85,10 +88,10 @@ testit: $(AS) $(ASARGS) -o $(TESTDIR)/write_test $(TESTSRC)/write_test.s runtests: tests - cd $(TESTDIR) && $(A7OUT) decimal_out - cd $(TESTDIR) && $(A7OUT) fork_test - cd $(TESTDIR) && $(A7OUT) octal_test -# cd $(TESTDIR) && $(A7OUT) testmul -# cd $(TESTDIR) && $(A7OUT) write_test + $(A7OUT) $(TESTDIR)/decimal_out + $(A7OUT) $(TESTDIR)/fork_test + $(A7OUT) $(TESTDIR)/octal_test +# $(A7OUT) $(TESTDIR)/testmul +# $(A7OUT) $(TESTDIR)/write_test From d0970436dd8f5f2429cbf901c012a1a40c359a12 Mon Sep 17 00:00:00 2001 From: Tom Everett Date: Sat, 19 Mar 2016 19:21:37 -0600 Subject: [PATCH 07/11] removed duplicate build instruction --- build/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/build/Makefile b/build/Makefile index 1c1c711..9f2271f 100644 --- a/build/Makefile +++ b/build/Makefile @@ -75,7 +75,6 @@ others: dirs $(AS) $(ASARGS) -o $(BINDIR)/wktcp $(OTHERSRC)/wktcp.s $(AS) $(ASARGS) -o $(BINDIR)/date $(OTHERSRC)/wktdate.s $(AS) $(ASARGS) -o $(BINDIR)/ln $(OTHERSRC)/wktln.s - $(AS) $(ASARGS) -o $(BINDIR)/ls $(OTHERSRC)/wktls.s $(AS) $(ASARGS) -o $(BINDIR)/mv $(OTHERSRC)/wktmv.s $(AS) $(ASARGS) -o $(BINDIR)/stat $(OTHERSRC)/wktstat.s From f94cb568722da00ad0f4546ad474126d607c055b Mon Sep 17 00:00:00 2001 From: Tom Everett Date: Sat, 19 Mar 2016 19:24:24 -0600 Subject: [PATCH 08/11] parameterized pdp7 --- build/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/Makefile b/build/Makefile index 9f2271f..2898204 100644 --- a/build/Makefile +++ b/build/Makefile @@ -6,6 +6,7 @@ ASARGS=--format=ptr MKFS=../tools/mkfs7 A7OUT=../tools/a7out FSCK=../tools/fsck7 +PDP7=pdp7 # source dirs SYSSRC=../src/sys @@ -22,7 +23,7 @@ all: cmd others a.rim image # Manually make all before make run run: clean all - pdp7 unixv0.simh + $(PDP7) unixv0.simh a.rim: $(AS) -f rim -o a.rim $(SYSSRC)/sop.s $(SYSSRC)/s[1-8].s From 2b292a1ee3b2132e1081c64328ba2419e29b94d6 Mon Sep 17 00:00:00 2001 From: Tom Everett Date: Sat, 19 Mar 2016 21:12:22 -0600 Subject: [PATCH 09/11] updated readme --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 9dde802..3ed30fa 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,33 @@ to run pdp-unix from the pdp7-unix source tree Press `ctl-e` to break out the simulator into simh +A typical pdp7-unix on simh looks like: + +
+pdp7 unixv0.simh
+
+PDP-7 simulator V4.0-0 Beta        git commit id: e153b7f2
+CPU	idle disabled
+	8192W, EAE
+RB: buffering file in memory
+PDP-7 simulator configuration
+
+CPU	idle disabled
+CLK	60Hz, devno=00
+PTR	devno=01
+PTP	devno=02
+TTI	devno=03
+TTO	devno=04
+LPT	devno=65-66
+DRM	disabled
+RB	devno=71
+DT	devno=75-76, 8 units
+
+login: ken
+password: ken
+@ 
+
+ ## Source Tree From 41f266b4a9271c02d8fc70176eda76312b545556 Mon Sep 17 00:00:00 2001 From: Tom Everett Date: Sat, 19 Mar 2016 21:28:10 -0600 Subject: [PATCH 10/11] added trysys and maksys to the build --- build/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/Makefile b/build/Makefile index 2898204..2d2f8e8 100644 --- a/build/Makefile +++ b/build/Makefile @@ -68,6 +68,8 @@ cmd: dirs # $(AS) $(ASARGS) -o $(BINDIR)/dsw $(CMDSRC)/dsw.s $(AS) $(ASARGS) -o $(BINDIR)/ed $(CMDSRC)/ed1.s $(CMDSRC)/ed2.s $(AS) $(ASARGS) -o $(BINDIR)/init $(CMDSRC)/init.s + $(AS) $(ASARGS) -o $(BINDIR)/maksys $(CMDSRC)/maksys.s + $(AS) $(ASARGS) -o $(BINDIR)/trysys $(CMDSRC)/trysys.s others: dirs $(AS) $(ASARGS) -o $(BINDIR)/sh $(OTHERSRC)/pbsh.s From 86fcfad57a3a0a9eb0d91ed649d4e9280443091d Mon Sep 17 00:00:00 2001 From: Tom Everett Date: Sat, 19 Mar 2016 21:42:32 -0600 Subject: [PATCH 11/11] updated readme, and moved files that end up on the final fs into the /fs dir --- README.md | 38 ++++++++++++++++++++++++++++++++++++-- build/{ => fs}/hello | 0 build/{ => fs}/password | 0 build/proto | 4 ++-- 4 files changed, 38 insertions(+), 4 deletions(-) rename build/{ => fs}/hello (100%) rename build/{ => fs}/password (100%) diff --git a/README.md b/README.md index 3ed30fa..276464f 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,38 @@ DT devno=75-76, 8 units login: ken password: ken +@ ln dd ken . +@ ls +dd +system +hello +. +@ ls system +dd +ttyin +keyboard +pptin +ttyout +display +pptout +as +cat +chmod +chown +chrm +cp +date +ds +ed +init +ln +ls +mv +password +sh +stat +@ cat hello +Hello, world @ @@ -70,13 +102,15 @@ password: ken The code in the original scans are (c) Novell who own the rights to the Unix source code. Everything that didn't come from the scanned files is GPLv3. +* /build is an area to build the kernel & filesystem and run them +* /man holds man pages +* /misc holds miscellaneous notes and information * /scans holds the unmodified OCR versions of the scanned files * /src/cmd holds the modified source code of the user-mode programs * /src/sys holds the modified source code of the kernel * /src/other holds PDP-7 source code which did not come from the scanned files * /tools holds the source for the tools written to assist the project -* /build is an area to build the kernel & filesystem and run them -* /misc holds miscellaneous notes and information + ## Travis Status diff --git a/build/hello b/build/fs/hello similarity index 100% rename from build/hello rename to build/fs/hello diff --git a/build/password b/build/fs/password similarity index 100% rename from build/password rename to build/fs/password diff --git a/build/proto b/build/proto index 579838f..2d90dbc 100644 --- a/build/proto +++ b/build/proto @@ -32,13 +32,13 @@ dd drwr- -1 4 ln frwr- -1 bin/ln ls frwr- -1 bin/ls mv frwr- -1 bin/mv - password frw-- -1 password + password frw-- -1 fs/password sh frwr- -1 bin/sh stat frwr- -1 bin/stat $ ken drwr- 10 system l---- 3 - hello frwr- 10 hello + hello frwr- 10 fs/hello $ dmr drwr- 12 system l---- 3