1
0
mirror of https://github.com/DoctorWkt/pdp7-unix.git synced 2026-03-03 10:23:08 +00:00

66 Commits

Author SHA1 Message Date
Sebastian Rasmussen
01db74cb56 Change ald to assemble successfully and include it in build.
While the scan of src/cmd/als.s clearly refers to ferror,
that routine is entirely missing from the scans of ald.

There are two identical ferror routines in src/cmd/adm.s and
src/cmd/apr.s printing the file name of a file that cannot be
openend.

ald calls ferror when unable to create a file. For ald to have
a similar ferror routine when creation fails appears sensible.

Therefore a similar routine is added to src/cmd/ald.s with
modifications to the variable containing the file name and
the label ferror jumps back to once done.
2022-02-04 22:11:25 +01:00
Sebastian Rasmussen
b46b160a43 Assemble psych and include it in the build. (#232)
Psych was added to the build system. It requires fops.s
for maths. Two notable things need to be fixed to make it
assemble:

 * d1 must be defined, presumably to a 1 following the
   patterns of other decimal numbers.

 * variable xx must be renamed so it doesn't clash with
   the xx instruction mnemonic used by the perl cross assembler.
2022-02-04 14:04:33 -05:00
Vladimir Támara Patiño
ef6da2a0e0 Allowing to override PDP7 variable with environment variable 2020-11-03 07:23:11 -05:00
Sebastian Rasmussen
5447173fec Space Travel now runs without crashing after reordering input files.
The naive order of the assembly files given to the assembler was to
put the st?.s files first followed by fop.s at the end. This caused
Space Travel to crash, why that happend is explained below.

st1.s through st5.s contain code, while st6. and st7.s contain
constants and data storage respectively. The order of the given
assembler files meant that the code st?.s ended up at 010000 onwards,
while the code in fop.s ended up after the data storage defined in
st7.s. In particular the function fmp ended up immediately after dspl.

At the end of st7.s there is a display list, dspl. At runtime this
list is pointed to by the clistp variable stored at the auto-indexing
memory register at address 017. Auto-indexing means that the pointer
will be incremented after use. However the display list dspl does not
reserve memory for the entire list, instead it assumes that the memory
immediately after dpsl is unused. This conflicts with storing fmp from
fop.s immediately after st7.s!

Despite this conflict the first few frames of space travel could be
rendered because clistp was never referenced. By the time it was
referenced it changed the code in fmp to invalid code. At a later
stage when fmp was called the program crashed.

The solution I chose is to reorder the files at the command-line given
to the assembler; specifically I opted to put fop.s after all the code
in st1.s though st4.s.

This means that Space Travel now runs without crashing!
2020-10-05 17:13:47 +08:00
phil
46c761bf5d Build Graphic II character table, include in boot track
simplify boot paper tape (do one xfer of 4K, instead of 3K+1K)
Combine cmd/scope.cas cmd/cas.cas into sys/cas.in
Add src/other/chrtbl.s
write chrtbl.out in "ptr" format
2020-01-15 18:01:46 -05:00
phil
1a35c9146d switch to original commands, alphabetize proto and Makefile 2019-10-29 00:00:55 -04:00
phil
094766a167 build/Makefile: turn of "implicit" warnings for b.c compilation 2019-10-28 23:14:16 -04:00
Tom Everett
72f187357b unrefactored 2019-10-27 19:24:21 -04:00
Tom Everett
bf75cb86c7 added adm to image 2019-10-25 15:07:12 -04:00
Tom Everett
205d6bf90d added un to build 2019-10-25 15:02:23 -04:00
Tom Everett
0923b49425 added nsh,nstat, nls to image 2019-10-20 16:34:48 -06:00
Tom Everett
ce0d50940f various updates to makefile
remove reference to p0.s
ls, sh, stat, bc from scans conflict with previous versions.  renamed them to nls, nbc, nstat, nsh
2019-10-20 14:08:06 -06:00
Tom Everett
2fb917e4b4 added moo.s to build and image 2019-10-19 17:08:17 -06:00
Tom Everett
025f276c56 added salv to image 2019-10-19 16:35:08 -06:00
Tom Everett
ee9343d1bc fixed apr 2019-10-19 16:19:20 -06:00
Tom Everett
76deea0152 added p to build and image 2019-10-19 12:15:28 -06:00
Tom Everett
50598b621e added roff.s to build and image 2019-10-19 10:47:50 -06:00
Tom Everett
609524adef added ls to build 2019-10-19 10:35:14 -06:00
Tom Everett
5dd74f5413 added nm.s to build and image 2019-10-19 10:02:43 -06:00
Tom Everett
34644492a7 back to one giant directory 2019-10-19 09:04:01 -06:00
Tom Everett
d6cef57b84 include pd, rn, rm into build and image 2019-10-18 21:06:44 -06:00
Tom Everett
b087cc0a61 add cas to filesystem 2019-10-18 20:07:57 -06:00
Tom Everett
98d74b6002 minor update to readme 2019-10-18 18:49:21 -06:00
Tom Everett
6d7398b2f6 fixed apr.s
and added to build
2019-10-18 18:16:19 -06:00
Tom Everett
0e9e447ada added sh.s to build
fixed dsw.s typo
2019-10-18 18:13:08 -06:00
Tom Everett
5323c3791b further refactoring
plus compile instructions for the existing commands that need fixes
2019-10-18 17:30:56 -06:00
Tom Everett
ff1fde3e9f added stat and tm to build 2019-10-18 17:02:41 -06:00
Tom Everett
9eb2724cab further refactoring 2019-10-18 16:44:58 -06:00
Tom Everett
ac1c46e29b refactoring source tree
refactored sources into directory per binary in order to prepare for moving more complex, multi-file, programs onto source tree
2019-10-18 16:39:18 -06:00
Phil Budne
7df9a14980 Add db binary, source to filesystem 2016-03-29 11:05:30 -04:00
Tom Everett
b85cf3e16d externalized os.mk 2016-03-25 13:24:07 -06:00
Tom Everett
f0674b42e8 oops 2016-03-25 11:33:34 -06:00
Tom Everett
c791b29a5b detect OS and chose appropriate c compiler
gcc for linux
clang for OS X and FreeBSD
2016-03-25 10:52:06 -06:00
Tom Everett
1783f1789a update b.c to compile 2016-03-25 10:34:25 -06:00
Phil Budne
853318f48d confusion reduction: rename bootstrap file to boot.rim, kernel to a.out 2016-03-24 12:23:45 -04:00
Warren Toomey
b234e2ad81 Also fixed the alt system to use Phil's bootstrap code. 2016-03-24 17:42:06 +10:00
Warren Toomey
8d69dd6d13 Changed the build so that we boot via Phil's bootstrap code. 2016-03-24 17:38:27 +10:00
Warren Toomey
a676ccee69 Duplicate rule in the Makefile, fixed. 2016-03-24 09:20:04 +10:00
Phil Budne
aa234d7de4 Add phil's simple "ls": "lsd dir" lists a directory in dd, "lsl dir": long list
(lsl should be a hard link to lsd!)
2016-03-23 15:56:46 -04:00
Warren Toomey
945fa20bae 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.
2016-03-23 22:45:53 +10:00
Warren Toomey
42c7a240ed I wrote a version of od. 2016-03-23 11:14:01 +10:00
Warren Toomey
8dafe1706a Merge branch 'master' of https://github.com/DoctorWkt/pdp7-unix 2016-03-23 09:58:36 +10:00
Warren Toomey
3a52b3d74b I've got mkdir working in the alt system. I had to allow the dir bit
in the permissions mask in creat, through.
2016-03-23 09:57:20 +10:00
Tom Everett
e3c160edd7 makefile changes, readme changes 2016-03-22 16:33:44 -06:00
Tom Everett
a36b65131f updated binaries 2016-03-22 16:07:06 -06:00
Phil Budne
f566bec719 Makefile, proto: add dskres & dsksav 2016-03-21 11:00:19 -04:00
Warren Toomey
b001734e8f I've moved a copy of my ls.s into alt, so there are no files left with 2016-03-21 16:37:26 +10:00
Warren Toomey
94fd5d49e0 I've restructured the alternative version of PDP-7 Unix so that the
source code is now in src/alt. All the files in src/sys and src/cmd
are only annotated versions of the files in scans/.
The build/Makefile has been updated so that it can build the
original PDP-7 Unix or the alternative version.
Phil has fixed the Graphics-2 code, so that there is no need to
have any #ifdef code in the original kernel.
2016-03-21 16:01:36 +10:00
Warren Toomey
f63ad33d10 This is the beginnings of a alternative version of the PDP-7 Unix
system which corresponds to a later development point, around mid-1971,
where the system had lost the "dd" directory and gained . and ..
entries. This is close to the system as described in
http://www.tuhs.org/Archive/PDP-11/Distributions/research/McIlroy_v0/UnixEditionZero.txt
except there are no pathnames.

To use this version: cd build; make alt; make altrun
2016-03-21 14:28:50 +10:00
Warren Toomey
098c8a9e28 I've split the cmd and others Makefile rules out to individual utility rules,
so that we don't keep building binaries for sources that have not changed.
2016-03-21 06:51:00 +10:00