Commit Graph
116 Commits
Author SHA1 Message Date
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
Vladimir Támara Patiño 05ecb325bc Support for OpenBSD and adJ 2020-11-03 07:23:16 -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 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 094766a167 build/Makefile: turn of "implicit" warnings for b.c compilation 2019-10-28 23:14:16 -04:00
phil 4c0eee2fbf fix g2tty comments in unixv0.simh files 2019-10-28 23:14:16 -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 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
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 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 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 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 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 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
Phil Budne 2982aaf18f uncomment SIMH config lines for GRAPHICS-2 simulation 2016-03-29 01:59:04 -04:00
Phil Budne 7323e802f0 update with ed progress 2016-03-25 19:18:38 -04:00
Tom Everett f20412f3b4 tweaking os.mk 2016-03-25 16:52:18 -06: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 81166b31db Merge branch 'master' of https://github.com/DoctorWkt/pdp7-unix 2016-03-25 10:35:00 -06:00
Tom Everett 1783f1789a update b.c to compile 2016-03-25 10:34:25 -06:00
Phil Budne ee918f2da1 add as.s to ~dmr 2016-03-25 11:05:28 -04:00
Phil Budne 996fd4ddda updated: maksys & trysys now build/run 2016-03-25 11:05:28 -04:00
Phil Budne 96dd9d6c06 sys.rc: link to "user" ops.s; needed for maksys & trysys! 2016-03-25 11:05:28 -04:00
Phil Budne dd9a9d0f73 maksys and trysys need system call defns (not in sop.s)!! 2016-03-25 11:05:28 -04:00