43 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 RasmussenandGitHub 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
Sebastian RasmussenandGitHub dd6b61333f Add standings file to get moo running. (#233)
Recently Wordle has piqued the interest of many (like me):
https://www.powerlanguage.co.uk/wordle/

A recent video by Tech Tangents links Wordle to Master Mind
and also mentions it being based on Bulls and Cows or Moo:
https://www.youtube.com/watch?v=rLUmER9dn9A&t=141s
https://en.wikipedia.org/wiki/Bulls_and_Cows#The_numerical_version

Judging by the assembler listing I thought moo.s might
be an implementation of the game for PDP-7 UNIX. I
debugged the game deduced why it exits early.

The game statistics are saved in the file moostat.
Prior to this commit there was no such file which
caused moo to exit immediately at start. Now, once
the file exists, the game can run successfully.

This is how to play the game:

1. after having logged in as ken, enter "moo" ENTER at prompt
2. moo asks "wru?" which means "who are you?"
3. answer "ken" ENTER
4. moo says "name not found; enter?"
5. answer "y" to participate in the game
6. moo says "ready?"
7a. answer "s" to see the current standings between participants listing name, number of games, average guesses, average time
7b. answer "a" to see your average, showing number of games, average guesses and average time
7c. answer "r" to reset the game from step 2 above
7d. answer "q" to quit the game if you wish
8. answer "y" to begin the game
9. moo generates a secret number that you must guess
10. enter a four digit number like "2874" and press ENTER
11. if your guess is correct, moo says "g=<number of guesses> t=<time in some unit>", goto step 6
11. if your guess is not correct, moo says "bc=" followed by two numbers
12. 1st digit is the number of correct digits in the correct place in your guess
13. 2nd digit is the number of correct digits in the wrong place in your guess
14. goto 10
2022-02-03 18:53:00 -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 364736a4a7 proto: remove redundant adm entry 2019-10-30 02:03:17 -04:00
phil 1a35c9146d switch to original commands, alphabetize proto and Makefile 2019-10-29 00:00:55 -04:00
phil 4ffabd8bdf add tmg to src/cmd and image
add doug user to image, put tmg sources there
fix an as7 bug found by tmg
2019-10-28 23:14:16 -04:00
phil ab38b0e263 use explicit octal uid values in proto
to match password file, list output
make fsck output octal too
2019-10-28 23:14:16 -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
phil 96af8f1c17 two mkfs7 changes (.. and link to inum -1), make hard link for list program
mkfs: if neither --dotdot or --dot options given, create .. link to current dir
      accept -1 for inum in add_direntry to mean "use previous i-num" for links

proto: use inum -1 to make "list" a link to "nls"
2019-10-22 21:22:21 -04:00
Tom Everett 0923b49425 added nsh,nstat, nls to image 2019-10-20 16:34:48 -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 76deea0152 added p to build and image 2019-10-19 12:15:28 -06:00
Tom Everett 68dd3db0bd formatting 2019-10-19 11:02:37 -06:00
Tom Everett 50598b621e added roff.s to build and image 2019-10-19 10:47:50 -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 69b0c8c02c added tm, dsw, apr onto file system
login: ken
password: ken
@ tm
00:00:05.7
@ dsw
(0HoHk
@ apr
usage; apr files
dial x5380 on the dataphone
@
Simulation stopped, PC: 01060 (LAC I 10)
sim> quit
Goodbye
2019-10-18 18:32:54 -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
Phil Budne ee918f2da1 add as.s to ~dmr 2016-03-25 11:05:28 -04:00
Phil Budne 10f0fa9da9 load sys sources into ken directory, along with "sys.rc" file
(run with "sh <sys.rc" to build system files)
errors building maksys and trysys
2016-03-25 01:03:42 -04: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 99a33c8dde Add check to the filesystem. 2016-03-23 15:22:10 +10:00
Warren Toomey 7fcf1d230c I added a way for a file to be given a specific i-number, needed for i-num 1. 2016-03-23 11:25:22 +10:00
Warren Toomey 42c7a240ed I wrote a version of od. 2016-03-23 11:14:01 +10:00
Phil Budne f566bec719 Makefile, proto: add dskres & dsksav 2016-03-21 11:00:19 -04:00
Tom Everett 86fcfad57a updated readme, and moved files that end up on the final fs into the /fs dir 2016-03-19 21:42:32 -06:00
Tom Everett c9d394642b moved the location of bin and test 2016-03-19 19:11:30 -06:00
Warren Toomey 0eb720f3ab It's time we had ed as a binary, so we have another goal to reach: making ed work. 2016-03-19 06:30:31 +10:00
Warren Toomey 3c3f946794 Added hello to the proto file. 2016-03-16 11:38:09 +10:00
Warren Toomey 9f536032b0 Fixed stat so it works. 2016-03-16 09:42:44 +10:00
Warren Toomey 00c2de0292 I bit the bullet and implemented "." in the filesystem. I've changed the proto
file to put the binaries in system. I added a few more checks to fsck, and I fixed
a few bugs in src/other/wktls.s.
2016-03-16 05:36:22 +10:00
Warren Toomey 9da0484a39 I've got init past the link, but it then dies on the open("sh") immediately
after that. Yes, dd has to be i-num 4. I've modified mkfs7 and the proto
file to allow this to occur. I've also make link counts negative.
2016-03-14 19:49:37 +10:00
Phil Budne 44e85f3fe1 proto: update input device numbers (back to original values) 2016-03-11 16:32:32 -05:00
Warren Toomey f3dad7916b Clean up comments. 2016-03-11 22:31:40 +10:00
Phil Budne c400a020b0 proto: move special device (inode) numbers up by one 2016-03-10 19:17:13 -05:00
Warren Toomey 947d44a681 I've used Phil's instructions to set up a build area with a Makefile.
You can run make build from the top to build things.
2016-03-10 17:02:46 +10:00