1
0
mirror of https://github.com/DoctorWkt/pdp7-unix.git synced 2026-01-11 23:53:23 +00:00

984 Commits

Author SHA1 Message Date
Tom Everett
555eb30fc7
Bug fixes (#236)
* '#' is not a valid comment

* bug fix

* less noisy fix
2023-09-08 17:30:58 -04:00
Warren
01c6bc87f6
Merge pull request #234 from sebras/fix/adm
Change ald to assemble successfully and include it in build.
2023-09-08 18:07:13 +10:00
Mohamed Akram
61951f20b1
Annotate st (#235)
* Annotate st

* Fix consistency

* Add missing comments
2023-01-27 10:52:28 -05:00
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
Sebastian Rasmussen
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
phil
86f6b7f3d6 src/cmd/t8.s (TMG): add opcode comments extraced from sys/sop.s 2021-08-24 15:37:00 -04:00
phil
580d181f6e Add misc/README.md file 2021-08-21 17:30:43 -04:00
Phil Budne
b7733dafea
t[1-7].s: annotate TMG sources (all start with one or more tabs and ") (#230)
start of TMG resurrection attempt
2021-08-21 12:46:06 -04:00
Phil Budne
8d6ea663ff
Merge pull request #229 from vtamara/sup-adJ
Support for OpenBSD and adJ. Closes #228
2020-11-03 12:02:41 -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
Phil Budne
526d54c4eb
Merge pull request #227 from sebras/typos/chrtbl.s
Fix typos in character table.
2020-10-24 19:44:44 -04:00
Sebastian Rasmussen
a17a12cc45 Fix typos in character table. 2020-10-25 07:35:37 +08:00
Phil Budne
008cbc2938
Merge pull request #226 from philbudne/as7-octal
as7: accept (decimal) digits in octal constants, like as.s does!
2020-10-06 11:55:38 -04:00
phil
a08d97c8d8 as7: accept (decimal) digits in octal constants, like as.s does! 2020-10-05 19:19:06 -04:00
Phil Budne
6e0f90c5a9
Merge pull request #225 from sebras/add-space-travel-to-build
Space Travel now runs without crashing after reordering input files.
2020-10-05 10:28:10 -04: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
Tom Everett
8f69bc3889
Merge pull request #223 from teverett/master
osx works, windows does not
2020-06-11 20:22:32 -06:00
Tom Everett
e68adfd570 remove windows for now 2020-06-11 20:00:52 -06:00
Tom Everett
7b1c30bfa1 DateTime on Windows 2020-06-11 19:57:17 -06:00
Tom Everett
35cabdbe65
Merge pull request #222 from teverett/master
enable CI build on os x
2020-06-11 19:56:57 -06:00
Tom Everett
d03d451cb8 oops 2020-06-11 19:33:50 -06:00
Tom Everett
47bd969969 cpan 2020-06-11 19:32:40 -06:00
Tom Everett
29e519ab5a libdt 2020-06-11 19:25:54 -06:00
Tom Everett
3495b39083 split build 2020-06-11 19:21:23 -06:00
Tom Everett
304322b7a9 macos 2020-06-11 19:19:32 -06:00
Tom Everett
fcb8a18e14
Merge pull request #221 from teverett/master
fix CI badge
2020-06-11 19:12:15 -06:00
Tom Everett
5be01e85b1 fix CI badge 2020-06-11 19:10:06 -06:00
Tom Everett
e09884474b
Merge pull request #218 from teverett/master
switch from travis-ci to github workflows
2020-06-11 19:07:25 -06:00
Tom Everett
6bedb828e3 linux only 2020-06-06 15:57:38 -06:00
Tom Everett
da91571a25 switch to github actions 2020-06-06 15:55:52 -06:00
Tom Everett
f019e98bee
Merge pull request #207 from sebras/typos/ds.s
Fix typos in ds.s after manual review.
2020-03-15 08:48:36 -06:00
Tom Everett
8af1d84209
Merge pull request #184 from sebras/typos/s3.s
Fix typos in s3.s after manual review.
2020-03-15 08:48:15 -06:00
Sebastian Rasmussen
c6bdbfebf3 Fix typos in s3.s after manual review. 2020-03-15 15:30:06 +08:00
Sebastian Rasmussen
8e3ebc67d9 Fix typos in ds.s after manual review. 2020-03-15 15:00:23 +08:00
Tom Everett
b96f3ef58d
Merge pull request #217 from teverett/master
its not 2010…
2020-03-14 15:40:05 -06:00
Tom Everett
5da06594e1 its not 2010… 2020-03-14 15:39:34 -06:00
Tom Everett
bab5a0cedf
Merge pull request #198 from sebras/typos/sop.s
Fix typos in sop.s after manual review.
2020-03-14 15:16:54 -06:00
Tom Everett
345c6faef7
Merge pull request #196 from sebras/typos/un.s
Fix typos in un.s after manual review.
2020-03-14 15:12:23 -06:00
Tom Everett
6296b304f9
Merge pull request #190 from sebras/typos/adm.s
Fix typos in adm.s after manual review.
2020-03-14 15:10:58 -06:00
Tom Everett
ef0ba90682
Merge pull request #213 from sebras/typos/ttt2.s
Fix typos in ttt2.s after manual review.
2020-03-14 15:00:49 -06:00
Tom Everett
54369be860
Merge pull request #194 from sebras/pagecomments/s6.s
Fix typo in page comment in st6.s.
2020-03-14 14:56:36 -06:00
Tom Everett
fcd72be89d
Merge pull request #205 from sebras/typos/bc.s
Fix typo in bc.s after manual review.
2020-03-14 14:56:14 -06:00
Tom Everett
b6db6c9517
Merge pull request #203 from sebras/typos/init.s
Fix typos in init.s after manual review.
2020-03-14 14:56:00 -06:00
Tom Everett
c0d69e1a13
Merge pull request #182 from xorhash/master
Novell -> Micro Focus
2020-03-14 14:55:47 -06:00
Tom Everett
6b2612f50d
Merge pull request #191 from sebras/pagecomments/adm.s
Add page comments to adm.s.
2020-03-14 14:55:33 -06:00
Tom Everett
c953a887f1
Merge pull request #199 from sebras/pagecomments/cat.s
Add page comments to cat.s
2020-03-14 14:55:22 -06:00
Tom Everett
f2797117ff
Merge pull request #197 from sebras/pagecomments/bi.s
Add page comments to bi.s.
2020-03-14 14:55:11 -06:00
Tom Everett
01a65e05fa
Merge pull request #200 from sebras/pagecomments/bl.s
Add page comments to bl.s.
2020-03-14 14:54:58 -06:00