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

* bug fix

* less noisy fix
2023-09-08 17:30:58 -04:00
WarrenandGitHub 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 AkramandGitHub 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 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
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 BudneandGitHub 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 BudneandGitHub 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 BudneandGitHub 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 BudneandGitHub 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 BudneandGitHub 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 EverettandGitHub 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 EverettandGitHub 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 EverettandGitHub 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 EverettandGitHub 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 EverettandGitHub 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 EverettandGitHub 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 EverettandGitHub 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 EverettandGitHub 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 EverettandGitHub 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 EverettandGitHub 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 EverettandGitHub 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 EverettandGitHub 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 EverettandGitHub 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 EverettandGitHub 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 EverettandGitHub c0d69e1a13 Merge pull request #182 from xorhash/master
Novell -> Micro Focus
2020-03-14 14:55:47 -06:00
Tom EverettandGitHub 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 EverettandGitHub 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 EverettandGitHub 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 EverettandGitHub 01a65e05fa Merge pull request #200 from sebras/pagecomments/bl.s
Add page comments to bl.s.
2020-03-14 14:54:58 -06:00
Tom EverettandGitHub 49cc91e753 Merge pull request #201 from sebras/pagecomments/dsk.s
Add page comments to dsksav.s, dsksav.s and dskio.s.
2020-03-14 14:54:47 -06:00
Tom EverettandGitHub 894beec3db Merge pull request #202 from sebras/pagecomments/init.s
Add page comments to init.s.
2020-03-14 14:54:33 -06:00
Tom EverettandGitHub 31de42af44 Merge pull request #206 from sebras/pagecomments/ds.s
Add page comments to ds.s.
2020-03-14 14:54:21 -06:00
Phil BudneandGitHub a1163ac948 Merge pull request #216 from teverett/master
added two .out files to ignores
2020-03-14 16:50:00 -04:00
Tom Everett cb65002969 updated readme 2020-03-14 14:40:57 -06:00
Tom EverettandGitHub 596c038b5a Merge pull request #204 from sebras/pagecomments/bc.s
Add page comments to bc.s.
2020-03-14 14:19:54 -06:00
Tom Everett 08f78a320b added two .out files to ignores 2020-03-14 14:13:14 -06:00
Phil BudneandGitHub f790f91d10 Merge pull request #215 from teverett/master
updated readme to reflect current sources after second batch of listings entered
2020-03-13 23:53:23 -04:00
Tom Everett c0ca5d5691 updated readme 2020-03-13 21:00:23 -06:00
Sebastian Rasmussen 41e83c21b6 Add page comments to bc.s. 2020-02-10 03:51:07 +08:00
Sebastian Rasmussen 5350984840 Add page comments to ds.s. 2020-02-10 03:48:00 +08:00
Sebastian Rasmussen 99ac073334 Fix typo in bc.s after manual review. 2020-02-10 03:47:41 +08:00
Sebastian Rasmussen 0185f36563 Add page comments to init.s. 2020-02-10 03:47:06 +08:00
Sebastian Rasmussen ea3cb95973 Fix typos in init.s after manual review. 2020-02-10 03:46:49 +08:00
Sebastian Rasmussen 914c466d4a Add page comments to dsksav.s, dsksav.s and dskio.s. 2020-02-10 03:46:29 +08:00
Sebastian Rasmussen cf19c53068 Add page comments to bl.s. 2020-02-10 03:46:14 +08:00
Sebastian Rasmussen 25fc9eb131 Add page comments to cat.s 2020-02-10 03:45:34 +08:00
Sebastian Rasmussen 79d8a411c8 Add page comments to bi.s. 2020-02-10 03:45:26 +08:00
Sebastian Rasmussen 4a8a0a9215 Fix typos in sop.s after manual review. 2020-02-10 03:44:51 +08:00
Sebastian Rasmussen 8d839f2d0f Fix typos in un.s after manual review. 2020-02-10 03:44:28 +08:00
Sebastian Rasmussen 164d0dbf33 Fix typos in adm.s after manual review. 2020-02-10 03:43:32 +08:00
Sebastian Rasmussen e2ead8e5df Fix typo in page comment in s6.s. 2020-02-10 03:42:55 +08:00
Sebastian Rasmussen 5ba0d02037 Add page comments to adm.s. 2020-02-10 03:42:27 +08:00
Sebastian Rasmussen 07afd0503e Fix typos in ttt2.s after manual review. 2020-02-10 03:40:11 +08:00
Phil BudneandGitHub e8c99b737a Merge pull request #188 from sebras/typos/p1.s
Fix typos in p1.s after manual review.
2020-01-22 13:52:37 -05:00
Phil BudneandGitHub 4ec48198aa Merge pull request #189 from sebras/typos/fop.s
Fix typos in fop.s after manual review.
2020-01-22 13:48:54 -05:00
Phil BudneandGitHub 1241caac7f Merge pull request #208 from sebras/typos/sysmap
Fix typos in sysmap after manual review.
2020-01-22 13:39:17 -05:00
Phil BudneandGitHub 9947fbf42b Merge pull request #195 from sebras/typos/s8.s
u.rg is "registers"
2020-01-22 13:35:55 -05:00
Tom EverettandGitHub 806b797bf0 Merge pull request #211 from philbudne/chartable
Build Graphic II character table, include in boot track
2020-01-15 18:11:49 -05: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
Tom EverettandGitHub da98e7e3f9 Merge pull request #210 from teverett/master
install perl module libdatetime-perl
2020-01-15 17:15:34 -05:00
Tom Everett 3cde104b15 install perl module libdatetime-perl
needed for PR #187
2020-01-15 17:13:31 -05:00
Phil BudneandGitHub 687a30ba8e Merge pull request #193 from sebras/typos/maksys.s
Fix typos in maksys.s after manual review
2020-01-08 12:55:00 -05:00
Phil BudneandGitHub 1a4b7ca07f Merge pull request #192 from sebras/pagecomments/db.s
Add page comments to db.s.
2020-01-08 12:53:11 -05:00
Sebastian Rasmussen b90a05a712 Fix typos in sysmap after manual review. 2020-01-08 16:11:11 +08:00
Sebastian Rasmussen dad9b873e2 Make whitespace consistent in sysmap. 2020-01-08 16:11:11 +08:00
Sebastian Rasmussen 42c521fdbe Required changes to make it compile again. 2020-01-08 15:59:48 +08:00
Sebastian Rasmussen 940d8e21e2 Fix typos in s8.s after manual review. 2020-01-08 15:59:13 +08:00
Sebastian Rasmussen 3e028c40a0 Fix typos in maksys.s after manual review 2020-01-08 15:53:35 +08:00
Sebastian Rasmussen eedb90386f Add page comments to db.s. 2020-01-08 15:51:41 +08:00
Sebastian Rasmussen a2331f0e21 Fix typos in fop.s after manual review. 2020-01-06 16:24:03 +08:00
Sebastian Rasmussen 7e474b0cf0 Fix typos in p1.s after manual review. 2020-01-06 14:50:45 +08:00
Phil BudneandGitHub 618af06998 Merge pull request #186 from sebras/cas_syntax
Improve description of cas input/output formats.
2020-01-05 21:41:43 -05:00
Sebastian Rasmussen 9f71939934 Improve description of cas input/output formats.
Correct details about input/output formats and provide more
thorough description of character example.
2019-12-30 01:56:35 +08:00
Phil BudneandGitHub 12e4ed0eeb Merge pull request #185 from sebras/typos/s7.s
Fix typos in s7.s after manual review.
Matches differences found with ./tools/compare scans/s7.s src/sys/s7.s -PB
2019-11-16 11:49:47 -05:00
Phil BudneandGitHub 1151d186e0 Merge pull request #183 from sebras/typos/s2.s
Fixed typos in s2.s after manual review.
Confirmed changes match the output of ./tools/compare scans/s2.s src/sys/s2.s -PB
2019-11-16 11:36:51 -05:00
Sebastian Rasmussen bcd9dac2ed Fixed typos in s2.s after manual review. 2019-11-16 15:56:53 +01:00
xorhash 7e597b771e Novell -> Micro Focus
Novell was acquired by Attachmate in 2011;
Attachmate was acquired by Micro Focus in 2014.

This makes Micro Focus the current copyright holder.
2019-11-16 13:22:16 +01:00
Sebastian Rasmussen 42bc34866d Fix typos in s7.s after manual review. 2019-11-14 14:25:38 +01:00
Phil BudneandGitHub b0e0d68b40 Merge pull request #181 from sebras/notes/psych.s
Add handwritten comments to psych.s.
2019-11-12 23:26:42 -05:00
Sebastian Rasmussen 56a75c0362 Add handwritten comments to psych.s. 2019-11-13 04:09:07 +01:00
Phil BudneandGitHub b5f30bf098 Merge pull request #180 from sebras/notes/fop.s
Add handwritten notes to fop.s.
2019-11-12 20:45:25 -05:00
Phil BudneandGitHub dbe103fd75 Merge pull request #178 from sebras/notes/st7.s
Add handwritten notes to st7.s.
2019-11-12 20:44:24 -05:00
Phil BudneandGitHub b4c3f6f2b3 Merge pull request #176 from sebras/notes/st4.s
Add handwritten notes to st4.s.
2019-11-12 20:43:56 -05:00
Phil BudneandGitHub 80e75e71f7 Merge pull request #174 from sebras/notes/st3.s
Add handwritten notes to st3.s.
2019-11-12 20:43:16 -05:00
Phil BudneandGitHub f5130c914e Merge pull request #173 from sebras/notes/st1.s
Add handwritten notes to st1.s.
2019-11-12 20:42:32 -05:00
Sebastian Rasmussen da23c633e7 Add handwritten notes to fop.s. 2019-11-12 22:08:59 +01:00
Sebastian Rasmussen 65a1f1ee69 Add handwritten notes to st7.s. 2019-11-12 22:04:44 +01:00
Sebastian Rasmussen df31ca4816 Add handwritten notes to st4.s. 2019-11-12 22:01:15 +01:00
Sebastian Rasmussen d4e4101a49 Add handwritten notes to st3.s. 2019-11-12 21:58:48 +01:00
Sebastian Rasmussen c45fba954f Add handwritten notes to st1.s. 2019-11-12 21:55:34 +01:00
Phil BudneandGitHub 312f8a507f Merge pull request #179 from sebras/typos/fop.s
Fix spacing in fop.s after manual review.
2019-11-11 20:07:46 -05:00
Sebastian Rasmussen 141efe0218 Fix typos in fop.s after manual review. 2019-11-03 03:23:44 +01:00
Phil BudneandGitHub 34a1554780 Merge pull request #171 from sebras/typos/dmabs.s
Add page comments and fix typos in dmabs.s
2019-11-01 23:54:49 -04:00
Phil BudneandGitHub 32d91d1e7d Merge pull request #172 from sebras/typos/check.s
Add page comments and fix typo in check.s
2019-11-01 23:52:05 -04:00
Phil BudneandGitHub 4090183dc5 Merge pull request #169 from sebras/typos/ed1.s
Fix typos in ed1.s
2019-11-01 23:48:49 -04:00
Sebastian Rasmussen b909a75810 Fix typos in ed1.s after manual review. 2019-11-02 02:14:14 +01:00
Phil BudneandGitHub bc2c181798 Merge pull request #170 from sebras/typos/ed2.s
Fix typos in ed2.s
2019-11-01 14:16:31 -04:00
Sebastian Rasmussen e37757e00c Fix typo in check.s after manual review. 2019-11-01 03:19:23 +01:00
Sebastian Rasmussen ccc4e3d2da Add page comments to check.s. 2019-11-01 03:19:19 +01:00
Sebastian Rasmussen 8876fcf79b Fix typo in dmabs.s after manual review. 2019-11-01 03:17:50 +01:00
Sebastian Rasmussen 6e410e9d9f Add page comments to dmabs.s 2019-11-01 03:17:44 +01:00
Sebastian Rasmussen 4df9bc464a Fix typos in ed2.s after manual review. 2019-11-01 02:15:36 +01:00
Phil BudneandGitHub 73dd17d3c6 Merge pull request #164 from sebras/describe/dskres.s
Attempt to describe purpose of source code in dskres.s
2019-10-31 16:11:20 -04:00
Phil BudneandGitHub fdb0fd8c68 Merge pull request #165 from sebras/describe/dsksav.s
Attempt to describe purpose of source code in dsksav.s
2019-10-31 16:11:15 -04:00
Phil BudneandGitHub 226f0e3300 Merge pull request #163 from sebras/describe/dskio.s
Attempt to describe purpose of source code in dskio.s
2019-10-31 16:04:05 -04:00
Sebastian Rasmussen 79cdb51378 Attempt to describe purpose of source code in dskres.s 2019-10-31 15:16:12 +01:00
Sebastian Rasmussen 55383ce528 Attempt to describe purpose of source code in dsksav.s 2019-10-31 15:14:31 +01:00
Sebastian Rasmussen f576bec7f9 Attempt to describe purpose of source code in dskio.s 2019-10-31 15:00:20 +01:00
phil 716480cb8a rn.1 tweak man page 2019-10-30 18:21:45 -04:00
phil 844fc3c795 fs.5: fix typo 2019-10-30 15:04:31 -04:00
phil 1fb8cedb1d rn takes pairs of files, like cp. 2019-10-30 02:12:48 -04:00
phil 364736a4a7 proto: remove redundant adm entry 2019-10-30 02:03:17 -04:00
phil 7a32025611 create rn.1 man page from mv.1 2019-10-30 02:01:59 -04:00
phil 016c6adca9 clerify ln.1 2019-10-30 01:58:45 -04:00
phil 1619f46122 update ln, ls, stat man pages for original commands. add link man page. 2019-10-30 01:57:08 -04:00
phil c5c29ec771 fs.5: format under UNIX-7 roff!
mention boot & swap track locations
2019-10-30 01:34:25 -04:00
phil db6bcaef6e rename filesys.5 to fs.5 (fit in 8 characters) 2019-10-30 01:33:27 -04:00
phil 2b2e057f7f more system comments 2019-10-30 00:53:48 -04:00
phil f9dbe7e946 as7: add --no-label-warnings flag 2019-10-29 21:29:55 -04:00
Phil BudneandGitHub be3f9de0e2 Merge pull request #167 from philbudne/noc
use original commands, add tmg, use octal in proto file, fsck7 output
2019-10-29 21:04:56 -04:00
phil 1a35c9146d switch to original commands, alphabetize proto and Makefile 2019-10-29 00:00:55 -04:00
phil 917cde2693 add op.s from scans to src/cmd 2019-10-28 23:59:25 -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
Phil BudneandGitHub 07b5d101bd Merge pull request #166 from teverett/master
unrefactored
2019-10-27 20:16:08 -04:00
Tom Everett c51d8ce87e updated travis to prevent breaking the alt build again 2019-10-27 19:28:12 -04:00
Tom Everett 72f187357b unrefactored 2019-10-27 19:24:21 -04:00
phil 9c5f034193 as7: change directive prefix from "<TAB>." to "@" 2019-10-26 12:36:09 -04:00
115 changed files with 3120 additions and 2447 deletions
+31
View File
@@ -0,0 +1,31 @@
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: get libdatetime-perl
run: sudo apt-get install libdatetime-perl
- name: build
run: make clean;make alt; make clean; make
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: get DateTime
run: sudo cpan -i DateTime
- name: build
run: make clean;make alt; make clean; make
+2
View File
@@ -14,3 +14,5 @@ build/alt/a.out
build/alt/image.fs build/alt/image.fs
**/.DS_Store **/.DS_Store
/a.out /a.out
/build/cas.out
/build/chrtbl.out
-3
View File
@@ -1,3 +0,0 @@
language: c
sudo: false
script: make clean;make
+5 -2
View File
@@ -9,8 +9,11 @@ buildit:
run: buildit run: buildit
cd build && $(MAKE) run cd build && $(MAKE) run
altrun: buildit alt:
cd build && $(MAKE) alt && $(MAKE) altrun cd build && $(MAKE) alt
altrun: alt
cd build && $(MAKE) altrun
clean: clean:
cd build && $(MAKE) clean cd build && $(MAKE) clean
+81 -73
View File
@@ -1,53 +1,54 @@
![CI](https://github.com/DoctorWkt/pdp7-unix/workflows/CI/badge.svg)
# pdp7-unix # pdp7-unix
## About ## About
pdp7-unix is a project to resurrect Unix on the PDP-7 from scans of pdp7-unix is a project to resurrect Unix on the PDP-7 from scans of the original
the original assembly code done by assembly code done by
[Norman Wilson](http://www.cs.toronto.edu/~norman/pers/index.html). [Norman Wilson](http://www.cs.toronto.edu/~norman/pers/index.html).
The scans of PDP-7 Unix are in the [Unix Archive](http://www.tuhs.org/) The scans of PDP-7 Unix are in the [Unix Archive](http://www.tuhs.org/)
as the files [as the files 0*.pdf](http://www.tuhs.org/Archive/Distributions/Research/McIlroy_v0/).
[0*.pdf and 1*.pdf](http://www.tuhs.org/Archive/Distributions/Research/McIlroy_v0/).
## Current Status ## Current Status
### January 2020
Unixv0 is running on a real PDP-7 at the Living Computer Museum. [Youtube](https://www.youtube.com/watch?v=pvaPaWyiuLA).
### October 2019 ### October 2019
A second notebook with missing sources has been discovered and A second notebook with missing sources has been
scanned. The original commands are now in the disk image discovered and scanned. New files are being added to the scans
(only the B compiler, date, mv and od are modern programs). directory as they are typed in!
Graphics programs (including Space Travel) are being debugged
along with a simulation of the display hardware.
### March 2016 ### March 2016
We've written an assembler, a user-mode simulator and commented We've written an assembler, a user-mode simulator and
several source files. We now have these utilities running: as, cat, commented several source files. We now have these utilities running:
chmod, chown, chrm, cp, date, ln, ls, mv, stat. We have a working as, cat, chmod, chown, chrm, cp, date, ln, ls, mv, stat. We have a working
(replacement) shell. We have a working filesystem and we can now boot shell with some functionality missing. We have a working filesystem and
the kernel, launch init, login, get to a shell prompt and run the we can now boot the kernel, launch init, login, get to a shell prompt and
utilities. run the utilities.
Things to do: bring the Things to do: bring the
system fully up on a PDP-7 system, fix any bugs and document everything. 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/) We have a [real PDP-7](http://physics.uoregon.edu/outreach/movies/pdplives/)
and [SimH](http://simh.trailing-edge.com/) as target platforms. and [SimH](http://simh.trailing-edge.com/) as target platforms.
## Building pdp7-unix ## Building pdp7-unix
pdp7-unix requires [Perl5](https://www.perl.org/) to build, pdp7-unix requires [Perl5](https://www.perl.org/) to build.
plus the perl DateTime package (debian/Ubuntu libtimedate-perl).
To compile it: To compile it:
`make pdp7` `make`
## Running pdp7-unix ## 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). 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). On 64-bit systems, you may need to set the C compiler's optimisation level to -O1.
On 64-bit systems, you may need to set the C compiler's optimisation level to -O1.
### Running from source ### Running from source
@@ -63,13 +64,13 @@ A typical pdp7-unix session on simh looks like:
<pre> <pre>
pdp7 unixv0.simh pdp7 unixv0.simh
k
PDP-7 simulator V4.0-0 Current git commit id: aff3346e PDP-7 simulator V4.0-0 Current git commit id: b848cb12
CPU idle disabled CPU idle disabled
8KW, EAE 8KW, EAE
/Users/tom/projects/pdp7-unix/build/unixv0.simh-13> att rb image.fs /Users/tom/projects/pdp7-unix/build/unixv0.simh-13> att rb image.fs
RB: buffering file in memory RB: buffering file in memory
/Users/tom/projects/pdp7-unix/build/unixv0.simh-18> att -U g2in 12345 /Users/tom/projects/pdp7-unix/build/unixv0.simh-17> att -U g2in 12345
Listening on port 12345 Listening on port 12345
PDP-7 simulator configuration PDP-7 simulator configuration
@@ -89,10 +90,9 @@ G2IN devno=43-44
login: ken login: ken
password: ken password: ken
@ ls @ ls
dd
.. ..
system dd
sop.s maksys.s
s1.s s1.s
s2.s s2.s
s3.s s3.s
@@ -101,58 +101,65 @@ s5.s
s6.s s6.s
s7.s s7.s
s8.s s8.s
maksys.s sop.s
trysys.s system
sys.rc sys.rc
trysys.s
@ ls system @ ls system
dd ..
ttyin adm
apr
as
b
cas
cat
check
chmod
chown
chrm
cp
date
db
dd
display
ds
dskres
dsksav
dsw
dttt
ed
init
keyboard keyboard
pptin link
ttyout list
display ln
pptout ls
apr moo
as mv
bc nm
cas od
cat p
check
chmod
chown
chrm
cp
date
db
ds
dskres
dsksav
dsw
ed
init
ln
ls
lsd
lsl
nm
od
p
pd
mv
password password
roff pptin
rn pptout
rm rm
sh rn
stat roff
tm salv
sh
stat
tm
ttyin
ttyout
ttt
un
@ @
</pre> </pre>
## Source Tree ## Source Tree
The code in the original scans are (c) Novell who own the rights to the Unix The code in the original scans are (c) Micro Focus who own the rights to the Unix
source code. Everything that didn't come from the scanned files is GPLv3. 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 * /build is an area to build the kernel & filesystem and run them
@@ -164,6 +171,11 @@ source code. Everything that didn't come from the scanned files is GPLv3.
* /src/other holds PDP-7 source code which did not come from the scanned files * /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 * /tools holds the source for the tools written to assist the project
## License
pdp7-unix is under the [GPLv3](LICENSE)
## Mailing List ## Mailing List
We have a We have a
@@ -171,7 +183,3 @@ We have a
for those people actively involved in the restoration effort. Send e-mail for those people actively involved in the restoration effort. Send e-mail
to Warren Toomey (DoctorWkt) if you are keen to help out. to Warren Toomey (DoctorWkt) if you are keen to help out.
## Travis Status
<a href="https://travis-ci.org/DoctorWkt/pdp7-unix">
<img src="https://api.travis-ci.org/DoctorWkt/pdp7-unix.png"></a>
+142 -36
View File
@@ -8,8 +8,8 @@ ASARGS=--format=ptr
MKFS=../tools/mkfs7 MKFS=../tools/mkfs7
A7OUT=../tools/a7out A7OUT=../tools/a7out
FSCK=../tools/fsck7 FSCK=../tools/fsck7
BFLAGS=-Wno-multichar -Wno-implicit CCARGS=-Wno-multichar -Wno-implicit
PDP7=pdp7 PDP7?=pdp7
# source dirs # source dirs
SYSSRC=../src/sys SYSSRC=../src/sys
@@ -26,12 +26,19 @@ BINARIES=../binaries/
all: cmd others a.out boot.rim image.fs all: cmd others a.out boot.rim image.fs
# Make alternative everything: no dd but . and ..
alt: altcmd altothers boot.rim alt/a.out alt/image.fs
# The run rule has no dependencies so that the system can be booted easily # The run rule has no dependencies so that the system can be booted easily
# and frequently with make run. However, you have to manually make all first! # and frequently with make run. However, you have to manually make all first!
run: run:
$(PDP7) unixv0.simh $(PDP7) unixv0.simh
dist: all # Alternative run, use the alt/image.fs
altrun:
$(PDP7) alt/unixv0.simh
dist: all alt
mkdir -p $(BINARIES) mkdir -p $(BINARIES)
mkdir -p $(BINARIES)/orig mkdir -p $(BINARIES)/orig
mkdir -p $(BINARIES)/alt mkdir -p $(BINARIES)/alt
@@ -39,31 +46,62 @@ dist: all
cp boot.rim $(BINARIES)/orig cp boot.rim $(BINARIES)/orig
cp a.out $(BINARIES)/orig cp a.out $(BINARIES)/orig
cp unixv0.simh $(BINARIES)/orig cp unixv0.simh $(BINARIES)/orig
cp alt/image.fs $(BINARIES)/alt
cp alt/a.out $(BINARIES)/alt
cp alt/unixv0.simh $(BINARIES)/alt
# Warm boot Unix kernel: boots into init and a login prompt
SYS= $(SYSSRC)/sop.s $(SYSSRC)/s1.s $(SYSSRC)/s2.s \
$(SYSSRC)/s3.s $(SYSSRC)/s4.s $(SYSSRC)/s5.s \
$(SYSSRC)/s6.s $(SYSSRC)/s7.s $(SYSSRC)/s8.s
a.out: $(SYS)
$(AS) -f ptr -o a.out $(SYSSRC)/sop.s $(SYS)
$(AS) -n -f list -o a.lst $(SYSSRC)/sop.s $(SYS)
# Alternative kernel: no dd, but . and ..
ALTSYS= $(SYSSRC)/sop.s $(SYSSRC)/s1.s $(ALTSRC)/s2.s \
$(SYSSRC)/s3.s $(SYSSRC)/s4.s $(SYSSRC)/s5.s \
$(SYSSRC)/s6.s $(SYSSRC)/s7.s $(SYSSRC)/s8.s
alt/a.out: $(ALTSYS)
$(AS) -f ptr -o alt/a.out $(ALTSYS)
$(AS) -n -f list -o alt/a.lst $(ALTSYS)
# Phil's bootstrap code # Phil's bootstrap code
boot.rim: $(SYSSRC)/sop.s $(OTHERSRC)/pbboot.s boot.rim: $(SYSSRC)/sop.s $(OTHERSRC)/pbboot.s
$(AS) -f rim -o boot.rim $(SYSSRC)/sop.s $(OTHERSRC)/pbboot.s $(AS) -f rim -o boot.rim $(SYSSRC)/sop.s $(OTHERSRC)/pbboot.s
# Warm boot Unix kernel: boots into init and a login prompt
SYS_FILES=$(SYSSRC)/sop.s $(sort $(wildcard $(SYSSRC)/s[1-8].s))
a.out: $(SYS_FILES)
$(AS) -f ptr -o a.out $(SYS_FILES)
$(AS) -n -f list -o a.lst $(SYS_FILES)
# Cold boot Unix kernel: attempts to build a minimal filesystem. # Cold boot Unix kernel: attempts to build a minimal filesystem.
# Don't use this one! # Don't use this one!
COLD_FILES=$(SYS_FILES) $(SYSSRC)/s9.s COLDBOOT=$(SYS) $(SYSSRC)/s9.s
coldboot.rim: $(COLD_FILES) coldboot.rim: $(COLDBOOT)
$(AS) -f rim -o coldboot.rim $(COLD_FILES) $(AS) -f rim -o coldboot.rim $(COLDBOOT)
$(AS) -n -f list -o coldboot.lst $(COLD_FILES) $(AS) -n -f list -o a.lst $(COLDBOOT)
# Filesystem image # Filesystem image
image.fs: cmd others image.fs: cmd others a.out chrtbl.out
$(MKFS) -k a.out proto $(MKFS) -k a.out -c chrtbl.out proto
$(FSCK) image.fs $(FSCK) image.fs
# Alternate filesystem image: . and .. but no dd
alt/image.fs: altcmd altothers
$(MKFS) -1 -2 -3 -o alt/image.fs -k alt/a.out alt/proto
$(FSCK) -3 alt/image.fs
# character table: assemble output of cas.s
chrtbl.out: cas.out ../src/other/chrtbl.s
$(AS) -f ptr --no-label-warnings -o chrtbl.out ../src/other/chrtbl.s cas.out
# run cas.s under a7out: needs local file!
cas.out: bin/cas ../src/sys/cas.in
rm -f cas.in
ln -s ../src/sys/cas.in .
$(A7OUT) bin/cas cas.out cas.in
rm -f cas.in
clean: clean:
rm -f boot.rim image.fs a.lst n.out a.out rm -f boot.rim image.fs a.lst n.out a.out
rm -f cas cas.in cas.out chrtbl.out
rm -f alt/image.fs alt/a.out alt/a.lst
rm -rf $(BINDIR) $(TESTDIR) rm -rf $(BINDIR) $(TESTDIR)
rm -rf $(BINARIES) rm -rf $(BINARIES)
@@ -71,8 +109,10 @@ dirs:
mkdir -p $(BINDIR) mkdir -p $(BINDIR)
# The commands that came from the original scans # The commands that came from the original scans
cmd: dirs \ # PLEASE KEEP IN ALPHABETICAL ORDER!
cmd: dirs \
$(BINDIR)/adm \ $(BINDIR)/adm \
$(BINDIR)/ald \
$(BINDIR)/apr \ $(BINDIR)/apr \
$(BINDIR)/as \ $(BINDIR)/as \
$(BINDIR)/cas \ $(BINDIR)/cas \
@@ -94,32 +134,36 @@ cmd: dirs \
$(BINDIR)/moo \ $(BINDIR)/moo \
$(BINDIR)/nm \ $(BINDIR)/nm \
$(BINDIR)/p \ $(BINDIR)/p \
$(BINDIR)/psych \
$(BINDIR)/rm \ $(BINDIR)/rm \
$(BINDIR)/rn \ $(BINDIR)/rn \
$(BINDIR)/roff \ $(BINDIR)/roff \
$(BINDIR)/salv \ $(BINDIR)/salv \
$(BINDIR)/sh \ $(BINDIR)/sh \
$(BINDIR)/st \
$(BINDIR)/stat \ $(BINDIR)/stat \
$(BINDIR)/tm \ $(BINDIR)/tm \
$(BINDIR)/ttt \ $(BINDIR)/ttt \
$(BINDIR)/un $(BINDIR)/un
# -- compile errors # Alternate commands: no dd, but . and ..
altcmd: dirs cmd \
$(BINDIR)/altchrm $(BINDIR)/cp $(BINDIR)/altinit $(BINDIR)/altmkdir
$(BINDIR)/adm: $(CMDSRC)/adm.s $(BINDIR)/adm: $(CMDSRC)/adm.s
$(AS) $(ASARGS) -o $(BINDIR)/adm $(CMDSRC)/adm.s $(AS) $(ASARGS) -o $(BINDIR)/adm $(CMDSRC)/adm.s
$(BINDIR)/ald: $(CMDSRC)/ald.s
$(AS) $(ASARGS) -o $(BINDIR)/ald $(CMDSRC)/ald.s
$(BINDIR)/apr: $(CMDSRC)/apr.s $(BINDIR)/apr: $(CMDSRC)/apr.s
$(AS) $(ASARGS) -o $(BINDIR)/apr $(CMDSRC)/apr.s $(AS) $(ASARGS) -o $(BINDIR)/apr $(CMDSRC)/apr.s
$(BINDIR)/as: $(CMDSRC)/as.s $(BINDIR)/as: $(CMDSRC)/as.s
$(AS) $(ASARGS) -o $(BINDIR)/as $(CMDSRC)/as.s $(AS) $(ASARGS) -o $(BINDIR)/as $(CMDSRC)/as.s
# NOT the B compiler!
$(BINDIR)/bc: $(CMDSRC)/bc.s $(BINDIR)/bc: $(CMDSRC)/bc.s
$(AS) $(ASARGS) -o $(BINDIR)/bcx $(CMDSRC)/bc.s $(AS) $(ASARGS) -o $(BINDIR)/bc $(CMDSRC)/bc.s
$(BINDIR)/cas: $(CMDSRC)/cas.s
$(AS) $(ASARGS) -o $(BINDIR)/cas $(CMDSRC)/cas.s
$(BINDIR)/cat: $(CMDSRC)/cat.s $(BINDIR)/cat: $(CMDSRC)/cat.s
$(AS) $(ASARGS) -o $(BINDIR)/cat $(CMDSRC)/cat.s $(AS) $(ASARGS) -o $(BINDIR)/cat $(CMDSRC)/cat.s
@@ -136,22 +180,24 @@ $(BINDIR)/chown: $(CMDSRC)/chown.s
$(BINDIR)/chrm: $(CMDSRC)/chrm.s $(BINDIR)/chrm: $(CMDSRC)/chrm.s
$(AS) $(ASARGS) -o $(BINDIR)/chrm $(CMDSRC)/chrm.s $(AS) $(ASARGS) -o $(BINDIR)/chrm $(CMDSRC)/chrm.s
$(BINDIR)/altchrm: $(ALTSRC)/chrm.s
$(AS) $(ASARGS) -o $(BINDIR)/altchrm $(ALTSRC)/chrm.s
$(BINDIR)/cas: $(CMDSRC)/cas.s
$(AS) $(ASARGS) -o $(BINDIR)/cas $(CMDSRC)/cas.s
$(BINDIR)/cp: $(CMDSRC)/cp.s $(BINDIR)/cp: $(CMDSRC)/cp.s
$(AS) $(ASARGS) -o $(BINDIR)/cp $(CMDSRC)/cp.s $(AS) $(ASARGS) -o $(BINDIR)/cp $(CMDSRC)/cp.s
$(BINDIR)/db: $(CMDSRC)/db.s $(BINDIR)/db: $(CMDSRC)/db.s
$(AS) $(ASARGS) -o $(BINDIR)/db $(CMDSRC)/db.s $(AS) $(ASARGS) -o $(BINDIR)/db $(CMDSRC)/db.s
# -- compile errors
$(BINDIR)/dmabs: $(CMDSRC)/dmabs.s $(BINDIR)/dmabs: $(CMDSRC)/dmabs.s
$(AS) $(ASARGS) -o $(BINDIR)/dmabs $(CMDSRC)/dmabs.s $(AS) $(ASARGS) -o $(BINDIR)/dmabs $(CMDSRC)/dmabs.s
$(BINDIR)/ds: $(CMDSRC)/ds.s $(BINDIR)/ds: $(CMDSRC)/ds.s
$(AS) $(ASARGS) -o $(BINDIR)/ds $(CMDSRC)/ds.s $(AS) $(ASARGS) -o $(BINDIR)/ds $(CMDSRC)/ds.s
$(BINDIR)/dsw: $(CMDSRC)/dsw.s
$(AS) $(ASARGS) -o $(BINDIR)/dsw $(CMDSRC)/dsw.s
DSKRES=$(CMDSRC)/dskres.s $(CMDSRC)/dskio.s $(SYSSRC)/sop.s DSKRES=$(CMDSRC)/dskres.s $(CMDSRC)/dskio.s $(SYSSRC)/sop.s
$(BINDIR)/dskres: $(DSKRES) $(BINDIR)/dskres: $(DSKRES)
$(AS) $(ASARGS) -o $(BINDIR)/dskres $(DSKRES) $(AS) $(ASARGS) -o $(BINDIR)/dskres $(DSKRES)
@@ -160,8 +206,12 @@ DSKSAV=$(CMDSRC)/dsksav.s $(CMDSRC)/dskio.s $(SYSSRC)/sop.s
$(BINDIR)/dsksav: $(DSKSAV) $(BINDIR)/dsksav: $(DSKSAV)
$(AS) $(ASARGS) -o $(BINDIR)/dsksav $(DSKSAV) $(AS) $(ASARGS) -o $(BINDIR)/dsksav $(DSKSAV)
$(BINDIR)/ed: $(CMDSRC)/ed1.s $(CMDSRC)/ed2.s $(BINDIR)/dsw: $(CMDSRC)/dsw.s
$(AS) $(ASARGS) -o $(BINDIR)/ed $(CMDSRC)/ed1.s $(CMDSRC)/ed2.s $(AS) $(ASARGS) -o $(BINDIR)/dsw $(CMDSRC)/dsw.s
ED=$(CMDSRC)/ed1.s $(CMDSRC)/ed2.s
$(BINDIR)/ed: $(ED)
$(AS) $(ASARGS) -o $(BINDIR)/ed $(ED)
$(BINDIR)/init: $(CMDSRC)/init.s $(BINDIR)/init: $(CMDSRC)/init.s
$(AS) $(ASARGS) -o $(BINDIR)/init $(CMDSRC)/init.s $(AS) $(ASARGS) -o $(BINDIR)/init $(CMDSRC)/init.s
@@ -178,13 +228,13 @@ $(BINDIR)/moo: $(CMDSRC)/moo.s
$(BINDIR)/nm: $(CMDSRC)/nm.s $(BINDIR)/nm: $(CMDSRC)/nm.s
$(AS) $(ASARGS) -o $(BINDIR)/nm $(CMDSRC)/nm.s $(AS) $(ASARGS) -o $(BINDIR)/nm $(CMDSRC)/nm.s
P=$(sort $(wildcard $(CMDSRC)/p[1-5].s)) P=$(CMDSRC)/p1.s $(CMDSRC)/p2.s $(CMDSRC)/p3.s $(CMDSRC)/p4.s $(CMDSRC)/p5.s
$(BINDIR)/p: $(P) $(BINDIR)/p: $(P)
$(AS) $(ASARGS) -o $(BINDIR)/p $(P) $(AS) $(ASARGS) -o $(BINDIR)/p $(P)
# contains halt! PSYCH=$(CMDSRC)/psych.s $(CMDSRC)/fop.s
$(BINDIR)/pd: $(CMDSRC)/pd.s $(BINDIR)/psych: $(PSYCH)
$(AS) $(ASARGS) -o $(BINDIR)/pd $(CMDSRC)/pd.s $(AS) $(ASARGS) -o $(BINDIR)/psych $(PSYCH)
$(BINDIR)/rm: $(CMDSRC)/rm.s $(BINDIR)/rm: $(CMDSRC)/rm.s
$(AS) $(ASARGS) -o $(BINDIR)/rm $(CMDSRC)/rm.s $(AS) $(ASARGS) -o $(BINDIR)/rm $(CMDSRC)/rm.s
@@ -192,6 +242,9 @@ $(BINDIR)/rm: $(CMDSRC)/rm.s
$(BINDIR)/rn: $(CMDSRC)/rn.s $(BINDIR)/rn: $(CMDSRC)/rn.s
$(AS) $(ASARGS) -o $(BINDIR)/rn $(CMDSRC)/rn.s $(AS) $(ASARGS) -o $(BINDIR)/rn $(CMDSRC)/rn.s
$(BINDIR)/pd: $(CMDSRC)/pd.s
$(AS) $(ASARGS) -o $(BINDIR)/pd $(CMDSRC)/pd.s
$(BINDIR)/roff: $(CMDSRC)/roff.s $(BINDIR)/roff: $(CMDSRC)/roff.s
$(AS) $(ASARGS) -o $(BINDIR)/roff $(CMDSRC)/roff.s $(AS) $(ASARGS) -o $(BINDIR)/roff $(CMDSRC)/roff.s
@@ -211,18 +264,25 @@ TTT=$(CMDSRC)/ttt1.s $(CMDSRC)/ttt2.s
$(BINDIR)/ttt: $(TTT) $(BINDIR)/ttt: $(TTT)
$(AS) $(ASARGS) -o $(BINDIR)/ttt $(TTT) $(AS) $(ASARGS) -o $(BINDIR)/ttt $(TTT)
ST=$(CMDSRC)/st1.s $(CMDSRC)/st2.s $(CMDSRC)/st3.s $(CMDSRC)/st4.s $(CMDSRC)/fop.s $(CMDSRC)/st5.s $(CMDSRC)/st6.s $(CMDSRC)/st7.s
$(BINDIR)/st: $(ST)
$(AS) $(ASARGS) -o $(BINDIR)/st $(ST)
$(BINDIR)/un: $(CMDSRC)/un.s $(BINDIR)/un: $(CMDSRC)/un.s
$(AS) $(ASARGS) -o $(BINDIR)/un $(CMDSRC)/un.s $(AS) $(ASARGS) -o $(BINDIR)/un $(CMDSRC)/un.s
################ ################
# The commands that did not come from the scans # The commands that did not come from the scans
others: dirs $(BINDIR)/b $(BINDIR)/date $(BINDIR)/mv $(BINDIR)/od others: dirs \
$(BINDIR)/b \
$(BINDIR)/date \
$(BINDIR)/mv \
$(BINDIR)/od
# PLB: B compiler -- renamed from bc to b # B compiler
# there is a bc.s in the second set of scans!
$(BINDIR)/b: $(CMDSRC)/bl.s $(CMDSRC)/bi.s ../tools/b.c $(OTHERSRC)/b.b $(BINDIR)/b: $(CMDSRC)/bl.s $(CMDSRC)/bi.s ../tools/b.c $(OTHERSRC)/b.b
$(CC) $(BFLAGS) -o b ../tools/b.c $(CC) $(CCARGS) -o b ../tools/b.c
./b $(OTHERSRC)/b.b b.s ./b $(OTHERSRC)/b.b b.s
$(AS) $(ASARGS) -o $(BINDIR)/b $(CMDSRC)/bl.s b.s $(CMDSRC)/bi.s $(AS) $(ASARGS) -o $(BINDIR)/b $(CMDSRC)/bl.s b.s $(CMDSRC)/bi.s
rm b b.s rm b b.s
@@ -236,6 +296,50 @@ $(BINDIR)/mv: $(OTHERSRC)/wktmv.s
$(BINDIR)/od: $(OTHERSRC)/wktod.s $(BINDIR)/od: $(OTHERSRC)/wktod.s
$(AS) $(ASARGS) -o $(BINDIR)/od $(OTHERSRC)/wktod.s $(AS) $(ASARGS) -o $(BINDIR)/od $(OTHERSRC)/wktod.s
################
# replacement programs (no longer in build)
$(BINDIR)/pbsh: $(OTHERSRC)/pbsh.s
$(AS) $(ASARGS) -o $(BINDIR)/pbsh $(OTHERSRC)/pbsh.s
$(BINDIR)/wktcat: $(OTHERSRC)/wktcat.s
$(AS) $(ASARGS) -o $(BINDIR)/wktcat $(OTHERSRC)/wktcat.s
$(BINDIR)/wktcp: $(OTHERSRC)/wktcp.s
$(AS) $(ASARGS) -o $(BINDIR)/wktcp $(OTHERSRC)/wktcp.s
$(BINDIR)/wktln: $(OTHERSRC)/wktln.s
$(AS) $(ASARGS) -o $(BINDIR)/wktln $(OTHERSRC)/wktln.s
$(BINDIR)/wktls: $(OTHERSRC)/wktls.s
$(AS) $(ASARGS) -o $(BINDIR)/wktls $(OTHERSRC)/wktls.s
$(BINDIR)/lsd: $(OTHERSRC)/pblsd.s
$(AS) $(ASARGS) -o $(BINDIR)/lsd $(OTHERSRC)/pblsd.s
$(BINDIR)/lsl: $(OTHERSRC)/pblsd.s
$(AS) $(ASARGS) -o $(BINDIR)/lsl $(OTHERSRC)/pblsd.s
$(BINDIR)/wktstat: $(OTHERSRC)/wktstat.s
$(AS) $(ASARGS) -o $(BINDIR)/wktstat $(OTHERSRC)/wktstat.s
################
# Alternative init: no dd directory
$(BINDIR)/altinit: $(ALTSRC)/init.s
$(AS) $(ASARGS) -o $(BINDIR)/altinit $(ALTSRC)/init.s
$(BINDIR)/altmkdir: $(ALTSRC)/wktmkdir.s
$(AS) $(ASARGS) -o $(BINDIR)/altmkdir $(ALTSRC)/wktmkdir.s
# Alternative other commands: no dd, but . and ..
altothers: dirs cmd $(BINDIR)/wktcat $(BINDIR)/wktcp $(BINDIR)/date \
$(BINDIR)/altls $(BINDIR)/mv $(BINDIR)/od
$(BINDIR)/altls: $(ALTSRC)/wktls.s
$(AS) $(ASARGS) -o $(BINDIR)/altls $(ALTSRC)/wktls.s
################################################################
tests: tests:
mkdir -p $(TESTDIR) mkdir -p $(TESTDIR)
$(AS) $(ASARGS) -o $(TESTDIR)/decimal_out $(TESTSRC)/decimal_out.s $(AS) $(ASARGS) -o $(TESTDIR)/decimal_out $(TESTSRC)/decimal_out.s
@@ -250,3 +354,5 @@ runtests: tests
$(A7OUT) $(TESTDIR)/octal_test $(A7OUT) $(TESTDIR)/octal_test
# $(A7OUT) $(TESTDIR)/testmul # $(A7OUT) $(TESTDIR)/testmul
# $(A7OUT) $(TESTDIR)/write_test # $(A7OUT) $(TESTDIR)/write_test
+5 -4
View File
@@ -9,7 +9,8 @@
# link l---- inumber # link l---- inumber
# #
# The top directory's name is ignored # The top directory's name is ignored
# Numeric values are in decimal # inumbers are in decimal (-1 means previous file)
# uids are in octal
# Contents of each directory ends with a $ on a line by itself # Contents of each directory ends with a $ on a line by itself
# Format was inspired by 6th Edition mkfs # Format was inspired by 6th Edition mkfs
# #
@@ -41,10 +42,10 @@
sh frwr- -1 bin/sh sh frwr- -1 bin/sh
stat frwr- -1 bin/stat stat frwr- -1 bin/stat
$ $
ken drwr- 10 ken drwr- 12
system l---- 3 system l---- 3
hello frwr- 10 fs/hello hello frwr- 12 fs/hello
$ $
dmr drwr- 12 dmr drwr- 14
system l---- 3 system l---- 3
$ $
+1 -2
View File
@@ -12,8 +12,7 @@ set tti unix
set rb ena set rb ena
att rb alt/image.fs att rb alt/image.fs
# uncomment to TELNET in GRAPHICS-2 keyboard/display(!!) # enable TELNET in GRAPHICS-2 keyboard/display(!!)
# (requires github.com/philbudne/simh)
set g2in ena set g2in ena
att -U g2in 12345 att -U g2in 12345
+3 -4
View File
@@ -1,11 +1,10 @@
Here is how to compile and run hello.b: Here is how to compile and run hello.b:
@ b hello.b hello.s @ bc hello.b hello.s
@ ln dmr op.s @ as ops.s bl.s hello.s bi.s
@ as op.s bl.s hello.s bi.s
I I
II II
op.s ops.s
bl.s bl.s
hello.s hello.s
bi.s bi.s
View File
+3 -4
View File
@@ -1,5 +1,4 @@
system:system:system:777777 system:system:system:777777
ken:ken:ken:10 ken:ken:ken:12
dmr:dmr:dmr:11 dmr:dmr:dmr:14
bwk:bwk:bwk:12 doug:doug:doug:15
doug:doug:doug:14
+1 -1
View File
@@ -1,5 +1,5 @@
rm op.s rm op.s
link dmr op.s ln dmr op.s
as sop.s op.s maksys.s as sop.s op.s maksys.s
rn a.out maksys rn a.out maksys
as sop.s op.s trysys.s as sop.s op.s trysys.s
+12 -3
View File
@@ -1,14 +1,18 @@
# detect OS # detect OS
UNAME=$(shell uname) UNAME=$(shell uname)
ifeq ($(UNAME), Linux) ifeq ($(UNAME), "Linux")
UNAME=LINUX UNAME=LINUX
else else
ifeq ($(UNAME), Darwin) ifeq ($(UNAME), "Darwin")
UNAME=DARWIN UNAME=DARWIN
else else
ifeq ($(UNAME), FreeBSD) ifeq ($(UNAME), "FreeBSD")
UNAME=FREEBSD UNAME=FREEBSD
else
ifeq ($(UNAME), "OpenBSD")
UNAME=OPENBSD
endif
endif endif
endif endif
endif endif
@@ -23,6 +27,10 @@ ifeq ($(UNAME), FREEBSD)
# FreeBSD # FreeBSD
CC=cc CC=cc
MAKE=gmake MAKE=gmake
ifeq ($(UNAME), OPENBSD)
# OpenBSD
CC=cc
MAKE=gmake
else else
ifeq ($(UNAME), DARWIN) ifeq ($(UNAME), DARWIN)
# Mac OS X # Mac OS X
@@ -33,3 +41,4 @@ else
endif endif
endif endif
endif endif
endif
+37 -35
View File
@@ -7,7 +7,8 @@
# link l---- inumber # link l---- inumber
# #
# The top directory's name is ignored # The top directory's name is ignored
# Numeric values are in decimal # inumbers are in decimal (-1 means previous file)
# uids are in octal
# Contents of each directory ends with a $ on a line by itself # Contents of each directory ends with a $ on a line by itself
# Format was inspired by 6th Edition mkfs # Format was inspired by 6th Edition mkfs
# #
@@ -20,9 +21,9 @@ dd drwr- -1 4
ttyout irwr- -1 11 ttyout irwr- -1 11
display irwr- -1 12 display irwr- -1 12
pptout irwr- -1 13 pptout irwr- -1 13
adm frwr- -1 bin/adm
password frw-- -1 fs/password password frw-- -1 fs/password
adm frwr- -1 bin/adm adm frwr- -1 bin/adm
ald frwr- -1 bin/ald
apr frwr- -1 bin/apr apr frwr- -1 bin/apr
as frwr- -1 bin/as as frwr- -1 bin/as
b frwr- -1 bin/b b frwr- -1 bin/b
@@ -50,6 +51,7 @@ dd drwr- -1 4
nm frwr- -1 bin/nm nm frwr- -1 bin/nm
od frwr- -1 bin/od od frwr- -1 bin/od
p frwr- -1 bin/p p frwr- -1 bin/p
psych frwr- -1 bin/psych
rm frwr- -1 bin/rm rm frwr- -1 bin/rm
rn frwr- -1 bin/rn rn frwr- -1 bin/rn
roff frwr- -1 bin/roff roff frwr- -1 bin/roff
@@ -59,44 +61,44 @@ dd drwr- -1 4
tm frwr- -1 bin/tm tm frwr- -1 bin/tm
ttt frwr- -1 bin/ttt ttt frwr- -1 bin/ttt
dttt l---- -1 dttt l---- -1
st frwr- -1 bin/st
un frwr- -1 bin/un un frwr- -1 bin/un
$ $
ken drwr- 10 ken drwr- 12
system l---- 3 system l---- 3
sop.s frwr- 10 ../src/sys/sop.s sop.s frwr- 12 ../src/sys/sop.s
s1.s frwr- 10 ../src/sys/s1.s s1.s frwr- 12 ../src/sys/s1.s
s2.s frwr- 10 ../src/sys/s2.s s2.s frwr- 12 ../src/sys/s2.s
s3.s frwr- 10 ../src/sys/s3.s s3.s frwr- 12 ../src/sys/s3.s
s4.s frwr- 10 ../src/sys/s4.s s4.s frwr- 12 ../src/sys/s4.s
s5.s frwr- 10 ../src/sys/s5.s s5.s frwr- 12 ../src/sys/s5.s
s6.s frwr- 10 ../src/sys/s6.s s6.s frwr- 12 ../src/sys/s6.s
s7.s frwr- 10 ../src/sys/s7.s s7.s frwr- 12 ../src/sys/s7.s
s8.s frwr- 10 ../src/sys/s8.s s8.s frwr- 12 ../src/sys/s8.s
maksys.s frwr- 10 ../src/sys/maksys.s maksys.s frwr- 12 ../src/sys/maksys.s
trysys.s frwr- 10 ../src/sys/trysys.s trysys.s frwr- 12 ../src/sys/trysys.s
sys.rc frwr- 10 fs/sys.rc sys.rc frwr- 12 fs/sys.rc
moostat frwr- 12 fs/moostat
$ $
dmr drwr- 11 dmr drwr- 14
system l---- 3 system l---- 3
as.s frwr- 11 ../src/cmd/as.s as.s frwr- 14 ../src/cmd/as.s
op.s frwr- 11 ../src/cmd/op.s op.s frwr- 14 ../src/cmd/op.s
b_readme frwr- 14 fs/b_readme
bi.s frwr- 14 ../src/cmd/bi.s
bl.s frwr- 14 ../src/cmd/bl.s
db.s frwr- 14 ../src/cmd/db.s
hello.b frwr- 14 ../src/other/hello.b
b.b frwr- 14 ../src/other/b.b
$ $
bwk drwr- 12 doug drwr- 15
system l---- 3 system l---- 3
b_readme frwr- 12 fs/b_readme t1.s frwr- 15 ../src/cmd/t1.s
bi.s frwr- 12 ../src/cmd/bi.s t2.s frwr- 15 ../src/cmd/t2.s
bl.s frwr- 12 ../src/cmd/bl.s t3.s frwr- 15 ../src/cmd/t3.s
db.s frwr- 12 ../src/cmd/db.s t4.s frwr- 15 ../src/cmd/t4.s
hello.b frwr- 12 ../src/other/hello.b t5.s frwr- 15 ../src/cmd/t5.s
$ t6.s frwr- 15 ../src/cmd/t6.s
doug drwr- 14 t7.s frwr- 15 ../src/cmd/t7.s
system l---- 3 t8.s frwr- 15 ../src/cmd/t8.s
t1.s frwr- 14 ../src/cmd/t1.s
t2.s frwr- 14 ../src/cmd/t2.s
t3.s frwr- 14 ../src/cmd/t3.s
t4.s frwr- 14 ../src/cmd/t4.s
t5.s frwr- 14 ../src/cmd/t5.s
t6.s frwr- 14 ../src/cmd/t6.s
t7.s frwr- 14 ../src/cmd/t7.s
t8.s frwr- 14 ../src/cmd/t8.s
$ $
+7 -8
View File
@@ -3,28 +3,27 @@ set cpu eae
set cpu history=100 set cpu history=100
show cpu show cpu
# set up SIMH devices: ; set up SIMH devices:
# UNIX character translations (CR to NL, ESC to ALTMODE): ; UNIX character translations (CR to NL, ESC to ALTMODE):
set tti unix set tti unix
# RB09 fixed head disk: ; RB09 fixed head disk:
set rb ena set rb ena
att rb image.fs att rb image.fs
# uncomment to TELNET in GRAPHICS-2 keyboard/display(!!) ; enable TELNET in GRAPHICS-2 keyboard/display(!!)
set g2in ena set g2in ena
att -U g2in 12345 att -U g2in 12345
# disable hardware UNIX-7 doesn't know about: ; disable hardware UNIX-7 doesn't know about:
set lpt disa set lpt disa
set drm disa set drm disa
set dt disa set dt disa
# show device settings: ; show device settings:
show dev show dev
# load and run the paper tape bootstrap ; load and run the paper tape bootstrap (loads system from disk)
# (loads system from disk)
load boot.rim 010000 load boot.rim 010000
go go
+1 -1
View File
@@ -13,7 +13,7 @@ DESCRIPTION Files are taken in pairs; the first is opened
.sp .sp
FILES -- FILES --
.sp .sp
SEE ALSO cat, pr SEE ALSO cat, pr, rn
.sp .sp
DIAGNOSTICS Error returns are checked at every system call, DIAGNOSTICS Error returns are checked at every system call,
and appropriate diagnostics are produced. and appropriate diagnostics are produced.
-119
View File
@@ -1,119 +0,0 @@
.oh '11/3/70''FILE SYSTEM(V)'
.ta 18 21 24
NAME format of file system
.sp
SYNOPSIS --
.sp
DESCRIPTION The RB09 fixed head disk has 8,000 64-word
blocks on each of its two surfaces. Unix uses
the second surface (physical blocks 8,000 to
15,999) and numbers them from logical block 0 to
logical block 7,999. The following discussion
refers to logical blocks.
.sp
The Unix filesystem is divided into 8,000 blocks
of 64 words per block. Block 0 is the "sysdata"
block. The first word points to the first block
of the free-storage map. Each block in the
free-storage map is structured as follows: the
first word is the block number of the next block
in the free-storage map, or zero if this is the
end of the free-storage map. The next nine words
hold free block numbers, or zero (no block
number).
.sp
Block 1 on the filesystem is unused. (?)
.sp
I-numbers begin at 1, and the storage for
i-nodes begins at block 2. Blocks 2 to 711
contain the i-nodes, with five consecutive
i-nodes per block. Certain i-nodes are reserved
for special files, directories and devices:
.sp
1 The core file written by "sys save" or a
bad system call
2 The "dd" directory directory
3 The "system" directory
6 The "ttyin" special file
7 The "keyboard" (graphic-2) special file
8 The "pptin" (paper tape reader) special
file
10 The "ttyout" special file
11 The "display" (graphic-2) special file
12 The "pptout" (paper tape punch) special
file
.sp
There is only one file system which is always
mounted; it resides on the RB disk. This device
is also used for swapping. The swap areas are at
the high blocks on this device: blocks 6,400 to
7,999. These blocks do not appear in the free
list.
.sp
Each i-node represents one file. The format of
an i-node is as follows, where the left column
represents the offset in words from the
beginning of the i-node:
.sp
0 flags (see below)
1 first indirect block or contents block
...
7 seventh indirect block or contents block
8 user ID of owner
9 link count
10 size in words
11 unique value assigned at creation
.sp
The flags are as follows:
.sp
400000 i-node is allocated
200000 large file
?????? allocated bit (always on)
000040 special file
000020 directory
000010 read, owner
000004 write, owner
000002 read, non-owner
000001 write, non-owner
.sp
The allocated bit (flag ??????) is believed even
if the i-node map says the i-node is free; thus
corruption of the map may cause i-nodes to
become unallocatable, but will not cause active
nodes to be reused.
.sp
Word number n of a file is accessed as follows:
n is divided by 64 to find its logical block
number (say b) in the file. If the file is small
(flag 200000 is 0), then b must be less than 7,
and the physical block number corresponding to b
is the bth entry in the address portion of the
i-node.
.sp
If the file is large, b is divided by 64 to
yield a number which must be less than 8 (or
the file is too large for UNIX to handle).
The corresponding slot in the i-node address
portion gives the physical block number of an
indirect block. The residue mod 64 gives a
word offset in the indirect block, and the
word found there is the physical address of
the block corresponding to b.
.sp
If block b in a file exists, it is not necessary
that all blocks less than b exist. A zero block
number either in the address words of the i-node
or in an indirect block indicates that the
corresponding block has never been allocated.
Such a missing block reads as if it contained
all zero words.
.sp
FILES --
.sp
SEE ALSO format of directories
.sp
DIAGNOSTICS --
.sp
BUGS --
.sp
OWNER ken
+138
View File
@@ -0,0 +1,138 @@
.oh '11/3/70''FILE SYSTEM(V)'
.ta 18 21 24
NAME format of file system
.sp
SYNOPSIS --
.sp
DESCRIPTION
.in 8
The RB09 fixed head disk has 8,000 64-word
blocks (100 tracks of 80 blocks)
on each of its two surfaces. The Unix filesystem
is stored in the first 80 tracks of
the second surface (physical blocks 8,000 to
14,399 -- physical tracks 100 to 179)
and numbers them from logical block 0 to
logical block 6,399.
.sp
The Unix filesystem is divided into 6,400 logical blocks
of 64 words per block. Block 0 is the "sysdata"
block. The first word points to the first block
of the free-storage map. Each block in the
free-storage map is structured as follows: the
first word is the block number of the next block
in the free-storage map, or zero if this is the
end of the free-storage map. The next nine words
hold free block numbers, or zero (no block
number).
.sp
Block 1 on the filesystem is unused. (?)
.sp
I-numbers begin at 1, and the storage for
i-nodes begins at block 2. Blocks 2 to 711
contain the i-nodes, with five 12-word
i-nodes per block. Certain i-nodes are reserved
for special files, directories and devices:
.sp
.nf
1 The core file written by "sys save"
or a bad system call
2 The "dd" directory directory
3 The "system" directory
6 The "ttyin" special file
7 The "keyboard" (GRAPHIC-2)
special file
8 The "pptin" (paper tape reader)
special file
10 The "ttyout" special file
11 The "display" (GRAPHIC-2)
special file
12 The "pptout" (paper tape punch)
special file
.fi
.sp
There is only one file system which is always
mounted; it resides on the RB disk.
.sp
The last twenty tracks of the second disk surface
are use for bootable images and swapping:
.sp
Each physical track from 180 to 189
contains a bootable system image of 3K words.
.sp
Each physical track from 190 to 199 is used to swap
a user process (4K words plus a 64-word swapable
"userdata" area).
.sp
Each i-node represents one file. The format of
an i-node is as follows, where the left column
represents the offset in words from the
beginning of the i-node:
.sp
.nf
0 flags (see below)
1 first indirect block or data block
...
7 seventh indirect block or data block
8 user ID of owner
9 link count
10 size in words
11 unique value assigned at creation
.sp
.in 8
The flags are as follows:
.sp
400000 i-node is allocated
200000 large file
?????? allocated bit (always on)
000040 special file
000020 directory
000010 read, owner
000004 write, owner
000002 read, non-owner
000001 write, non-owner
.fi
.in 8
.sp
The allocated bit (flag ??????) is believed even
if the i-node map says the i-node is free; thus
corruption of the map may cause i-nodes to
become unallocatable, but will not cause active
nodes to be reused.
.sp
Word number n of a file is accessed as follows:
n is divided by 64 to find its logical block
number (say b) in the file. If the file is small
(flag 200000 is 0), then b must be less than 7,
and the physical block number corresponding to b
is the bth entry in the address portion of the
i-node.
.sp
If the file is large, b is divided by 64 to
yield a number which must be less than 8 (or
the file is too large for UNIX to handle).
The corresponding slot in the i-node address
portion gives the physical block number of an
indirect block. The residue mod 64 gives a
word offset in the indirect block, and the
word found there is the physical address of
the block corresponding to b.
.sp
If block b in a file exists, it is not necessary
that all blocks less than b exist. A zero block
number either in the address words of the i-node
or in an indirect block indicates that the
corresponding block has never been allocated.
Such a missing block reads as if it contained
all zero words.
.in 0
.sp
FILES --
.sp
SEE ALSO dir(V)
.sp
DIAGNOSTICS --
.sp
BUGS --
.sp
OWNER ken
+36
View File
@@ -0,0 +1,36 @@
.oh '11/3/70''LINK(I)'
.ta 18 30
NAME link -- link to a file
.sp
.in 0
SYNOPSIS
.in 8
.ul
link
file
.sp
.ul
link
srcdir file
.sp
.ul
link
srcdir file name
.sp
.in 0
DESCRIPTION
.in 8
With one argument makes a link to file in system directory.
.sp
With two arguments, makes a link to file in srcdir.
.sp
With three arguments, make name a link to file in srcdir.
.sp
.in 0
FILES --
.sp
SEE ALSO ln
.sp
BUGS --
.sp
OWNER ken, dmr
+5 -5
View File
@@ -1,21 +1,21 @@
.oh '11/3/70''LN(I)' .oh '11/3/70''LN(I)'
.ta 18 30 .ta 18 30
NAME ln -- link to a file NAME ln -- link files
.sp .sp
SYNOPSIS SYNOPSIS
.ul .ul
ln ln
name1 name2 srcdir file...
.sp .sp
DESCRIPTION ln adds another filename to the first filename DESCRIPTION make links in current dir to named files in srcdir
.sp .sp
FILES -- FILES --
.sp .sp
SEE ALSO -- SEE ALSO link
.sp .sp
DIAGNOSTICS "twofiles" - please provide two filenames DIAGNOSTICS "twofiles" - please provide two filenames
"? file" - unable to make the link "? file" - unable to make the link
.sp .sp
BUGS -- BUGS --
.sp .sp
OWNER wkt OWNER ken, dmr
+10 -15
View File
@@ -2,21 +2,19 @@
.ta 18 21 24 .ta 18 21 24
NAME ls -- list contents of directory NAME ls -- list contents of directory
.sp .sp
SYNOPSIS ls [ -l ] directory SYNOPSIS ls [directory]
.sp .sp
DESCRIPTION DESCRIPTION
.ul .ul
ls ls
lists the contents of the named directory lists the contents of the current,
under control of one option: or named directory.
.sp .sp
l list in long format, giving i-number, .ul
mode, owner, size in words, and name of list
each file. (see lists details in the format of
.ul .ul
stat stat
for format of the
mode). Numeric values are in octal.
.sp .sp
FILES -- FILES --
.sp .sp
@@ -29,16 +27,13 @@ BUGS In a simulated environment, a filename larger
than eight characters will cause than eight characters will cause
.ul .ul
ls ls
to exit to exit prematurely.
prematurely.
.sp .sp
.ul .ul
ls ls
will try to open up a directory named "." if will try to open up a directory named ".." if
no directory is named. If the user desires this no directory is named.
functionality, they need to link "." to the
directory in question.
.sp .sp
OWNER wkt OWNER ken, dmr
+23
View File
@@ -0,0 +1,23 @@
.oh '11/3/70''RN(I)'
.ta 18 31
NAME rn -- rename files
.sp
SYNOPSIS
.ul
rn
from to ...
.sp
DESCRIPTION Files are taken in pairs; The file from
is renamed to to, and so on...
.sp
FILES --
.sp
SEE ALSO cp
.sp
DIAGNOSTICS
"? file" - either unable to remove or create
a file
.sp
BUGS The diagnostic is ambiguous.
.sp
OWNER ken, dmr
+27 -35
View File
@@ -10,52 +10,44 @@ name
DESCRIPTION DESCRIPTION
.ul .ul
stat stat
gives several kinds of information about gives several kinds of information about one file.
one file:
.sp .sp
access mode .nf
number of links i-number
owner flags
size in words owner
name links
size
.sp .sp
All information is self-explanatory except the flag bits are:
mode. The mode is a five-character string whose .nf
characters mean the following: .in 8
40 special file
20 directory
10 read, owner
04 write, owner
02 read, non-owner
01 write, non-owner
.in 8
.sp .sp
1 s: file is small (smaller than 448 words) All values are printed in octal.
l: file is large .in 0
d: file is a directory
.sp
2 r: owner can read
-: owner cannot read
.sp
3 w: owner can write
-: owner cannot write
.sp
4 r: non-owner can read
-: non-owner cannot read
.sp
5 w: non-owner can write
-: non-owner cannot write
.sp
All numeric values are printed in octal.
.sp .sp
FILES -- FILES --
.sp .sp
SEE ALSO SEE ALSO
.in 8
.ul .ul
ls list
with the -l option gives the same information shows all files in a directory in the same format as
as
.ul .ul
stat, stat.
except that it also shows the i-node .in 0
number for each file.
.sp .sp
DIAGNOSTICS "name ?" for any error. "nofiles" if no file DIAGNOSTICS "name ?" for any error. "nofiles" if no file
name is given. name is given.
.sp .sp
BUGS none BUGS none
.sp .sp
OWNER wkt OWNER ken, dmr
+10
View File
@@ -0,0 +1,10 @@
Misc documentation
==================
See also github wiki pages:
https://github.com/DoctorWkt/pdp7-unix/wiki/Links
https://github.com/DoctorWkt/pdp7-unix/wiki/roff-commands
dated:
https://github.com/DoctorWkt/pdp7-unix/wiki/Source-file-status-scoreboard
https://github.com/DoctorWkt/pdp7-unix/wiki/Unanswered-questions
+104 -7
View File
@@ -14,10 +14,11 @@ v means following moves are visible.
r means end, output label=x-b+number. r means end, output label=x-b+number.
All other commands are character pairs denoting y,x coordinates in a All other commands are character pairs denoting y,x coordinates in a
12x14 character raster. Draw a line to that coordinate. Vertical 14x16 character raster. Draw a line to that coordinate. Vertical
coordinates are a-l, and horizontal are a-m. aa is upper left and mn coordinates are a-p, and horizontal are a-n. aa is upper left and pn
is lower right. All characters end with a "x mn r" sequence to move is lower right. Characters reside on the base line from ma to mn
to the beginning of the next character. (characters like p and q descend below this line). All characters end
with a "x mn r" sequence to move to the beginning of the next character.
CAS OUTPUT CAS OUTPUT
@@ -27,7 +28,29 @@ The output for each character is:
The label x: The label x:
18-bit octal words. Each word is three 6-bit incremental moves. 18-bit octal words. Each word is three 6-bit incremental moves.
Each incremental move consists of three fields: a 2 bit distance field,
a 1 bit visibility field, a 3 bit direction field.
If the visibility field is a 0 nothing is drawn, if it is a 1 a line is
drawn. The distance field + 1 denotes how many pixels to move in a certain
direction. The 2 bit direction field is limited to values in the range 0..3,
but by adding 1, the actual distances denoted are in the range 1..4.
The 3 bit direction field with values in the range 0..7 is to be interpreted
according to this diagram and table:
y
^ value direction
7 0 1 ----- ---------
| 0 up
| 1 up right
| 2 right
6---+---2>x 3 down right
| 4 down
| 5 down left
| 6 left
5 4 3 7 up left
label=x-b+number. Number is 01, six bits saying how many moves, and label=x-b+number. Number is 01, six bits saying how many moves, and
10 zeroes. 10 zeroes.
@@ -49,9 +72,30 @@ Input:
mn mn
r r
This character is labelled "lbk" (left bracket). Move invisibly to This character is labeled "lbk" (left bracket). Move invisibly to
"ai" near upper right. Draw line left to "af". Draw down to "mf". "ai" near upper right. Draw line left to "af". Draw down to "mf".
Draw right to "mj". Invisibly move to "mn" beoynd lower right. End. Draw right to "mj". Invisibly move to "mn" beyond lower right. End.
This can be interpreted in a grid starting a location ma (row m, column a)
denoted by a 0, and each succeeding move indicated by an increasing number:
abcdefghijklmn
a.....2..1.....
b..............
c..............
d..............
e..............
f..............
g..............
h..............
i..............
j..............
k..............
l..............
m0....3...4...5
n..............
o..............
p..............
Output: Output:
@@ -69,3 +113,56 @@ means draw down four steps. 72 means draw left four steps. 62 means
move left four steps. move left four steps.
0236000 means there are 15 moves, or 6-bit bytes. 0236000 means there are 15 moves, or 6-bit bytes.
0236000 in binary is 010011110000000000, and shifting this value
10 bits to the right gives 01001111, where only the 6 least significant
bits indicate the number of moves, i.e. 001111 or 15 in decimal.
The following explanation separates out each move onto its own line.
Further it decodes each move into binary, and separates out and interprets
the three distance, visibility and direction fields. Finally each line
ends with a comment indicating which input command generated the output move:
move move move dist vis direc dist vis direc input
number octal binary binary binary binary decimal text text command
------ ----- ------ ------ ------ ------ ------- ---- ---- -------
1 001 000001 00 0 001 1 false up right ai
2 001 000001 00 0 001 1 false up right ai
3 001 000001 00 0 001 1 false up right ai
4 001 000001 00 0 001 1 false up right ai
5 001 000001 00 0 001 1 false up right ai
6 001 000001 00 0 001 1 false up right ai
7 001 000001 00 0 001 1 false up right ai
8 001 000001 00 0 001 1 false up right ai
9 060 110000 11 0 000 4 false up ai
a 056 101110 10 1 110 3 true left v af
b 074 111100 11 1 100 4 true down mf
c 074 111100 11 1 100 4 true down mf
d 074 111100 11 1 100 4 true down mf
e 072 111010 11 1 010 4 true right mj
f 062 110010 11 0 010 4 false right x mn
This can be interpreted on a grid by starting at ma (row n, column a)
denoted by a 0 and following the moves denoted by their corresponding
move number. Note that after the final move, f, the location being
outside of the character box corresponds to the location ma of the
next character to the right. To the right is the same character where
x:s denote drawn pixels and . denote undrawn pixels.
abcdefghijklmn abcdefghijklmn
a.....a..9..... a.....xxxx.....
b.............. b.....x........
c.............. c.....x........
d.............. d.....x........
e.....b..8..... e.....x........
f.......7...... f.....x........
g......6....... g.....x........
h.....5........ h.....x........
i....4c........ i.....x........
j...3.......... j.....x........
k..2........... k.....x........
l.1............ l.....x........
m0....d...e...f m.....xxxxx....
n.............. n..............
o.............. o..............
p.............. p..............
+2 -2
View File
@@ -8,8 +8,8 @@ https://www.tuhs.org/Archive/Distributions/Research/McIlroy_v0/
The files should be unaltered versions of the scanned pages. The files should be unaltered versions of the scanned pages.
Novell owns the rights to the Unix source code, so these files are probably Micro Focus owns the rights to the Unix source code, so these files are probably
(c) 1970 Novell. They are certainly not under the GPLv3 license. (c) 1970 Micro Focus. They are certainly not under the GPLv3 license.
For modified versions of these files, look in src/cmds and src/sys. For modified versions of these files, look in src/cmds and src/sys.
+1 -1
View File
@@ -593,7 +593,7 @@ transcd: 0
jms transch jms transch
isz c2 isz c2
jmp 1b jmp 1b
jmp transch i jmp transcd i
transch: 0 transch: 0
lmq lmq
+6 -1
View File
@@ -1,3 +1,4 @@
"** 06-5-12.pdf page 7
" bc " bc
jmp start jmp start
@@ -60,6 +61,7 @@ trace: 0
jmp trace i jmp trace i
dtrace: 0 dtrace: 0
"** 06-5-12.pdf page 8
lac pc lac pc
dac 8 dac 8
lac 8 i lac 8 i
@@ -121,6 +123,7 @@ dspblk: 0
dac t1 dac t1
dzm t2 dzm t2
1: 1:
"** 06-5-12.pdf page 9
lac t1 lac t1
sna sna
jmp 1f jmp 1f
@@ -182,6 +185,7 @@ histog: 0
tad histbuf tad histbuf
dac t1 dac t1
isz t1 i isz t1 i
"** 06-5-12.pdf page 10
jmp histog i jmp histog i
jmp . jmp .
@@ -209,7 +213,7 @@ olddp: 0
dspbuf: 0 dspbuf: 0
dspbp: 0 dspbp: 0
instr: 0 instr: 0
obs: 0 pbs: 0
inslitr: n 5 inslitr: n 5
insasg: b 1 insasg: b 1
o17: 017 o17: 017
@@ -243,6 +247,7 @@ badsp:
badasgn: badasgn:
jms flush jms flush
lac d1 lac d1
"** 06-5-12.pdf page 11
sys write; mas; mass sys write; mas; mass
jmp stop jmp stop
mpc: mpc:
+9 -2
View File
@@ -1,3 +1,4 @@
"** 06-5-12.pdf page 12
" bi " bi
start: start:
@@ -60,6 +61,7 @@ binop:
tad .+3 tad .+3
dac .+1 dac .+1
jmp .. i jmp .. i
"** 06-5-12.pdf page 13
jmp . i jmp . i
basg; bor; band; beq; bne; ble; blt; bge; bgt; brsh; blsh basg; bor; band; beq; bne; ble; blt; bge; bgt; brsh; blsh
badd; bmin; bmod; bmul; bdiv badd; bmin; bmod; bmul; bdiv
@@ -121,6 +123,7 @@ blt:
bge: bge:
lac t1 i lac t1 i
cma cma
"** 06-5-12.pdf page 14
tad t2 i tad t2 i
spa cla spa cla
lac d1 lac d1
@@ -182,6 +185,7 @@ bdiv:
consop: consop:
lac sp lac sp
"** 06-5-12.pdf page 15
tad d1 tad d1
dac sp i dac sp i
isz sp isz sp
@@ -243,6 +247,7 @@ call:
lac 8 i lac 8 i
dac t1 dac t1
lac t1 i lac t1 i
"** 06-5-12.pdf page 16
dac 9 i dac 9 i
isz 8 isz 8
-1 -1
@@ -303,6 +308,7 @@ goto:
tad t1 i tad t1 i
dac pc dac pc
jmp fetch jmp fetch
"** 06-5-12.pdf page 17
retrn: retrn:
-2 -2
@@ -365,6 +371,7 @@ unaop:
uadr; umin; uind; unot uadr; umin; uind; unot
uadr: uadr:
"** 06-5-12.pdf page 18
lac t1 lac t1
dac t3 i dac t3 i
jmp fetch jmp fetch
@@ -426,8 +433,8 @@ t4: 0
addr: 0 addr: 0
pc = 017 pc = 017
"** 06-5-12.pdf page 19
sp: stack sp: stack
dp: stack dp: stack
ap: stack ap: stack
stack: 0 stack: 0
+5 -1
View File
@@ -1,3 +1,4 @@
"** 06-5-12.pdf page 3
" bl " bl
jmp start jmp start
@@ -60,6 +61,7 @@ getc: 0
lac cibufp lac cibufp
sad eibufp sad eibufp
jmp 1f jmp 1f
"** 06-5-12.pdf page 4
lac cibufp i lac cibufp i
and o777 and o777
dac iflg dac iflg
@@ -121,6 +123,7 @@ stop:
flush: 0 flush: 0
lac oflg lac oflg
sza sza
"** 06-5-12.pdf page 5
isz cobufp isz cobufp
lac cobufp lac cobufp
cma cma
@@ -182,6 +185,7 @@ initio: 0
.fin: 0 .fin: 0
.fout: 1 .fout: 1
eibufp: 0 eibufp: 0
"** 06-5-12.pdf page 6
cibufp: 0 cibufp: 0
iflg: 0 iflg: 0
eobufp: 0 eobufp: 0
@@ -191,4 +195,4 @@ lastv: 017770
o777: 0777 o777: 0777
d4:o4: 4 d4:o4: 4
d8: 8 d8: 8
+3
View File
@@ -1,3 +1,4 @@
"** 06-5-12.pdf page 21
" cat " cat
lac 017777 i lac 017777 i
@@ -60,6 +61,7 @@ done:
and d1 and d1
sna cla sna cla
jmp 1f jmp 1f
"** 06-5-12.pdf page 22
jms putc jms putc
jmp done jmp done
1: 1:
@@ -121,6 +123,7 @@ putc: 0
sad d128 sad d128
skp skp
jmp putc i jmp putc i
"** 06-5-12.pdf page 23
lac fo lac fo
sys write; iopt+1; 64 sys write; iopt+1; 64
lac iopt lac iopt
+8 -2
View File
@@ -1,3 +1,4 @@
"** 06-5-12.pdf page 25
" check " check
lac d1 lac d1
@@ -60,6 +61,7 @@ iloop:
lac iflags lac iflags
and o40 and o40
sza sza
"** 06-5-12.pdf page 26
jmp iloop jmp iloop
law idskps law idskps
dac t1 dac t1
@@ -121,6 +123,7 @@ dupcheck: 0
lac d1 lac d1
2: alss 0 2: alss 0
dac bit dac bit
"** 06-5-12.pdf page 27
lac i t6 lac i t6
and bit and bit
sza sza
@@ -170,7 +173,7 @@ print: 0
part2: part2:
lac icnt lac icnt
jmp print jms print
lac d1 lac d1
sys write; m3; m3s sys write; m3; m3s
lac licnt lac licnt
@@ -182,6 +185,7 @@ part2:
lac d1 lac d1
sys write; m5; m5s sys write; m5; m5s
lac blcnt lac blcnt
"** 06-5-12.pdf page 28
jms print jms print
lac d1 lac d1
sys write; m6; m6s sys write; m6; m6s
@@ -243,6 +247,7 @@ part3:
cla cla
llss 4 llss 4
tad alsscom tad alsscom
"** 06-5-12.pdf page 29
dac 2f dac 2f
lac d1 lac d1
2: alss 0 2: alss 0
@@ -304,6 +309,7 @@ t1: 0
t2: 0 t2: 0
t3: 0 t3: 0
t4: 0 t4: 0
"** 06-5-12.pdf page 30
t5: 0 t5: 0
t6: 0 t6: 0
@@ -321,4 +327,4 @@ linode: .=.+12
iflags = linode iflags = linode
idskps = iflags+1 idskps = iflags+1
usetab: .=.+500 usetab: .=.+500
prbuf: .=.+6 prbuf: .=.+6
+20
View File
@@ -1,3 +1,4 @@
"** 07-13-19.pdf page 2
" db " db
narg = ..+07777 narg = ..+07777
@@ -60,6 +61,7 @@ wcorep: corename; 1
" "
lac o52012 lac o52012
jms wchar jms wchar
"** 07-13-19.pdf page 3
law dotdot law dotdot
dac nsearch dac nsearch
jms nlsearch jms nlsearch
@@ -121,6 +123,7 @@ cmd:
jmp saddress jmp saddress
sad o75 sad o75
jmp address jmp address
"** 07-13-19.pdf page 4
sad o57 sad o57
jmp octal jmp octal
sad o72 sad o72
@@ -182,6 +185,7 @@ saddress:
lac 9f lac 9f
dac curdot dac curdot
jmp mloop jmp mloop
"** 07-13-19.pdf page 5
9:0 9:0
" "
symbol: symbol:
@@ -243,6 +247,7 @@ print:
spa spa
jmp error jmp error
lac rcore lac rcore
"** 07-13-19.pdf page 6
sys read; inbuf; 64 sys read; inbuf; 64
spa spa
jmp error jmp error
@@ -304,6 +309,7 @@ prdec: "temp
proct:0 proct:0
jms octw jms octw
6 6
"** 07-13-19.pdf page 7
jmp i proct jmp i proct
" "
patch: patch:
@@ -365,6 +371,7 @@ getexp:0
xloop: xloop:
jms rch jms rch
lmq lmq
"** 07-13-19.pdf page 8
sad o44 sad o44
skp skp
jmp 1f jmp 1f
@@ -426,6 +433,7 @@ xloop:
lac o40 lac o40
sad rator sad rator
skp skp
"** 07-13-19.pdf page 9
jmp error jmp error
lacq lacq
dac rator dac rator
@@ -487,6 +495,7 @@ spcai:
lac d1 lac d1
dac reloc dac reloc
jmp i getspec jmp i getspec
"** 07-13-19.pdf page 10
" "
getsym:0 getsym:0
lmq lmq
@@ -548,6 +557,7 @@ skipt:
spa spa
jmp 2f jmp 2f
1: 1:
"** 07-13-19.pdf page 11
lac nchar1 lac nchar1
tad om101 tad om101
spa spa
@@ -609,6 +619,7 @@ num1:
jmp i getnum jmp i getnum
tad om10 tad om10
sma sma
"** 07-13-19.pdf page 12
jmp i getnum jmp i getnum
lac nchar1 lac nchar1
dzm nchar1 dzm nchar1
@@ -670,6 +681,7 @@ prsym:0
dac word dac word
dzm relflg dzm relflg
dzm relocflg dzm relocflg
"** 07-13-19.pdf page 13
dzm nsearch dzm nsearch
and o760000 and o760000
sad o760000 sad o760000
@@ -731,6 +743,7 @@ pr1:
tad d1 tad d1
dac addr dac addr
lac o55 lac o55
"** 07-13-19.pdf page 14
jms wchar jms wchar
jmp 2f jmp 2f
1: 1:
@@ -792,6 +805,7 @@ peae:
jmp i prsym jmp i prsym
1: 1:
law eaes law eaes
"** 07-13-19.pdf page 15
dac addr dac addr
jmp nfnd jmp nfnd
" "
@@ -853,6 +867,7 @@ pcal:
law syss law syss
jms wrname jms wrname
lac o40 lac o40
"** 07-13-19.pdf page 16
jms wchar jms wchar
lac addr lac addr
jms wrname jms wrname
@@ -914,6 +929,7 @@ nloop:
lacq lacq
tad d3 tad d3
dac np dac np
"** 07-13-19.pdf page 17
lac i np lac i np
sna sna
jmp nloop jmp nloop
@@ -975,6 +991,7 @@ testn:
skp skp
jmp nloop jmp nloop
isz minp isz minp
"** 07-13-19.pdf page 18
isz inbuf isz inbuf
isz value isz value
jmp 1b jmp 1b
@@ -1036,6 +1053,7 @@ nlerr:
" "
rch:0 rch:0
lac nchar1 lac nchar1
"** 07-13-19.pdf page 19
dzm nchar1 dzm nchar1
sza sza
jmp i rch jmp i rch
@@ -1097,6 +1115,7 @@ d12:12
d8:8 d8:8
d3:3 d3:3
o177:0177 o177:0177
"** 07-13-19.pdf page 20
o136: 0136 o136: 0136
o45: 045 o45: 045
sysflag: 0 sysflag: 0
@@ -1158,6 +1177,7 @@ nchar1:0
nchar:0 nchar:0
o177000:0177000 o177000:0177000
o56040:056040 o56040:056040
"** 07-13-19.pdf page 21
nsearch:0 nsearch:0
word:0 word:0
relflg:0 relflg:0
+7 -2
View File
@@ -1,3 +1,4 @@
"** 07-13-19.pdf page 23
" dmabs " dmabs
lac o17 lac o17
@@ -60,6 +61,7 @@ dump2:
dump3: dump3:
-1 -1
tad bufp tad bufp
"** 07-13-19.pdf page 24
dac 8 dac 8
-64 -64
dac c1 dac c1
@@ -121,6 +123,7 @@ dump4:
done: done:
lac tracmd lac tracmd
jms put jms put
"** 07-13-19.pdf page 25
cla cla
jms put jms put
lac oldsum lac oldsum
@@ -182,6 +185,7 @@ boot:
2: 2:
jms get1-boot+org jms get1-boot+org
dac cmd-boot+org dac cmd-boot+org
"** 07-13-19.pdf page 26
jms get1-boot+org jms get1-boot+org
cma cma
dac cnt-boot+org dac cnt-boot+org
@@ -231,7 +235,7 @@ mes:
comand: 0 comand: 0
tracmd: 0 tracmd: 0
d1: 1 d1: 1
.17777: 017777 o17777: 017777
o77: 077 o77: 077
o200: 0200 o200: 0200
o300: 0300 o300: 0300
@@ -243,6 +247,7 @@ punout: <pp>;<to>;<ut>;040040
o17: 017 o17: 017
fi: 0 fi: 0
"** 07-13-19.pdf page 27
fo: 0 fo: 0
count: 0 count: 0
oldsum: 0 oldsum: 0
@@ -253,4 +258,4 @@ initcmd: dac 0
c1: 0 c1: 0
buf: buf:
iot = 0700000 iot = 0700000
+12 -4
View File
@@ -1,3 +1,4 @@
"** 07-13-19.pdf page 30
" ds " ds
lac 017777 i lac 017777 i
@@ -60,12 +61,13 @@ loop:
lac i1 i lac i1 i
sad ddfilp i sad ddfilp i
jmp 2f jmp 2f
"** 07-13-19.pdf page 31
isz i1 isz i1
isz c1 isz c1
jmp 1b jmp 1b
lac ddfilp lac ddfilp
tad i1 tad d1
dac i1 dac i1
lac i1 i lac i1 i
dac .+3 dac .+3
@@ -109,7 +111,7 @@ loop:
dzm fflg dzm fflg
law fbuf law fbuf
dac i2 dac i2
r1 -1
tad nfiles tad nfiles
cma cma
dac c2 dac c2
@@ -120,10 +122,11 @@ loop:
sad i2 i sad i2 i
skp skp
jmp 3f jmp 3f
"** 07-13-19.pdf page 32
-1 -1
tad i1 tad i1
dac i3 dac i3
iac i3 i lac i3 i
dac c3 dac c3
law fbuf law fbuf
dac i3 dac i3
@@ -181,6 +184,7 @@ loop:
jms putname; scrname jms putname; scrname
jms putname; dd jms putname; dd
law 012 law 012
"** 07-13-19.pdf page 33
jms putc jms putc
3: 3:
@@ -242,6 +246,7 @@ longout: 0
lac statbuf+10 lac statbuf+10
jms octal; -5 jms octal; -5
jmp longout i jmp longout i
"** 07-13-19.pdf page 34
readdir: 0 readdir: 0
law 012 law 012
@@ -303,6 +308,7 @@ readdir: 0
lac i1 lac i1
dac 8 dac 8
lac 8 i lac 8 i
"** 07-13-19.pdf page 35
dac fsopt i dac fsopt i
isz fsopt isz fsopt
lac 8 i lac 8 i
@@ -364,6 +370,7 @@ octal: 0
jmp 1b jmp 1b
lac octal i lac octal i
dac c dac c
"** 07-13-19.pdf page 36
1: 1:
ecla llss 3 ecla llss 3
tad o60 tad o60
@@ -425,6 +432,7 @@ putc: 0
spa spa
jmp 1f jmp 1f
lac 2f i lac 2f i
"** 07-13-19.pdf page 37
xor 2f+1 xor 2f+1
jmp 3f jmp 3f
1: 1:
@@ -486,6 +494,7 @@ ddfilp: .=.+1
ddfiles: .=.+1 ddfiles: .=.+1
statbuf: .=.+13 statbuf: .=.+13
c: .=.+1 c: .=.+1
"** 07-13-19.pdf page 38
i1: .=.+1 i1: .=.+1
i2: .=.+1 i2: .=.+1
i3: .=.+1 i3: .=.+1
@@ -498,4 +507,3 @@ fsopt: .=.+1
fsobuf: .=.+64 fsobuf: .=.+64
dbuf: .=.+100 dbuf: .=.+100
fbuf: fbuf:
+3 -1
View File
@@ -1,3 +1,4 @@
"** 07-13-19.pdf page 42
" dskio " dskio
dskrd0: 0 dskrd0: 0
@@ -60,6 +61,7 @@ iskio: 0
dssf dssf
jmp .-1 jmp .-1
dsrs dsrs
"** 07-13-19.pdf page 43
sma sma
jmp 1f jmp 1f
isz 3f isz 3f
@@ -75,4 +77,4 @@ o200000: 0200000
dskbufp: dskbuf dskbufp: dskbuf
side: .=.+1 side: .=.+1
dskbuf: .=.+640 dskbuf: .=.+640
+2 -1
View File
@@ -1,3 +1,4 @@
"** 07-13-19.pdf page 41
" dskres " dskres
iof iof
@@ -23,4 +24,4 @@
track: 0 track: 0
c1: 0 c1: 0
d10: 10 d10: 10
+1
View File
@@ -1,3 +1,4 @@
"** 07-13-19.pdf page 40
" dsksav " dsksav
iof iof
+6 -3
View File
@@ -1,6 +1,7 @@
"** 08-rest.pdf page 8 "** 08-rest.pdf page 8
"[handwritten page number top right of scan - 1] "[handwritten page number top right of scan - 1]
" ed1 " ed1
lac d1 lac d1
sys write; 1f; 3 sys write; 1f; 3
lac o17 lac o17
@@ -32,6 +33,7 @@
jmp advanc jmp advanc
1: 1:
<ed>; <it>; 012 <ed>; <it>; 012
advanc: advanc:
jms rline jms rline
lac linep lac linep
@@ -92,6 +94,7 @@ comand:
sad o75 sad o75
jmp ceq jmp ceq
jmp error jmp error
ca: ca:
jms newline jms newline
jms setfl jms setfl
@@ -149,7 +152,7 @@ cp1:
lac d1 lac d1
sys write; line; 2: 0 sys write; line; 2: 0
lac addr1 lac addr1
sad addr1 sad addr2
jmp advanc jmp advanc
tad d1 tad d1
dac addr1 dac addr1
@@ -216,6 +219,7 @@ cr:
isz c1 isz c1
jmp 2b jmp 2b
jmp 1b jmp 1b
cw: cw:
jms setfl jms setfl
lac i addr1 lac i addr1
@@ -246,7 +250,7 @@ cw:
sna sna
jmp 3f jmp 3f
isz num isz num
jmp putsc; tal1 jms putsc; tal1
isz c2 isz c2
"** 08-rest.pdf page 12 "** 08-rest.pdf page 12
"[handwritten page number top right of scan - 5] "[handwritten page number top right of scan - 5]
@@ -710,7 +714,6 @@ addline: 0
jmp 1b jmp 1b
jmp i addline jmp i addline
getdsk: 0 "[the entire getdsk procedure was surrounded getdsk: 0 "[the entire getdsk procedure was surrounded
and o776000 " by a box that was Xed out]: and o776000 " by a box that was Xed out]:
sad diskin " -- sad diskin " --
+4 -3
View File
@@ -81,6 +81,7 @@ cs:
skp skp
jmp 3b jmp 3b
jms addline jms addline
2: 2:
lac addr1 lac addr1
sad addr2 sad addr2
@@ -201,7 +202,7 @@ cadvanc:
"sad o52 "sad o52
"jmp clsure "jmp clsure
dac 1f dac 1f
jmp comp jms comp
1; jms matchar; 1: 0; 0 1; jms matchar; 1: 0; 0
jmp cadvanc jmp cadvanc
@@ -341,7 +342,7 @@ found: 0
jmp 2f jmp 2f
jmp 3f jmp 3f
1: "??? 1: "???
lac charno lac lchrno
cma cma
tad charno tad charno
spa spa
@@ -515,5 +516,5 @@ line: .=.+64
nlist: .=.+50 nlist: .=.+50
clist: .=.+50 clist: .=.+50
compbuf: .=.+100 compbuf: .=.+100
dskbuf: .=.+1 "[line crossed out - scan markup] dskbuf: .=.+1024 "[line crossed out - scan markup]
lnodes: .=.+1000 lnodes: .=.+1000
+30 -29
View File
@@ -1,4 +1,5 @@
"** 09-1-35.pdf page 1 "** 09-1-35.pdf page 1
"[handwritten in the top center of scan - fop.s ]
jms = 0100000 jms = 0100000
" "
q:0 q:0
@@ -86,49 +87,49 @@ fdv = jms q
lac hms lac hms
sna sna
sys save sys save
ral ral "[box drawn around instruction - scan markup]
dac 2f dac 2f "[separate box around the three dac instructions - scan markup]
dac 3f dac 3f
dac 4f dac 4f
-1 -1
tad hexp tad hexp "[-\ - scan markup]
cma cma "[ | delta aep??? - scan markup]
tad aexp tad aexp "[ | - scan markup]
dac aexp dac aexp "[-/ / Ams \ - scan markup]
lac ans lac ans "[hand written to the right: Rem | --- | Hls??? - scan markup]
lmq lmq "[ \ Hms / ----- - scan markup]
lac ams lac ams "[circle around ams ---------- Hms - scan markup]
sna cll sna cll "[ Hms - scan markup]
jmp 8f jmp 8f
div div
2:0 2:0
szl szl
sys save sys save
dac ce10 dac ce10 "[arrow pointing from ce10 to "REm" +-----+-----+ - scan markup]
lacq lacq "[ handwritten to the right: | A |+ B | - scan markup]
dac 5f dac 5f "[circle around 5f +-----+-----+ - scan markup]
lac ce10 lac ce10 "[ | C |+ D | - scan markup]
frdiv frdiv "[ +-----+-----+ - scan markup]
3:0 3:0 "[line from 3:0 to a circled "Hms" - scan markup]
szl szl
sys save sys save
lacq lacq
dac ce10 dac ce10 "[line from ce10 to text "Q1" - scan markup]
lac hls lac hls
and o377777 and o377777
frdiv frdiv "[ X - scan markup]
4:0 4:0 "[handwritten to the right: ----- - scan markup]
szl szl "[ A+B - scan markup]
sys save sys save
lacq lacq
dac 2b dac 2b "[circle around 2b with arrow pointing to the right
spa cla spa cla
"** 09-1-35.pdf page 3 "** 09-1-35.pdf page 3
-1 -1 "[vertical line to the right of instructions... - scan markup]
tad 2b tad 2b
cll cll "[underlined ...vertical line ends here - scan markup]
mul mul
5:0 5:0 "[line from 5:0 to "Q" - scan markup]
dzm 2b dzm 2b
spa spa
isz 2b isz 2b
@@ -139,11 +140,11 @@ fdv = jms q
isz 3b isz 3b
skp skp
isz 2b isz 2b
lac ce10 lac ce10 "[lac ce10 circled - scan markup]
lmq lmq
lac 3b lac 3b
sna sna
jmp 6f jmp 6f "[arrow pointing down starts to the right of 6f - scan markup]
cma cma
tad d1 tad d1
stl stl
@@ -151,7 +152,7 @@ fdv = jms q
lmq lmq
szl szl
isz 2b isz 2b
6:lac 2b 6:lac 2b "[arrow above points to between this instruction and the next one - scan markup]
sma sma
tad d1 tad d1
tad 5b tad 5b
@@ -724,7 +725,7 @@ sqrt = jms q
xor o200000 xor o200000
xor o400000 xor o400000
dac 1f dac 1f
lac ams lac ams "[a centered dot drawn after ams - scan markup]
frdiv; 1:.. frdiv; 1:..
szl szl
clq clq
@@ -778,7 +779,7 @@ sres: 0;0;0
rsign: 0 rsign: 0
sign: 0 sign: 0
fp1: 1;0200000; 0 fp1: 1;0200000;0
o400000: 0400000 o400000: 0400000
o640500: 0640500 o640500: 0640500
+12 -7
View File
@@ -1,19 +1,20 @@
" init " init
"** 07-13-19.pdf page 47
-1 -1
sys intrp sys intrp
jms init1 jms init1
jms init2 jms init2
1: l:
sys rmes sys rmes
sad pid1 sad pid1
jmp 1f jmp 1f
sad pid2 sad pid2
jms init2 jms init2
jmp 1 jmp l
1: 1:
jms init1 jms init1
jmp 1 jmp l
init1: 0 init1: 0
sys fork sys fork
@@ -52,7 +53,7 @@ login:
dac 9 dac 9
2: 2:
lac 8 i lac 8 i
sac o12 sad o12
lac o72 lac o72
sad 9 i sad 9 i
skp skp
@@ -60,6 +61,7 @@ login:
sad o72 sad o72
skp skp
jmp 2b jmp 2b
"** 07-13-19.pdf page 48
lac 9 i lac 9 i
sad o72 sad o72
jmp 1f jmp 1f
@@ -120,6 +122,7 @@ login:
cll; als 3 cll; als 3
omq omq
dac nchar dac nchar
"** 07-13-19.pdf page 49
jmp 1b jmp 1b
2: 2:
lac nchar lac nchar
@@ -181,6 +184,7 @@ rline: 0
sad 8 sad 8
jmp 1b jmp 1b
-1 -1
"** 07-13-19.pdf page 50
tad 8 tad 8
dac 8 dac 8
jmp 1b jmp 1b
@@ -225,7 +229,7 @@ gchar: 0
lac bufp lac bufp
dac tal dac tal
lac d2 lac d2
sys tead; buf; 64 sys read; buf; 64
sna sna
jmp error jmp error
jmp gchar+1 jmp gchar+1
@@ -238,10 +242,11 @@ error:
sys exit sys exit
m1: m1:
012; <lo>;<gi>;<n;<:;< 012;<lo>;<gi>;<n;<:;<
m1s = .-m1 m1s = .-m1
m2: m2:
<?; 012 <?; 012
"** 07-13-19.pdf page 51
m2s = .-m2 m2s = .-m2
m3: m3:
<pa>;<ss>;<wo>;<rd>;<: 040 <pa>;<ss>;<wo>;<rd>;<: 040
@@ -269,7 +274,7 @@ password:
d1: 1 d1: 1
o43: 043 o43: 043
o100: 0100 o100: 0100
o400000; 0400000 o400000: 0400000
d2: 2 d2: 2
o12: 012 o12: 012
om60: -060 om60: -060
+5 -6
View File
@@ -8,9 +8,9 @@
spa; jmp error; dac track spa; jmp error; dac track
tad dm10; sma; jmp error tad dm10; sma; jmp error
sysopen; a.out; 0 sys open; a.out; 0
spa; jmp error spa; jmp error
sys read; bufp; buf; 3072 sys read; bufp: buf; 3072
sad .-1 sad .-1
jmp error jmp error
@@ -18,7 +18,7 @@
-3072; dslw -3072; dslw
lac bufp; dslm lac bufp; dslm
lac track; alss 8; xor o300000; dsld lac track; alss 8; xor o300000; dsld
lac o30000; dsls lac o3000; dsls
dssf; jmp .-1 dssf; jmp .-1
dsrs; spa; jmp error dsrs; spa; jmp error
-1024; dslw -1024; dslw
@@ -35,10 +35,10 @@ error:
1: 077077;012 1: 077077;012
dm10: -10 dm10: -10
dm5: 5 d5: 5
om60: -060 om60: -060
o300000: 0300000 o300000: 0300000
o300100: 0300110 o300110: 0300110
d8: 8 d8: 8
d3072: 3072 d3072: 3072
o3000: 03000 o3000: 03000
@@ -49,4 +49,3 @@ a.out:
track: .=.+1 track: .=.+1
buf: buf:
+1 -1
View File
@@ -181,7 +181,7 @@ loop:
dac ball1+vx dac ball1+vx
2: 2:
lac toptest lac toptest
tad ball1+vy tad ball1+y
spa spa
jmp 2f jmp 2f
jms pockettb jms pockettb
+18 -18
View File
@@ -9,24 +9,24 @@
tad d1 tad d1
dac .pbp1 dac .pbp1
restart: restart:
fld; arg1 fld; arg1 "[ g = arg1 - scan markup]
fst; g fst; g "[ fact = arg2 - scan markup]
fld; arg2 fld; arg2 "[ d = 1.0 - scan markup]
fst; fact fst; fact "[ z = 0 - scan markup]
fld; fp01 fld; fp01 "[ oldx = 0 - scan markup]
fst; d fst; d "[ oldy = 0 - scan markup]
jms capture jms capture "[loop: - scan markup]
-100 -100 "[ b = z - 110. - scan markup]
dac j dac j "[ ---------- - scan markup]
fld; fp0 fld; fp0 "[ radians - scan markup]
fst; z fst; z "[ z = z + g - scan markup]
fst; oldx fst; oldx "[ g = -g * fact - scan markup]
fst; oldy fst; oldy "[ fact = 1 / fact - scan markup]
lac o400000 lac o400000 "[ xx = 500. * d * sin(b + pi/2) - scan markup]
dac i 11 dac i 11 "[ ni() - scan markup]
dac i 11 dac i 11 "[ yy = 500. * d * sin(b) - scan markup]
lac setx lac setx "[ ni() - scan markup]
dac i 10 dac i 10 "[ goto loop " an arrow points up to loop: above - scan markup]
lac sety lac sety
dac i 10 dac i 10
+3 -2
View File
@@ -116,7 +116,7 @@
lac u.base lac u.base
jms iget jms iget
lac ii lac ii
dzm d.i dac d.i
jms copy; name; d.name; 4 jms copy; name; d.name; 4
lac i.uniq lac i.uniq
dac d.uniq dac d.uniq
@@ -134,7 +134,7 @@
lac d1 lac d1
dac mode dac mode
jms access jms access
dac d.i dzm d.i
jms dput jms dput
lac u.base lac u.base
jms iget jms iget
@@ -166,6 +166,7 @@
dac mode dac mode
jms access jms access
jms copy; 1:0; d.name; 4 jms copy; 1:0; d.name; 4
jms dput
jmp okexit jmp okexit
.time: .time:
+5 -2
View File
@@ -70,7 +70,7 @@ lookfor: 0
isz u.rq+8 isz u.rq+8
dzm u.intflg dzm u.intflg
jmp sysexit jmp sysexit
t= t+1 t = t+1
badcal: badcal:
clon clon
@@ -258,6 +258,10 @@ rkbdi:
sad o134 sad o134
skp skp
jmp 2f jmp 2f
lacq
xor o40
lmq
jmp 2f
1: 1:
lacq lacq
xor o20 xor o20
@@ -291,7 +295,6 @@ wdspo:
jms swap jms swap
jmp wdspo jmp wdspo
rppti: rppti:
lac d4 lac d4
jms getchar jms getchar
+1 -1
View File
@@ -317,7 +317,7 @@ cskp:
lac 9f+t+3 lac 9f+t+3
jms dskwr jms dskwr
4: 4:
"** 01-s1.pdf page 38 "** 01-s1.pdf page 39
lac 9f+t+2 lac 9f+t+2
jmp iread i jmp iread i
3: 3:
+2 -2
View File
@@ -92,9 +92,9 @@ dsprestart:
dac .dsptm dac .dsptm
jmp piret jmp piret
1: sna ral 1: sma ral
jmp .+3 jmp .+3
dpcf raef
jmp piret jmp piret
sma sma
jmp 1f jmp 1f
+4 -4
View File
@@ -95,7 +95,7 @@ dm1: -1
9: .=.+t 9: .=.+t
c1: .=.+1 c1: .=.+1
q1: q2;q2+90 "** ?? 98 ?? q1: q2;q2+98
.=.+14 .=.+14
q2: q2:
.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0 .+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0;.+2;0
@@ -107,7 +107,7 @@ dsploc: .=.+1
dsplno: .=.+1 dsplno: .=.+1
dspbuf: dspbuf:
0065057;0147740;0160000 0065057;0147740;0160000
.=.+30 . = . + 30
coldentry: coldentry:
dzm 0100 " not re-entrant dzm 0100 " not re-entrant
caf caf
@@ -178,7 +178,7 @@ ulist:
userdata: userdata:
u.ac: 0 u.ac: 0
u.mq: 0 u.mq: 0
u.rq: .=.+9 u.rg: .=.+9
u.uid: -1 u.uid: -1
u.pid: 1 u.pid: 1
u.cdir: 3 u.cdir: 3
@@ -200,7 +200,7 @@ inode:
i.nlks: .=.+1 i.nlks: .=.+1
i.size: .=.+1 i.size: .=.+1
i.uniq: .=.+1 i.uniq: .=.+1
.= inode+12 . = inode+12
di: .=.+1 di: .=.+1
dnode: dnode:
d.i: .=.+1 d.i: .=.+1
+6 -7
View File
@@ -25,26 +25,27 @@ sma = 0740100
sza = 0740200 sza = 0740200
snl = 0740400 snl = 0740400
skp = 0741000 skp = 0741000
spa = 0741100
sna = 0741200 sna = 0741200
szl = 0741400 szl = 0741400
rtl = 0742010 rtl = 0742010
rtr = 0742020 rtr = 0742020
cil = 0744000 cll = 0744000
rcl = 0744010 rcl = 0744010
rcr = 0744020 rcr = 0744020
cia = 0750000 cla = 0750000
lrs = 0640500 lrs = 0640500
lrss = 0660500 lrss = 0660500
lls = 0640600 lls = 0640600
llss = 0660600 llss = 0660600
als = 0640700 als = 0640700
alss = 0660700 alss = 0660700
mul = 0653323 mul = 0653122
idiv = 0653323 idiv = 0653323
lacq = 0641002 lacq = 0641002
clq = 0650000 clq = 0650000
omq = 0650002 omq = 0640002
cmq = 0650004 cmq = 0640004
lmq = 0652000 lmq = 0652000
dscs = 0707141 dscs = 0707141
@@ -60,7 +61,6 @@ ion = 0700042
caf = 0703302 caf = 0703302
clon = 0700044 clon = 0700044
clsf = 0700001 clsf = 0700001
"** 01-s1.pdf page 63 "** 01-s1.pdf page 63
clof = 0700004 clof = 0700004
ksf = 0700301 ksf = 0700301
@@ -94,4 +94,3 @@ dpcf = 0704761
dprc = 0704712 dprc = 0704712
crsf = 0706701 crsf = 0706701
crrb = 0706712 crrb = 0706712
+13 -13
View File
@@ -3,7 +3,7 @@
t = 0 t = 0
start: start: "[------ stuff for gravity - scan markup]
law 13 law 13
sys sysloc sys sysloc
dac .pbson dac .pbson
@@ -40,9 +40,9 @@ start:
dzm .pbsint dzm .pbsint
dzm forflg dzm forflg
dzm bacflg dzm bacflg
dzm dspflg dzm dspflg "[line connecting this instruction to... - scan markup]
dzm locflg dzm locflg
dzm locpar dzm locpar "[... this instruction - scan markup]
lac d1 lac d1
dac par dac par
jms dispname jms dispname
@@ -68,13 +68,13 @@ start:
loop: loop:
law dspl-1 law dspl-1
dac clistp dac clistp
jms contrl jms contrl "[arrow from below points to this instruction - scan markup]
lac par lac par
jms absxy jms absxy
jms shipxy jms shipxy
lac goflg lac goflg
spa spa
jmp loop3 jmp loop3 "[long dash after loop3 - scan markup]
fld; fpzero fld; fpzero
fst; ax fst; ax
fst; ay fst; ay
@@ -107,8 +107,8 @@ loop2:
sma sma
jms updshp jms updshp
loop3: loop3:
fld; horizv fld; horizv "[a box enclosing all code from loop3 to loop4 - scan markup]
lac scale lac scale "[arrow drawn from box up to location above - scan markup]
cma cma
tad vscale tad vscale
tad aexp tad aexp
@@ -116,12 +116,12 @@ loop3:
jms inscr jms inscr
jmp loop4 jmp loop4
tad o141577 tad o141577
dac i clistp dac i clistp "[crossed out with an arrow pointint to "dac dspvel" - scan markup]
lac o164372 lac o164372 "[crossed out - scan markup]
dac clistp i dac clistp i "[crossed out - scan markup]
cla cla "[crossed out - scan markup]
jms dsplanet jms dsplanet "[crossed out - scan markup]
loop4: loop4: "[inside a drawn box - scan markup]
sys time "put delay here..... sys time "put delay here.....
"** 12-92-119.pdf page 3 "** 12-92-119.pdf page 3
dzm dispcl dzm dispcl
+1 -1
View File
@@ -26,7 +26,7 @@ updshp: 0
sma sma
jmp .+3 jmp .+3
2: 2:
lac accflg lac accflg "[arrow pointing here from the text "how to set?" - scan markup]
sma sma
jmp .+3 jmp .+3
fad; maxa fad; maxa
+19 -19
View File
@@ -6,27 +6,27 @@ displa: 0
sad cplan sad cplan
skp skp
jmp 2f jmp 2f
lac locflg lac locflg "[arrow points here from the text "how to set?" - scan markup]
sma sma
jmp 1f jmp 1f
fld; cphi fld; cphi "[-\ - scan markup]
fmp; absy fmp; absy "[ | - scan markup]
fst; ftmp1 fst; ftmp1 "[ | - scan markup]
fld; sphi fld; sphi "[ | - scan markup]
fmp; absx fmp; absx "[ | - scan markup]
fad; ftmp1 fad; ftmp1 "[ | - scan markup]
fdv; dpar fdv; dpar "[ | - scan markup]
fst; stheta fst; stheta "[ \ lock calculation - scan markup]
fld; sphi fld; sphi "[ / - scan markup]
fmp; absy fmp; absy "[ | - scan markup]
fng fng "[ | - scan markup]
fst; ftmp1 fst; ftmp1 "[ | - scan markup]
fld; cphi fld; cphi "[ | - scan markup]
fmp; absx fmp; absx "[ | - scan markup]
fad; ftmp1 fad; ftmp1 "[ | - scan markup]
fdv; dpar fdv; dpar "[ | - scan markup]
fst; ctheta fst; ctheta "[ | - scan markup]
jmp 2f jmp 2f "[-/ - scan markup]
1: 1:
fld; sphi fld; sphi
fst; stheta fst; stheta
+2 -2
View File
@@ -152,7 +152,7 @@ dssca:
dsety 255 dsety 255
vecy 767 vecy 767
dsetx 127 dsetx 127
dsety 639 dsety 639 "[--- - scan markup]
vecx 767 vecx 767 "[an arrow starts between vecx and dspl, it points to the right - scan markup]
dspl: dspl:
0400000 0400000
+25 -18
View File
@@ -1,29 +1,30 @@
"** 01-s1.pdf page 57 -- system assembly map "** 01-s1.pdf page 57 -- system assembly map
. 004671 r . 004671 r
.ac 004012 r .ac 004102 r
.chown 000426 r .chown 000426 r
.close 000725 r
.capt 000404 r .capt 000404 r
.creat 000665 r .creat 000665 r
.chdir 000622 r .chdir 000622 r
.chmod 000414 r .chmod 000414 r
.dskb 004105 r .dskb 004105 r
.dspb 005547 r .dspb 005547 r
.dsptm 004104 r .dsptm 004104 r
.dske 004106 r .dske 004106 r
.exit 001170 r .exit 001170 r
.fork 001116 r .fork 001116 r
.getuid 000433 r .getuid 000433 r
.halt 001343 r .halt 001343 r
.int1 004100 r .int1 004100 r
.insys 004077 r .insys 004077 r
.int2 004101 r .int2 004101 r
.intrp 000257 r .intrp 000257 r
.link 000474 r .link 000474 r
.lpba 005550 r .lpba 005550 r
.open 000633 r .open 000633 r
.rmes 001204 r .rmes 001204 r
.rele 000410 r .rele 000410 r
.rename 000547 r .rename 000574 r
.read 000731 r .read 000731 r
.smes 001232 r .smes 001232 r
.savblk 004103 r .savblk 004103 r
@@ -45,7 +46,7 @@ badcal 001153 r
betwen 001654 r betwen 001654 r
c1 004270 r c1 004270 r
chkint 000320 r chkint 000320 r
chkink1 001546 r chkint1 001546 r
char 005522 r char 005522 r
cnop 003453 r cnop 003453 r
coldentr 004520 r coldentr 004520 r
@@ -60,7 +61,7 @@ d.name 005761 r
d.uniq 005765 r d.uniq 005765 r
d.i 005760 r d.i 005760 r
"** 01-s1.pdf page 58 "** 01-s1.pdf page 58
d0 004127 r d0 004127 r
d10 004141 r d10 004141 r
d1 004130 r d1 004130 r
d2 004131 r d2 004131 r
@@ -69,7 +70,7 @@ d3 004132 r
d4 004133 r d4 004133 r
d5 004134 r d5 004134 r
d6 004135 r d6 004135 r
d65 004155 r d65 004152 r
d7999 004166 r d7999 004166 r
d7 004136 r d7 004136 r
d8 004137 r d8 004137 r
@@ -95,7 +96,7 @@ dskrd 002127 r
dsktrans 002231 r dsktrans 002231 r
dsploc 004455 r dsploc 004455 r
dslot 002474 r dslot 002474 r
dspino 004456 r dsplno 004456 r
dspbufp3 004116 r dspbufp3 004116 r
dspbufp 005506 r dspbufp 005506 r
dspresta 003523 r dspresta 003523 r
@@ -105,6 +106,11 @@ dskwr 002157 r
dspput 002551 r dspput 002551 r
dspleft 002573 r dspleft 002573 r
dspbuf 004457 r dspbuf 004457 r
dskswap 002300 r
dspinit 002617 r
dspnl 002605 r
edskbsp 005504 r
edspbuf 004115 r
error 001542 r error 001542 r
exitrw 001041 r exitrw 001041 r
f.badd 005771 r f.badd 005771 r
@@ -116,8 +122,8 @@ fget 002371 r
finac 003401 r finac 003401 r
fnode 005770 r fnode 005770 r
"** 01-s1.pdf page 59 "** 01-s1.pdf page 59
forall 002434 r forall 002423 r
fput 003413 r fput 002413 r
free 001615 r free 001615 r
getchar 001756 r getchar 001756 r
getw 004635 r getw 004635 r
@@ -170,11 +176,11 @@ o100000 004177 r
o140000 004200 r o140000 004200 r
o14 004142 r o14 004142 r
o15 004143 r o15 004143 r
0155 004157 r o155 004157 r
o2000 004164 r o2000 004164 r
o200001 004262 r o200001 004262 r
o20001 004172 r o20001 004172 r
020 004145 r o20 004145 r
o212 004161 r o212 004161 r
o200000 004201 r o200000 004201 r
"** 01-s1.pdf page 60 "** 01-s1.pdf page 60
@@ -183,6 +189,7 @@ o33 004146 r
o300000 004203 r o300000 004203 r
o4000 004165 r o4000 004165 r
o40000 004173 r o40000 004173 r
o40001 004174 r
o40 004147 r o40 004147 r
o400000 004204 r o400000 004204 r
o500000 004205 r o500000 004205 r
@@ -191,7 +198,7 @@ o577777 004206 r
o600000 004207 r o600000 004207 r
o640000 004210 r o640000 004210 r
o777 004163 r o777 004163 r
o77 004157 r o77 004151 r
o70000 004175 r o70000 004175 r
o77777 004176 r o77777 004176 r
o777760 004213 r o777760 004213 r
@@ -252,8 +259,8 @@ u.limit 005664 r
u.cdir 005657 r u.cdir 005657 r
u.count 005663 r u.count 005663 r
u.base 005662 r u.base 005662 r
u.rq 005644 r u.rg 005644 r
ulsit 005562 r ulist 005572 r
uniqpid 005524 r uniqpid 005524 r
uquant 005505 r uquant 005505 r
userdata 005642 r userdata 005642 r
+1 -1
View File
@@ -258,7 +258,7 @@ pbadr: .=.+1
blink: .=.+1 blink: .=.+1
blk1: .=.+1 blk1: .=.+1
blk2: .=.+1 blk2: .=.+1
9: .=.+1 9: .=.+t
stack: stack:
dnop = 040040 dnop = 040040
+1 -1
View File
@@ -37,7 +37,7 @@ error:
mes: mes:
077; 012 077; 012
n.out: n.out:
<n.>;<ou>;<t 040; 040040 <n.>;<ou>;<t 040;040040
d1: 1 d1: 1
d6: 6 d6: 6
View File
+10
View File
@@ -1,3 +1,4 @@
"** 05-1-4.pdf page 2
" adm " adm
lac 017777 i lac 017777 i
@@ -60,6 +61,7 @@ floop1:
dac fi dac fi
-1 -1
"** 05-1-4.pdf page 3
tad name tad name
dac 8 dac 8
-4 -4
@@ -121,6 +123,7 @@ eof:
dac buf+3 " final check sum dac buf+3 " final check sum
jms putcard jms putcard
jmp floop jmp floop
"** 05-1-4.pdf page 4
getword: 0 getword: 0
lac ipt lac ipt
@@ -182,6 +185,7 @@ putcard: 0
jmp floop jmp floop
"** 05-1-4.pdf page 5
ferror: ferror:
lac name lac name
dac 1f dac 1f
@@ -243,6 +247,7 @@ disflg: 0
flush: 0 flush: 0
lac noc lac noc
sna sna
"** 05-1-4.pdf page 6
jmp flush i jmp flush i
law 0104 law 0104
jms message; tbuf jms message; tbuf
@@ -304,6 +309,7 @@ putw: 0
1: 0 1: 0
putc: 0 putc: 0
"** 05-1-4.pdf page 7
and o177 and o177
dac opt i dac opt i
-0141 -0141
@@ -364,6 +370,7 @@ connect: 0
and ilock and ilock
sna sna
jmp 1b jmp 1b
"** 05-1-4.pdf page 8
law 041 law 041
dac echoch dac echoch
law 0102 law 0102
@@ -425,6 +432,7 @@ retry:
jms transch jms transch
isz c2 isz c2
jmp 1b jmp 1b
"** 05-1-4.pdf page 9
" put out etx character " put out etx character
2: 2:
@@ -486,6 +494,7 @@ retry:
lac opch lac opch
sad o122 sad o122
jmp i message jmp i message
"** 05-1-4.pdf page 10
lac disflg lac disflg
sna sna
jmp discon jmp discon
@@ -547,6 +556,7 @@ d14: 14
o400000: 0400000 o400000: 0400000
o577777: 0577777 o577777: 0577777
o200500: 0200500 o200500: 0200500
"** 05-1-4.pdf page 11
o122: 0122 o122: 0122
o3: 3 o3: 3
o2: 2 o2: 2
+11 -1
View File
@@ -79,7 +79,7 @@ cloop:
jmp 1f jmp 1f
dac 0f dac 0f
lac fo lac fo
sys write; obuf; 0;.. sys write; obuf; 0:..
1: 1:
lac fo lac fo
sys close sys close
@@ -229,6 +229,16 @@ putword: 0
jmp putword i jmp putword i
jmp putword i jmp putword i
ferror:
lac buf
dac 1f
lac d1
sys write; 1:..; 4
lac d1
sys write; 1f; 1
jmp loop
1: 077012
d1: 1 d1: 1
d2048: 2048 d2048: 2048
d14: 14 d14: 14
+1 -1
View File
@@ -593,7 +593,7 @@ transcd: 0
jms transch jms transch
isz c2 isz c2
jmp 1b jmp 1b
jmp transch i jmp transcd i
transch: 0 transch: 0
lmq lmq
+6 -1
View File
@@ -1,3 +1,4 @@
"** 06-5-12.pdf page 7
" bc " bc
jmp start jmp start
@@ -60,6 +61,7 @@ trace: 0
jmp trace i jmp trace i
dtrace: 0 dtrace: 0
"** 06-5-12.pdf page 8
lac pc lac pc
dac 8 dac 8
lac 8 i lac 8 i
@@ -121,6 +123,7 @@ dspblk: 0
dac t1 dac t1
dzm t2 dzm t2
1: 1:
"** 06-5-12.pdf page 9
lac t1 lac t1
sna sna
jmp 1f jmp 1f
@@ -182,6 +185,7 @@ histog: 0
tad histbuf tad histbuf
dac t1 dac t1
isz t1 i isz t1 i
"** 06-5-12.pdf page 10
jmp histog i jmp histog i
jmp . jmp .
@@ -209,7 +213,7 @@ olddp: 0
dspbuf: 0 dspbuf: 0
dspbp: 0 dspbp: 0
instr: 0 instr: 0
obs: 0 pbs: 0
inslitr: n 5 inslitr: n 5
insasg: b 1 insasg: b 1
o17: 017 o17: 017
@@ -243,6 +247,7 @@ badsp:
badasgn: badasgn:
jms flush jms flush
lac d1 lac d1
"** 06-5-12.pdf page 11
sys write; mas; mass sys write; mas; mass
jmp stop jmp stop
mpc: mpc:
+8
View File
@@ -1,3 +1,4 @@
"** 06-5-12.pdf page 12
" bi " bi
start: start:
@@ -60,6 +61,7 @@ binop:
tad .+3 tad .+3
dac .+1 dac .+1
jmp .. i jmp .. i
"** 06-5-12.pdf page 13
jmp . i jmp . i
basg; bor; band; beq; bne; ble; blt; bge; bgt; brsh; blsh basg; bor; band; beq; bne; ble; blt; bge; bgt; brsh; blsh
badd; bmin; bmod; bmul; bdiv badd; bmin; bmod; bmul; bdiv
@@ -121,6 +123,7 @@ blt:
bge: bge:
lac t1 i lac t1 i
cma cma
"** 06-5-12.pdf page 14
tad t2 i tad t2 i
spa cla spa cla
lac d1 lac d1
@@ -182,6 +185,7 @@ bdiv:
consop: consop:
lac sp lac sp
"** 06-5-12.pdf page 15
tad d1 tad d1
dac sp i dac sp i
isz sp isz sp
@@ -243,6 +247,7 @@ call:
lac 8 i lac 8 i
dac t1 dac t1
lac t1 i lac t1 i
"** 06-5-12.pdf page 16
dac 9 i dac 9 i
isz 8 isz 8
-1 -1
@@ -303,6 +308,7 @@ goto:
tad t1 i tad t1 i
dac pc dac pc
jmp fetch jmp fetch
"** 06-5-12.pdf page 17
retrn: retrn:
-2 -2
@@ -365,6 +371,7 @@ unaop:
uadr; umin; uind; unot uadr; umin; uind; unot
uadr: uadr:
"** 06-5-12.pdf page 18
lac t1 lac t1
dac t3 i dac t3 i
jmp fetch jmp fetch
@@ -427,6 +434,7 @@ addr: 0
pc = 017 pc = 017
"** 06-5-12.pdf page 19
sp: stack sp: stack
dp: stack dp: stack
ap: stack ap: stack
+4
View File
@@ -1,3 +1,4 @@
"** 06-5-12.pdf page 3
" bl " bl
jmp start jmp start
@@ -60,6 +61,7 @@ getc: 0
lac cibufp lac cibufp
sad eibufp sad eibufp
jmp 1f jmp 1f
"** 06-5-12.pdf page 4
lac cibufp i lac cibufp i
and o777 and o777
dac iflg dac iflg
@@ -121,6 +123,7 @@ stop:
flush: 0 flush: 0
lac oflg lac oflg
sza sza
"** 06-5-12.pdf page 5
isz cobufp isz cobufp
lac cobufp lac cobufp
cma cma
@@ -182,6 +185,7 @@ initio: 0
.fin: 0 .fin: 0
.fout: 1 .fout: 1
eibufp: 0 eibufp: 0
"** 06-5-12.pdf page 6
cibufp: 0 cibufp: 0
iflg: 0 iflg: 0
eobufp: 0 eobufp: 0
-551
View File
@@ -1,551 +0,0 @@
:ca
v
af
nl
x
hd
v
hi
x
mn
r
:cb
x
ga
v
gi
ik
kk
mi
ma
aa
ai
ck
ek
gi
x
mn
r
:cc
x
kk
v
mi
mc
ka
ca
ac
ai
dl
x
mn
r
:cd
v
aa
ai
ck
kk
mi
ma
x
mn
r
:ce
x
mk
v
ma
aa
ak
x
gh
v
ga
x
mn
r
:cf
v
aa
ak
x
gh
v
ga
x
mn
r
:cg
x
gf
v
gk
nk
x
kk
v
mi
mc
ka
ca
ac
ai
dl
x
mn
r
:ch
x
aa
v
na
x
gb
v
gk
x
ak
v
nk
x
mn
r
:ci
x
md
v
mi
x
lf
v
af
x
ad
v
ai
x
mn
r
:cj
x
ka
v
mc
mg
ki
ai
x
ag
v
al
x
mn
r
:ck
x
aa
v
na
x
ak
v
ia
x
mk
v
fe
x
mn
r
:cl
x
aa
v
ma
mk
x
mn
r
:cm
v
aa
hf
ak
nk
x
mn
r
:cn
x
ak
v
mk
aa
na
x
mn
r
:co
x
ai
v
ch
ei
ck
ai
ac
ca
ka
mc
mi
kk
ck
x
mn
r
:cp
v
aa
ai
ck
ek
gi
ga
x
mn
r
:cq
x
mc
v
ka
ca
ac
ai
ck
kk
mi
mc
x
jh
v
nl
x
mn
r
:cr
v
aa
ai
ck
ek
gi
ga
x
mk
v
gf
x
mn
r
:cs
x
ka
v
mc
mi
kk
ik
gi
gc
ea
ca
ac
ai
dl
x
mn
r
:ct
x
aa
v
al
x
mf
v
af
x
mn
r
:cu
x
aa
v
ka
mc
mi
kk
x
ak
v
lk
x
mn
r
:cv
x
aa
v
mf
x
ak
v
mf
x
mn
r
:cw
x
aa
v
mc
af
x
ak
v
mi
af
x
mn
r
:cx
v
gf
x
ak
v
gf
x
aa
v
nl
x
mn
r
:cy
x
aa
v
if
x
ak
v
if
nf
x
mn
r
:cz
x
aa
v
ak
ma
ml
x
mn
r
:c0
x
ck
v
ai
ac
ca
ka
mc
mi
kk
ck
x
mn
r
:c1
x
ce
v
af
mf
x
md
v
mi
x
mn
r
:c2
x
ca
v
ac
ai
ck
ek
gi
gc
ia
ma
ml
x
mn
r
:c3
x
aa
v
ak
fe
fi
hk
kk
mi
mc
x
ka
v
nd
x
mn
r
:c4
x
mh
v
ah
ia
il
x
mn
r
:c5
x
ak
v
aa
fa
fi
hk
kk
mi
mc
x
ka
v
nd
x
mn
r
:c6
x
ck
v
ai
ac
ca
ka
mc
mi
kk
hk
fi
fc
ha
x
mn
r
:c7
x
aa
v
ak
nb
x
mn
r
:c8
x
gc
v
ea
ca
ac
ai
ck
ek
gi
gc
ia
ka
mc
mi
kk
ik
gi
x
mn
r
:c9
x
ka
v
mc
mi
kk
ck
ai
ac
ca
fa
hc
hi
fk
x
mn
r
+3
View File
@@ -1,3 +1,4 @@
"** 06-5-12.pdf page 21
" cat: cat arg1 [arg2 ...] " cat: cat arg1 [arg2 ...]
" Load the pointer pointer in 017777 to see if we have any arguments " Load the pointer pointer in 017777 to see if we have any arguments
@@ -63,6 +64,7 @@ done:
and d1 and d1
sna cla sna cla
jmp 1f jmp 1f
"** 06-5-12.pdf page 22
jms putc " Store the character in the buffer jms putc " Store the character in the buffer
jmp done " and loop back jmp done " and loop back
1: 1:
@@ -126,6 +128,7 @@ putc: 0
sad d128 sad d128
skp skp
jmp putc i " No, so return (more room still in the buffer) jmp putc i " No, so return (more room still in the buffer)
"** 06-5-12.pdf page 23
lac fo " Load fd1 (i.e stdout) lac fo " Load fd1 (i.e stdout)
sys write; iopt+1; 64 " and write out the 64 words in the buffer sys write; iopt+1; 64 " and write out the 64 words in the buffer
lac iopt lac iopt
+7 -1
View File
@@ -1,3 +1,4 @@
"** 06-5-12.pdf page 25
" check " check
lac d1 lac d1
@@ -60,6 +61,7 @@ iloop:
lac iflags lac iflags
and o40 and o40
sza sza
"** 06-5-12.pdf page 26
jmp iloop jmp iloop
law idskps law idskps
dac t1 dac t1
@@ -121,6 +123,7 @@ dupcheck: 0
lac d1 lac d1
2: alss 0 2: alss 0
dac bit dac bit
"** 06-5-12.pdf page 27
lac i t6 lac i t6
and bit and bit
sza sza
@@ -170,7 +173,7 @@ print: 0
part2: part2:
lac icnt lac icnt
jmp print jms print
lac d1 lac d1
sys write; m3; m3s sys write; m3; m3s
lac licnt lac licnt
@@ -182,6 +185,7 @@ part2:
lac d1 lac d1
sys write; m5; m5s sys write; m5; m5s
lac blcnt lac blcnt
"** 06-5-12.pdf page 28
jms print jms print
lac d1 lac d1
sys write; m6; m6s sys write; m6; m6s
@@ -243,6 +247,7 @@ part3:
cla cla
llss 4 llss 4
tad alsscom tad alsscom
"** 06-5-12.pdf page 29
dac 2f dac 2f
lac d1 lac d1
2: alss 0 2: alss 0
@@ -304,6 +309,7 @@ t1: 0
t2: 0 t2: 0
t3: 0 t3: 0
t4: 0 t4: 0
"** 06-5-12.pdf page 30
t5: 0 t5: 0
t6: 0 t6: 0
+20
View File
@@ -1,3 +1,4 @@
"** 07-13-19.pdf page 2
" db " db
"** pages 2-21 of 07-13-19.pdf "** pages 2-21 of 07-13-19.pdf
" Usage: db [ corefile [ namelist ] ] " Usage: db [ corefile [ namelist ] ]
@@ -62,6 +63,7 @@ wcorep: corename; 1
" "
lac o52012 " prompt: "*\n" lac o52012 " prompt: "*\n"
jms wchar jms wchar
"** 07-13-19.pdf page 3
law dotdot law dotdot
dac nsearch dac nsearch
jms nlsearch jms nlsearch
@@ -123,6 +125,7 @@ cmd:
jmp saddress jmp saddress
sad o75 " '='? sad o75 " '='?
jmp address jmp address
"** 07-13-19.pdf page 4
sad o57 " '/'? sad o57 " '/'?
jmp octal jmp octal
sad o72 " ':'? sad o72 " ':'?
@@ -184,6 +187,7 @@ saddress:
lac 9f lac 9f
dac curdot dac curdot
jmp mloop jmp mloop
"** 07-13-19.pdf page 5
9:0 9:0
" "
symbol: symbol:
@@ -245,6 +249,7 @@ print:
spa spa
jmp error jmp error
lac rcore lac rcore
"** 07-13-19.pdf page 6
sys read; inbuf; 64 sys read; inbuf; 64
spa spa
jmp error jmp error
@@ -306,6 +311,7 @@ prdec: "temp
proct:0 proct:0
jms octw jms octw
6 6
"** 07-13-19.pdf page 7
jmp i proct jmp i proct
" "
patch: patch:
@@ -367,6 +373,7 @@ getexp:0
xloop: xloop:
jms rch jms rch
lmq lmq
"** 07-13-19.pdf page 8
sad o044 sad o044
skp skp
jmp 1f jmp 1f
@@ -428,6 +435,7 @@ xloop:
lac o40 lac o40
sad rator sad rator
skp skp
"** 07-13-19.pdf page 9
jmp error jmp error
lacq lacq
dac rator dac rator
@@ -489,6 +497,7 @@ spcai:
lac d1 lac d1
dac reloc dac reloc
jmp i getspec jmp i getspec
"** 07-13-19.pdf page 10
" "
getsym:0 getsym:0
lmq lmq
@@ -550,6 +559,7 @@ skipt:
spa spa
jmp 2f " lc letter jmp 2f " lc letter
1: 1:
"** 07-13-19.pdf page 11
lac nchar1 lac nchar1
tad om101 tad om101
spa spa
@@ -611,6 +621,7 @@ num1:
jmp i getnum jmp i getnum
tad om10 tad om10
sma sma
"** 07-13-19.pdf page 12
jmp i getnum jmp i getnum
lac nchar1 lac nchar1
dzm nchar1 dzm nchar1
@@ -672,6 +683,7 @@ prsym:0 " print symbolic instruction
dac word dac word
dzm relflg dzm relflg
dzm relocflg dzm relocflg
"** 07-13-19.pdf page 13
dzm nsearch dzm nsearch
and o760000 and o760000
sad o760000 sad o760000
@@ -733,6 +745,7 @@ pr1:
tad d1 tad d1
dac addr dac addr
lac o55 lac o55
"** 07-13-19.pdf page 14
jms wchar jms wchar
jmp 2f jmp 2f
1: 1:
@@ -794,6 +807,7 @@ peae: " print EAE instruction
jmp i prsym jmp i prsym
1: 1:
law eaes law eaes
"** 07-13-19.pdf page 15
dac addr dac addr
jmp nfnd jmp nfnd
" "
@@ -855,6 +869,7 @@ pcal:
law syss law syss
jms wrname jms wrname
lac o40 lac o40
"** 07-13-19.pdf page 16
jms wchar jms wchar
lac addr lac addr
jms wrname jms wrname
@@ -916,6 +931,7 @@ nloop:
lacq lacq
tad d3 tad d3
dac np dac np
"** 07-13-19.pdf page 17
lac i np lac i np
sna sna
jmp nloop jmp nloop
@@ -977,6 +993,7 @@ testn:
skp skp
jmp nloop jmp nloop
isz minp isz minp
"** 07-13-19.pdf page 18
isz inbuf isz inbuf
isz value isz value
jmp 1b jmp 1b
@@ -1038,6 +1055,7 @@ nlerr:
" "
rch:0 rch:0
lac nchar1 lac nchar1
"** 07-13-19.pdf page 19
dzm nchar1 dzm nchar1
sza sza
jmp i rch jmp i rch
@@ -1099,6 +1117,7 @@ d12:12
d8:8 d8:8
d3:3 d3:3
o177:0177 o177:0177
"** 07-13-19.pdf page 20
o136: 0136 o136: 0136
o45: 045 o45: 045
sysflag: 0 sysflag: 0
@@ -1160,6 +1179,7 @@ nchar1:0
nchar:0 nchar:0
o177000:0177000 o177000:0177000
o56040:056040 " ". " o56040:056040 " ". "
"** 07-13-19.pdf page 21
nsearch:0 nsearch:0
word:0 word:0
relflg:0 relflg:0
+5
View File
@@ -1,3 +1,4 @@
"** 07-13-19.pdf page 23
" dmabs " dmabs
" takes a list of files on command line and punches out each " takes a list of files on command line and punches out each
@@ -74,6 +75,7 @@ dump2: " (label not used)
dump3: " block loop dump3: " block loop
-1 " reset i8 to buffer -1 " reset i8 to buffer
tad bufp tad bufp
"** 07-13-19.pdf page 24
dac 8 dac 8
-64 " get count -64 " get count
dac c1 dac c1
@@ -135,6 +137,7 @@ dump4: " end of block
done: " here at end of input file done: " here at end of input file
lac tracmd " get transfer command (jmp) lac tracmd " get transfer command (jmp)
jms put " write to tape jms put " write to tape
"** 07-13-19.pdf page 25
cla " write a zero word cla " write a zero word
jms put jms put
lac oldsum " get checksum lac oldsum " get checksum
@@ -196,6 +199,7 @@ boot:
2: 2:
jms get1-boot+org " get command word from tape jms get1-boot+org " get command word from tape
dac cmd-boot+org dac cmd-boot+org
"** 07-13-19.pdf page 26
jms get1-boot+org " get count from tape jms get1-boot+org " get count from tape
cma cma
dac cnt-boot+org " store complemented (incremented below) dac cnt-boot+org " store complemented (incremented below)
@@ -257,6 +261,7 @@ punout: <pp>;<to>;<ut>;040040
o17: 017 o17: 017
fi: 0 fi: 0
"** 07-13-19.pdf page 27
fo: 0 fo: 0
count: 0 count: 0
oldsum: 0 oldsum: 0
+10 -3
View File
@@ -1,3 +1,4 @@
"** 07-13-19.pdf page 30
" ds " ds
lac 017777 i lac 017777 i
@@ -65,12 +66,13 @@ loop:
lac i1 i lac i1 i
sad ddfilp i sad ddfilp i
jmp 2f jmp 2f
"** 07-13-19.pdf page 31
isz i1 isz i1
isz c1 isz c1
jmp 1b jmp 1b
lac ddfilp lac ddfilp
tad i1 tad d1
dac i1 dac i1
lac i1 i lac i1 i
dac .+3 dac .+3
@@ -127,6 +129,7 @@ loop:
sad i2 i sad i2 i
skp skp
jmp 3f jmp 3f
"** 07-13-19.pdf page 32
-1 -1
tad i1 tad i1
dac i3 dac i3
@@ -189,6 +192,7 @@ loop:
jms putname; scrname jms putname; scrname
jms putname; dd jms putname; dd
law 012 law 012
"** 07-13-19.pdf page 33
jms putc jms putc
3: 3:
@@ -250,7 +254,7 @@ longout: 0
lac statbuf+10 lac statbuf+10
jms octal; -5 jms octal; -5
jmp longout i jmp longout i
"** 07-13-19.pdf page 34
readdir: 0 readdir: 0
law 012 law 012
jms putc jms putc
@@ -313,6 +317,7 @@ readdir: 0
lac i1 lac i1
dac 8 dac 8
lac 8 i lac 8 i
"** 07-13-19.pdf page 35
dac fsopt i dac fsopt i
isz fsopt isz fsopt
lac 8 i lac 8 i
@@ -377,7 +382,7 @@ octal: 0
lac octal i " Save the actual number of print digits into c lac octal i " Save the actual number of print digits into c
dac c " as a negative number. dac c " as a negative number.
1: 1:
cla ecla
llss 3 " Shift 3 more bits into AC llss 3 " Shift 3 more bits into AC
tad o60 " Add AC to ASCII '0' tad o60 " Add AC to ASCII '0'
jms putc " and print out the digit jms putc " and print out the digit
@@ -439,6 +444,7 @@ putc: 0
spa " If the bit was set, we already have one spa " If the bit was set, we already have one
jmp 1f " character at 2f+1. If no previous character, jmp 1f " character at 2f+1. If no previous character,
lac 2f i " merge the old and new character together lac 2f i " merge the old and new character together
"** 07-13-19.pdf page 37
xor 2f+1 xor 2f+1
jmp 3f " and go to the "save it in buffer" code jmp 3f " and go to the "save it in buffer" code
1: 1:
@@ -501,6 +507,7 @@ ddfilp: .=.+1
ddfiles: .=.+1 ddfiles: .=.+1
statbuf: .=.+13 statbuf: .=.+13
c: .=.+1 c: .=.+1
"** 07-13-19.pdf page 38
i1: .=.+1 i1: .=.+1
i2: .=.+1 i2: .=.+1
i3: .=.+1 i3: .=.+1
+90 -47
View File
@@ -1,78 +1,121 @@
"** 07-13-19.pdf page 42
" dskio " dskio
" Reads 10 blocks from side 0 at block address AC into buffer dskbuf
dskrd0: 0 dskrd0: 0
dzm side dzm side " set side to 0
jms dskio; 02000 jms dskio; 02000 " read 10 blocks starting at block AC on side 0
jmp i dskrd0 jmp i dskrd0 " return to caller
" Writes 10 blocks from buffer dskbuf onto side 0 at block address AC
dskwr0: 0 dskwr0: 0
dzm side dzm side " set side to 0
jms dskio; 03000 jms dskio; 03000 " write 10 blocks tarting at block AC on side 0
jmp i dskwr0 jmp i dskwr0 " return to caller
" Reads 10 blocks from side 1 at block address AC into buffer dskbuf
dskrd1: 0 dskrd1: 0
lmq lmq " set side to 1
lac o200000 lac o200000
dac side dac side
lacq lacq
jms dskio; 02000 jms dskio; 02000 " read 10 blocks starting at block AC on side 1
jmp i dskrd1 jmp i dskrd1 " return to caller
" Writes 10 blocks from buffer dskbuf onto side 1 at block address AC
dskwr1: 0 dskwr1: 0
lmq lmq " Set side to 1
lac o200000 lac o200000
dac side dac side
lacq lacq
jms dskio; 03000 jms dskio; 03000 " write 10 blocks starting at block AC on side 1
jmp i dskwr1 jmp i dskwr1 " return to caller
" dskio depends on the DSLS_BITS after jump to subroutine:
" jms dskio; DSLS_BITS
" DSLS_BITS 02000 causes a read, 03000 causes a write.
"
" In both cases 10 blocks worth of data is either transferred from
" disk into dskbuf (read), or transferred from dskbuf onto the disk
" (write). A block is the same as a segment, each comprising 64 words.
"
" The location on disk is controlled by the variable "side" and the
" value in AC, representing the number of blocks from the start
" of the side.
"
" dskio takes the block address passed in AC, divides it by 80
" to get the track address, and as a remainder the segment address.
" Both are then re-encoded as BCD, shifted to the correct bit
" positions (explained below) and ORed together with the value of
" the "side" variable (representing the hundreds flag in the disk
" address). This disk address is then passed on to the disk just
" before starting the transfer in chunks of 10 segments each.
"
" The disk address for RB09 disks is formatted like this:
"
" * Bit 0 not used
" * Bit 1 hundreds flag for track address
" * Bits 2-5 Tens digit for track address as BCD
" * Bits 6-9 Units digit for track address as BCD
" * Bits 10-13 Tens digit for segment address as BCD
" * Bits 14-17 Units digit for segment address as BCD
"
" If the disk indicates an error the transfer is attempted 10 times
" before dskio gives up and halts the program.
dskio: 0 dskio: 0
cll; idiv; 80 cll; idiv; 80 " compute binary track and segment addresses
dac 2f dac 2f " store binary segment address
lacq lacq " get binary track address back into AC
idiv; 10 idiv; 10 " compute BCD track address from binary track address
dac 3f dac 3f
lls 22 lls 22
xor 3f xor 3f " OR together Tens and Units digits of BCD track address
als 8 als 8 " shift BCD track address to bit position in disk address
dac 3f dac 3f " store BCD track address
lac 2f lac 2f " load binary segment address
idiv; 10 idiv; 10 " compute BCD segment address from binary segment address
dac 2f dac 2f
lls 22 lls 22
xor 2f xor 2f " OR together Tens and Units digits of BCD segment address
xor 3f xor 3f " OR together track and segment addresses
xor side xor side " OR together side, track and segment addresses
dac 2f " to make the complete disk address
-10 dac 2f " store disk address
-10 " do at most 10 transfer attempts
dac 3f dac 3f
1: 1:
dscs dscs " clear disk status
-640 -640 " prepare transfer of 10 segments (10 blocks)
dslw dslw
lac dskbufp lac dskbufp " load pointer to dskbuf into MAC
dslm dslm
lac 2f lac 2f " load previously computed disk address
dsld dsld
lac dskio i lac dskio i " load disk status register (one bit is the read/write flag)
dsls dsls
dssf dssf " wait for ERROR/DONE
jmp .-1 jmp .-1
dsrs "** 07-13-19.pdf page 43
sma dsrs " read disk status into AC, bit 0 indicates errors
jmp 1f sma " if bit 0 of AC is set, AC is negative.
isz 3f " if AC is negative, continue below and do another
jmp 1b " transfer attempt...
hlt jmp 1f " ...otherwise jump to the subroutine exit code below
isz 3f " increment transfer attempts, and...
jmp 1b " ...retry if more attempts remain
hlt " when no more attempts remain, stop program due to
" persistent disk error
1: 1:
isz dskio isz dskio " skip over argument passed to dskio
jmp i dskio jmp i dskio " return to caller
2: 0
3: 0
o200000: 0200000 2: 0 " local variable storing first binary segment address,
dskbufp: dskbuf " then disk address
3: 0 " local variable storing first BCD track address,
" then loop counter
side: .=.+1 o200000: 0200000 " bit corresponding to set Hundreds flag in disk address
dskbuf: .=.+640 dskbufp: dskbuf " pointer to transfer buffer
side: .=.+1 " which side to access
dskbuf: .=.+640 " transfer buffer for 10 blocks
+21 -14
View File
@@ -1,26 +1,33 @@
"** 07-13-19.pdf page 41
" dskres " dskres
iof " Copies the entire file system (except system image and
hlt " swap area) from side 0 of the disk onto same location
dzm track " on side 1.
-640 "
" I.e. copies the first 6400 blocks from side 0 to side 1.
iof " disable interrupts
hlt " halt the computer!
dzm track " start copying from block address 0
-640 " transfer 640 chunks of 10 blocks each
dac c1 dac c1
1: 1:
lac track lac track " read chunk of blocks starting at block "track" on side 0
jms dskrd0 jms dskrd0
lac track lac track " write chunk of blocks starting at block "track" on side 1
jms dskwr1 jms dskwr1
lac track lac track " proceed to next chunk (of 10 blocks)
tad d10 tad d10
dac track dac track
isz c1 isz c1 " increment chunks transferred, if there are chunks remaining
jmp 1b jmp 1b " ...loop and transfer the next chunk
hlt hlt " ...otherwise halt the computer!
sys exit sys exit " call exit system call
track: 0 track: 0 " block address of chunk to transfer
c1: 0 c1: 0 " number of chunks remaining
d10: 10 d10: 10
+20 -13
View File
@@ -1,26 +1,33 @@
"** 07-13-19.pdf page 40
" dsksav " dsksav
iof " Copies the entire file system (except system image and
hlt " swap area) from side 1 of the disk onto same location
dzm track " on side 0.
-640 "
" I.e. copies the first 6400 blocks from side 1 to side 0.
iof " disable interrupts
hlt " halt the computer!
dzm track " start copying from block address 0
-640 " transfer 640 chunks of 10 blocks each
dac c1 dac c1
1: 1:
lac track lac track " read chunk of blocks starting at block "track" on side 1
jms dskrd1 jms dskrd1
lac track lac track " write chunk of blocks starting at block "track" on side 0
jms dskwr0 jms dskwr0
lac track lac track " proceed to next chunk (of 10 blocks)
tad d10 tad d10
dac track dac track
isz c1 isz c1 " increment chunks transferred, if there chunks remaining
jmp 1b jmp 1b " ...loop and transfer the next chunk
hlt hlt " ...otherwise halt the computer!
sys exit sys exit " call exit system call
track: 0 track: 0 " block address of chunk to transfer
c1: 0 c1: 0 " number of chunks remaining
d10: 10 d10: 10
+5 -2
View File
@@ -1,6 +1,7 @@
"** 08-rest.pdf page 8 "** 08-rest.pdf page 8
"[handwritten page number top right of scan - 1] "[handwritten page number top right of scan - 1]
" ed1 " ed1
lac d1 lac d1
sys write; 1f; 3 " say hello sys write; 1f; 3 " say hello
lac o17 lac o17
@@ -32,6 +33,7 @@
jmp advanc jmp advanc
1: 1:
<ed>; <it>; 012 <ed>; <it>; 012
advanc: advanc:
jms rline jms rline
lac linep lac linep
@@ -92,6 +94,7 @@ comand:
sad o75 " =? sad o75 " =?
jmp ceq jmp ceq
jmp error jmp error
ca: " a(ppend) ca: " a(ppend)
jms newline jms newline
jms setfl jms setfl
@@ -149,7 +152,7 @@ cp1:
lac d1 lac d1
sys write; line; 2: 0 sys write; line; 2: 0
lac addr1 lac addr1
sad addr1 sad addr2
jmp advanc jmp advanc
tad d1 tad d1
dac addr1 dac addr1
@@ -216,6 +219,7 @@ cr: " r(ead)
isz c1 isz c1
jmp 2b jmp 2b
jmp 1b jmp 1b
cw: " w(rite) cw: " w(rite)
jms setfl jms setfl
lac i addr1 lac i addr1
@@ -710,7 +714,6 @@ addline: 0
jmp 1b jmp 1b
jmp i addline jmp i addline
getdsk: 0 "[the entire getdsk procedure was surrounded getdsk: 0 "[the entire getdsk procedure was surrounded
and o776000 " by a box that was Xed out]: and o776000 " by a box that was Xed out]:
sad diskin " -- sad diskin " --
+2 -1
View File
@@ -81,6 +81,7 @@ cs:
skp skp
jmp 3b jmp 3b
jms addline jms addline
2: 2:
lac addr1 lac addr1
sad addr2 sad addr2
@@ -341,7 +342,7 @@ found: 0
jmp 2f jmp 2f
jmp 3f jmp 3f
1: "??? 1: "???
lac charno lac lchrno
cma cma
tad charno tad charno
spa spa
+30 -29
View File
@@ -1,4 +1,5 @@
"** 09-1-35.pdf page 1 "** 09-1-35.pdf page 1
"[handwritten in the top center of scan - fop.s ]
jms = 0100000 jms = 0100000
" "
q:0 q:0
@@ -86,49 +87,49 @@ fdv = jms q
lac hms lac hms
sna sna
sys save sys save
ral ral "[box drawn around instruction - scan markup]
dac 2f dac 2f "[separate box around the three dac instructions - scan markup]
dac 3f dac 3f
dac 4f dac 4f
-1 -1
tad hexp tad hexp "[-\ - scan markup]
cma cma "[ | delta aep??? - scan markup]
tad aexp tad aexp "[ | - scan markup]
dac aexp dac aexp "[-/ / Ams \ - scan markup]
lac ans lac ans "[hand written to the right: Rem | --- | Hls??? - scan markup]
lmq lmq "[ \ Hms / ----- - scan markup]
lac ams lac ams "[circle around ams ---------- Hms - scan markup]
sna cll sna cll "[ Hms - scan markup]
jmp 8f jmp 8f
div div
2:0 2:0
szl szl
sys save sys save
dac ce10 dac ce10 "[arrow pointing from ce10 to "REm" +-----+-----+ - scan markup]
lacq lacq "[ handwritten to the right: | A |+ B | - scan markup]
dac 5f dac 5f "[circle around 5f +-----+-----+ - scan markup]
lac ce10 lac ce10 "[ | C |+ D | - scan markup]
frdiv frdiv "[ +-----+-----+ - scan markup]
3:0 3:0 "[line from 3:0 to a circled "Hms" - scan markup]
szl szl
sys save sys save
lacq lacq
dac ce10 dac ce10 "[line from ce10 to text "Q1" - scan markup]
lac hls lac hls
and o377777 and o377777
frdiv frdiv "[ X - scan markup]
4:0 4:0 "[handwritten to the right: ----- - scan markup]
szl szl "[ A+B - scan markup]
sys save sys save
lacq lacq
dac 2b dac 2b "[circle around 2b with arrow pointing to the right
spa cla spa cla
"** 09-1-35.pdf page 3 "** 09-1-35.pdf page 3
-1 -1 "[vertical line to the right of instructions... - scan markup]
tad 2b tad 2b
cll cll "[underlined ...vertical line ends here - scan markup]
mul mul
5:0 5:0 "[line from 5:0 to "Q" - scan markup]
dzm 2b dzm 2b
spa spa
isz 2b isz 2b
@@ -139,11 +140,11 @@ fdv = jms q
isz 3b isz 3b
skp skp
isz 2b isz 2b
lac ce10 lac ce10 "[lac ce10 circled - scan markup]
lmq lmq
lac 3b lac 3b
sna sna
jmp 6f jmp 6f "[arrow pointing down starts to the right of 6f - scan markup]
cma cma
tad d1 tad d1
stl stl
@@ -151,7 +152,7 @@ fdv = jms q
lmq lmq
szl szl
isz 2b isz 2b
6:lac 2b 6:lac 2b "[arrow above points to between this instruction and the next one - scan markup]
sma sma
tad d1 tad d1
tad 5b tad 5b
@@ -724,7 +725,7 @@ sqrt = jms q
xor o200000 xor o200000
xor o400000 xor o400000
dac 1f dac 1f
lac ams lac ams "[a centered dot drawn after ams - scan markup]
frdiv; 1:.. frdiv; 1:..
szl szl
clq clq
@@ -778,7 +779,7 @@ sres: 0;0;0
rsign: 0 rsign: 0
sign: 0 sign: 0
fp1: 1;0200000; 0 fp1: 1;0200000;0
o400000: 0400000 o400000: 0400000
o640500: 0640500 o640500: 0640500
+5
View File
@@ -1,4 +1,5 @@
" init " init
"** 07-13-19.pdf page 47
-1 -1
sys intrp sys intrp
@@ -60,6 +61,7 @@ login:
sad o72 sad o72
skp skp
jmp 2b jmp 2b
"** 07-13-19.pdf page 48
lac 9 i lac 9 i
sad o72 sad o72
jmp 1f jmp 1f
@@ -120,6 +122,7 @@ login:
cll; als 3 cll; als 3
omq omq
dac nchar dac nchar
"** 07-13-19.pdf page 49
jmp 1b jmp 1b
2: 2:
lac nchar lac nchar
@@ -182,6 +185,7 @@ rline: 0
sad 8 sad 8
jmp 1b " and loop back jmp 1b " and loop back
-1 -1
"** 07-13-19.pdf page 50
tad 8 " Otherwise, move the pointer in location 8 back one tad 8 " Otherwise, move the pointer in location 8 back one
dac 8 dac 8
jmp 1b " and loop back jmp 1b " and loop back
@@ -243,6 +247,7 @@ m1:
m1s = .-m1 m1s = .-m1
m2: m2:
<?; 012 <?; 012
"** 07-13-19.pdf page 51
m2s = .-m2 m2s = .-m2
m3: m3:
<pa>;<ss>;<wo>;<rd>;<: 040 <pa>;<ss>;<wo>;<rd>;<: 040
+1 -1
View File
@@ -181,7 +181,7 @@ loop:
dac ball1+vx dac ball1+vx
2: 2:
lac toptest lac toptest
tad ball1+vy tad ball1+y
spa spa
jmp 2f jmp 2f
jms pockettb jms pockettb
+23 -22
View File
@@ -9,24 +9,24 @@
tad d1 tad d1
dac .pbp1 dac .pbp1
restart: restart:
fld; arg1 fld; arg1 "[ g = arg1 - scan markup]
fst; g fst; g "[ fact = arg2 - scan markup]
fld; arg2 fld; arg2 "[ d = 1.0 - scan markup]
fst; fact fst; fact "[ z = 0 - scan markup]
fld; fp01 fld; fp01 "[ oldx = 0 - scan markup]
fst; d fst; d "[ oldy = 0 - scan markup]
jms capture jms capture "[loop: - scan markup]
-100 -100 "[ b = z - 110. - scan markup]
dac j dac j "[ ---------- - scan markup]
fld; fp0 fld; fp0 "[ radians - scan markup]
fst; z fst; z "[ z = z + g - scan markup]
fst; oldx fst; oldx "[ g = -g * fact - scan markup]
fst; oldy fst; oldy "[ fact = 1 / fact - scan markup]
lac o400000 lac o400000 "[ exex = 500. * d * sin(b + pi/2) - scan markup]
dac i 11 dac i 11 "[ ni() - scan markup]
dac i 11 dac i 11 "[ yy = 500. * d * sin(b) - scan markup]
lac setx lac setx "[ ni() - scan markup]
dac i 10 dac i 10 "[ goto loop " an arrow points up to loop: above - scan markup]
lac sety lac sety
dac i 10 dac i 10
@@ -51,7 +51,7 @@ loop:
sin sin
fmp; d fmp; d
fmp; fp500 fmp; fp500
fst; xx fst; exex
jms in jms in
jmp done jmp done
fld; b fld; b
@@ -67,7 +67,7 @@ loop:
dac i 11 dac i 11
fld; oldx fld; oldx
fng fng
fad; xx fad; exex
fix fix
spa spa
xor o775777 xor o775777
@@ -81,7 +81,7 @@ loop:
xor o775777 xor o775777
tad vecy tad vecy
dac i 10 dac i 10
fld; xx fld; exex
fst; oldx fst; oldx
fld; yy fld; yy
fst; oldy fst; oldy
@@ -261,7 +261,7 @@ release: 0
char: 0 char: 0
stick: 0 stick: 0
xx: 0; 0; 0 exex: 0; 0; 0
oldx: 0; 0; 0 oldx: 0; 0; 0
yy: 0; 0; 0 yy: 0; 0; 0
oldy: 0;0 0; 0 oldy: 0;0 0; 0
@@ -277,6 +277,7 @@ o177777: 0177777
o12000: 012000 o12000: 012000
o61000: 061000 o61000: 061000
om60: -060 om60: -060
d1: 1
d13: 13 d13: 13
d500: 500 d500: 500
o141000: 0141000 o141000: 0141000
+103 -103
View File
@@ -3,18 +3,18 @@
t = 0 t = 0
start: start: "[------ stuff for gravity - scan markup]
law 13 law 13 " 13 = pbsflgs
sys sysloc sys sysloc " get pbsflgs location
dac .pbson dac .pbson " store in .pbson
lac pww lac pww
dac 1f dac 1f
dac 2f dac 2f
lac pw lac pw
dac 3f dac 3f
-32 -32
dac cplan dac cplan " cplan = -32
4: 4: " while (cplan != 0) {
fld; 1:0 fld; 1:0
fmp; 2:0 fmp; 2:0
-1 -1
@@ -22,7 +22,7 @@ start:
dac aexp dac aexp
fng fng
fad; fpone fad; fpone
fst; 3:0 fst; 3:0 " pw[i] = - (pww[i] * pww[i]) / 2 + 1
lac 1b lac 1b
tad d3 tad d3
dac 1b dac 1b
@@ -30,36 +30,36 @@ start:
lac 3b lac 3b
tad d3 tad d3
dac 3b dac 3b
isz cplan isz cplan " cplan++
jmp 4b jmp 4b " }
law dspl-1 law dspl-1
dac clistp dac clistp
dac lanflg dac lanflg " lanflg = true
dzm crflg dzm crflg " crflg = false
dzm goflg dzm goflg " goflg = false
dzm .pbsint dzm .pbsint " pbsint = 0
dzm forflg dzm forflg " forflg = false
dzm bacflg dzm bacflg " bacflg = false
dzm dspflg dzm dspflg "[line connecting this instruction to... - scan markup]
dzm locflg dzm locflg " locflg = false
dzm locpar dzm locpar "[... this instruction - scan markup]
lac d1 lac d1
dac par dac par " par = 1
jms dispname jms dispname " dispname()
fld; prsq+4 fld; prsq+4
sqrt sqrt
fst; rpar fst; rpar " rpar = sqrt(prsq[par])
fst; y fst; y " y = rpar
fst; oy fst; oy " oy = y
fld; fpone fld; fpone
fst; sphi fst; sphi " sphi = 1
fst; stheta fst; stheta " stehta = sphi
jms dspsca jms dspsca " dspsca()
fld; fpzero fld; fpzero
fst; x fst; x " x = 0
fst; ox fst; ox " ox = x
fst; cphi fst; cphi " cphi = ox
fst; ctheta fst; ctheta " ctheta = cphi
law displist law displist
"** 12-92-119.pdf page 2 "** 12-92-119.pdf page 2
sys capt sys capt
@@ -68,174 +68,174 @@ start:
loop: loop:
law dspl-1 law dspl-1
dac clistp dac clistp
jms contrl jms contrl "[arrow from below points to this instruction - scan markup]
lac par lac par
jms absxy jms absxy " absxy(par)
jms shipxy jms shipxy " shipxy()
lac goflg lac goflg
spa spa
jmp loop3 jmp loop3 "[long dash after loop3 - scan markup] if (!goflg) {
fld; fpzero fld; fpzero
fst; ax fst; ax " ax = 0
fst; ay fst; ay " ay = 0
fst; maxa fst; maxa " maxa = 0
lac nplan lac nplan " AC = nplan
skp skp
loop1: loop1:
lac cplan lac cplan " AC = cplan
tad dm1 tad dm1 " AC--
spa spa
jmp loop2 jmp loop2 " while (AC >= 0) {
dac cplan dac cplan " cplan = AC
tad fppar tad fppar
dac fcplan dac fcplan
lac i fcplan lac i fcplan
dac fcplan dac fcplan
jms updacc jms updacc " updacc()
jms displa jms displa " displa()
lac cplan lac cplan
sza sza
jms updpln jms updpln " if (cplan) updpln()
lac cplan lac cplan
and o7 and o7
sad o7 sad o7
jms contrl jms contrl " if (cplan & 7 == 7) contrl()
jmp loop1 jmp loop1 " }
loop2: loop2:
lac lanflg lac lanflg
sma sma
jms updshp jms updshp " if (!lanflg) updshp()
loop3: loop3: " }
fld; horizv fld; horizv "[a box enclosing all code from loop3 to loop4 - scan markup]
lac scale lac scale "[arrow drawn from box up to location above - scan markup]
cma cma
tad vscale tad vscale
tad aexp tad aexp
dac aexp dac aexp
jms inscr jms inscr
jmp loop4 jmp loop4 " if ((AC = inscr(horizv / 2**(vscale-scale-1)))) {
tad o141577 tad o141577
dac i clistp dac i clistp "[crossed out with an arrow pointint to "dac dspvel" - scan markup]
lac o164372 lac o164372 "[crossed out - scan markup]
dac clistp i dac clistp i "[crossed out - scan markup]
cla cla "[crossed out - scan markup]
jms dsplanet jms dsplanet "[crossed out - scan markup] dsplanet(0)
loop4: loop4: "[inside a drawn box - scan markup] }
sys time "put delay here..... sys time "put delay here.....
"** 12-92-119.pdf page 3 "** 12-92-119.pdf page 3
dzm dispcl dzm dispcl " dispcl = ""
lac crflg lac crflg
sma sma
jmp 1f jmp 1f " if (crflg)
lac o20714 "cl lac o20714 "cl
dac dispcl dac dispcl " dispcl = "CL"
jmp 2f jmp 2f
1: 1:
lac lanflg lac lanflg
sma sma
jmp 2f jmp 2f " else if (lanflg)
lac o114 "l lac o114 "l
dac dispcl dac dispcl " dispcl = "L"
2: 2:
lac dhalt lac dhalt
dac i clistp dac i clistp
jmp loop " check 2-display question jmp loop " check 2-display question
contrl: 0 contrl: 0
lac i .pbson lac i .pbson " load push button flags
xor .pbsint xor .pbsint
and .pbson i and .pbson i " AC = (.pbson ^ .pbsint) & .pbson
sna sna
jmp noneon jmp noneon " if (AC) {
lmq lmq
spa ral spa ral
sys exit sys exit " if (pbson[0]) exit()
sma sma
jmp 1f jmp 1f " if (pbson[1]) {
dzm goflg dzm goflg " goflg = false
dzm crflg dzm crflg " crflg = false
1: 1: " }
lacq lacq
als 6 als 6
sma ral sma ral
jmp 1f jmp 1f " if (pbson[6]) {
spa spa
jmp noneon jmp noneon " if (!pbson[7]) {
isz scale isz scale " scale++
nop nop
jms dspsca "uprange jms dspsca "uprange
jmp noneon jmp noneon " }
1: 1: " }
sma sma
jmp noneon jmp noneon " if (pbson[7]) {
-1 -1
tad scale tad scale
dac scale dac scale " scale--
jms dspsca "downrange jms dspsca "downrange
noneon: noneon: " } }
dzm forflg dzm forflg " forflg = false
dzm bacflg dzm bacflg " bacflg = false
lac i .pbson lac i .pbson
dac .pbsint dac .pbsint
als 2 als 2
sma sma
jmp 1f jmp 1f " if (pbson[2]) {
lac dhalt lac dhalt
dac forflg dac forflg " forflg = true
lac goflg lac goflg
sma sma
"** 12-92-119.pdf page 4 "** 12-92-119.pdf page 4
dzm lanflg dzm lanflg " if (!goflg) lanflg = false
1: 1: " }
lac i .pbson lac i .pbson
als 3 als 3
sma sma
jmp 1f jmp 1f " if (pbson[3]) {
lac dhalt lac dhalt
dac bacflg dac bacflg " bacflg = true
lac goflg lac goflg
sma sma
dzm lanflg dzm lanflg " if (!goflg) lanflg = false
1: 1: " }
lac i .pbson lac i .pbson
als 4 als 4
sma sma
jmp 1f jmp 1f " if (pbson[4]) {
ral ral
spa spa
jmp i contrl jmp i contrl " if (pbson[5]) return
dzm 9f+t dzm 9f+t " 9f+t = false
jmp 2f jmp 2f
1: 1: " } else {
ral ral
sma sma
jmp i contrl jmp i contrl " if (!pbson[5]) return
lac dhalt lac dhalt
dac 9f+t dac 9f+t " 9f+t = true
2: 2: " }
fld; cphi fld; cphi
fmp; sdphi fmp; sdphi
lac 9f+t lac 9f+t
sma sma
fng fng
fst; ftmp1 fst; ftmp1 " ftmp1 = cphi * sdphi * (9f+t ? 1 : -1)
fld; sphi fld; sphi
fmp; cdphi fmp; cdphi
fad; ftmp1 fad; ftmp1
fst; ftmp2 fst; ftmp2 " ftmp2 = sphi * cdphi + ftmp1
fld; sphi fld; sphi
fmp; sdphi fmp; sdphi
lac 9f+t lac 9f+t
spa spa
fng fng
fst; ftmp1 fst; ftmp1 " ftmp1 = sphi * sdphi * (9f+t ? -1 : 1)
fld; cphi fld; cphi
fmp; cdphi fmp; cdphi
fad; ftmp1 fad; ftmp1
fst; cphi fst; cphi " cphi = cphi * cdphi + ftmp1
fld; ftmp2 fld; ftmp2
fst; sphi fst; sphi " sphi = ftmp2
jmp i contrl jmp i contrl
t = t+1 t = t+1
@@ -244,10 +244,10 @@ shipxy: 0
fld; absx fld; absx
fad; x fad; x
fng fng
fst; shipx fst; shipx " shipx = -(absx + x)
fld; absy fld; absy
fad; y fad; y
"** 12-92-119.pdf page 5 "** 12-92-119.pdf page 5
fng fng
fst; shipy fst; shipy " shipy = -(absy + y)
jmp i shipxy jmp i shipxy
+67 -67
View File
@@ -9,32 +9,32 @@ absv: 0
dzm absy+1 dzm absy+1
dzm absy+2 dzm absy+2
1: 1:
dac absi dac absi " absi = AC
sna sna
jmp i absv jmp i absv " while (absi) {
tad fppar tad fppar
dac 9f+t dac 9f+t
jms invert jms invert " invert(absi) -> ftmp1 = px[absi], ftmp2 = py[absi]
fld; ftmp1 fld; ftmp1
fng fng
fad; absx fad; absx
fst; absx fst; absx " absx -= ftmp1
fld; ftmp2 fld; ftmp2
fng fng
fad; absy fad; absy
fst; absy fst; absy " absy -= ftmp2
jms invert jms invert " invert(absi) -> ftmp1 = px[absi], ftmp2 = py[absi]
fld; ftmp1 fld; ftmp1
fad; absx fad; absx
fst; absx fst; absx " absx += ftmp1
fld; ftmp2 fld; ftmp2
fad; absy fad; absy
fst; absy fst; absy " absy += ftmp2
lac absi lac absi
tad ppar tad ppar
dac 9f+t dac 9f+t
lac i 9f+t lac i 9f+t " absi = ppar[absi]
jmp 1b jmp 1b " }
invert: 0 invert: 0
lac i 9f+t lac i 9f+t
@@ -50,12 +50,12 @@ invert: 0
dac 4f dac 4f
fld; 1:.. fld; 1:..
fng fng
fst; 2:.. fst; 2:.. " pww[par] = -pww[par]
jms updpln jms updpln " updpln()
fld; 3:.. fld; 3:..
fst; ftmp1 fst; ftmp1 " ftmp1 = px[par]
fld; 4:.. fld; 4:..
fst; ftmp2 fst; ftmp2 " ftmp2 = py[par]
jmp i invert jmp i invert
t = t+1 t = t+1
@@ -82,122 +82,122 @@ updpln: 0
dac 8f dac 8f
fld; 1:.. fld; 1:..
fst; ftmp1 fst; ftmp1 " ftmp1 = px[fcplan]
fmp; 2:.. fmp; 2:..
fst; ftmp2 fst; ftmp2 " ftmp2 = ftmp1 * pw[fcplan]
fld; 3:.. fld; 3:..
fmp; 4:.. fmp; 4:..
fng fng
fad; ftmp2 fad; ftmp2
fst; 5:.. fst; 5:.. " px[fcplan] = - (py[fcplan] * pww[fcplan]) + ftmp2
fld; 6:.. fld; 6:..
fmp; 7:.. fmp; 7:..
fst; ftmp2 fst; ftmp2 " ftmp2 = py[fcplan] * pw[fcplan]
fld; ftmp1 fld; ftmp1
fmp; 8:.. fmp; 8:..
fad; ftmp2 fad; ftmp2
fst; 0:.. fst; 0:.. " py[fcplan] = ftmp1 * pww[fcplan] + ftmp2
jmp updpln i jmp updpln i
updacc: 0 updacc: 0 " update acceleration
lac cplan lac cplan
sad par sad par
jmp upda2 jmp upda2 " if (cplan != par) {
jms absxy jms absxy " absxy(cplan)
fld; absx fld; absx
fad; shipx fad; shipx " FAC = absx + shipx
jmp 1f jmp 1f " } else {
upda2: upda2:
fld; x fld; x
fng fng " FAC = -x
1: 1: " }
fst; absx fst; absx " absx = FAC
fmp; absx fmp; absx
fst; ftmp1 fst; ftmp1 " ftmp1 = absx * absx
lac cplan lac cplan
sad par sad par
jmp 1f jmp 1f " if (cplan != par)
fld; absy fld; absy
fad; shipy fad; shipy " FAC = absy + shipy
jmp 2f jmp 2f
1: 1:
fld; y fld; y
fng fng " else FAC = -y
"** 12-92-119.pdf page 8 "** 12-92-119.pdf page 8
2: 2:
fst; absy fst; absy
fmp; absy fmp; absy
fad; ftmp1 fad; ftmp1
fst; dtmp1 fst; dtmp1 " dtmp1 = absy * absy + ftmp1
sqrt sqrt
fst; dpar fst; dpar " dpar = sqrt(dtmp1)
lac cplan lac cplan
sad par sad par
skp skp
jmp upda5 jmp upda5 " if (cplan == par) {
fld; ox fld; ox
fng fng
fad; x fad; x
fst; ftmp1 fst; ftmp1 " ftmp1 = -ox + x
fmp; y fmp; y
fst; horizv fst; horizv " horizv = ftmp1 * y
fld; y fld; y
fng fng
fad; oy fad; oy
fst; ftmp2 fst; ftmp2 " ftmp2 = -y + oy
fmp; x fmp; x
fad; horizv fad; horizv
fdv; dpar fdv; dpar
fst; horizv fst; horizv " horizv = (ftmp2 * x + horizv) / dpar
fld; dpar fld; dpar
fcp; rpar fcp; rpar
sma sma
jmp upda5 jmp upda5 " if (dpar < rpar) {
lac lanflg lac lanflg
spa spa
jmp upda5 jmp upda5 " if (!lanflg) {
fld; ftmp1 fld; ftmp1
fmp; ftmp1 fmp; ftmp1
fst; ftmp1 fst; ftmp1 " ftmp1 *= ftmp1
fld; ftmp2 fld; ftmp2
fmp; ftmp2 fmp; ftmp2
fad; ftmp1 fad; ftmp1
fcp; crash fcp; crash
spa spa
jmp 1f jmp 1f " if (ftmp2 * ftmp2 + ftmp1 > crash) {
lac dhalt lac dhalt
dac goflg dac goflg " goflg = true
dac crflg dac crflg " crflg = true
1: 1: " }
lac dhalt lac dhalt
dac lanflg dac lanflg " lanflg = true
fld; rpar fld; rpar
fdv; dpar fdv; dpar
fst; ftmp1 fst; ftmp1 " ftmp1 = rpar / dpar
fmp; x fmp; x
fst; x fst; x " x *= ftmp1
fst; ox fst; ox " ox = x
fld; ftmp1 fld; ftmp1
fmp; y fmp; y
fst; y fst; y " y *= ftmp1
fst; oy fst; oy " oy = y
lac par lac par
jms absxy jms absxy " absxy(par)
jms shipxy jms shipxy " shipxy()
jmp upda2 jmp upda2 " } } }
"** 12-92-119.pdf page 9 "** 12-92-119.pdf page 9
upda5: upda5:
fcp; fardst fcp; fardst
spa spa
jmp 1f jmp 1f " if (dpar > fardst) {
lac cplan lac cplan
sna sna
jmp 1f jmp 1f " if (cplan) {
lac dhalt lac dhalt
dac grvflg dac grvflg " grvflg = true
jmp i updacc jmp i updacc " return
1: 1: " } }
dzm grvflg dzm grvflg " grvflg = false
lac fcplan lac fcplan
tad accl tad accl
dac 1f dac 1f
@@ -205,18 +205,18 @@ upda5:
fdv; dtmp1 fdv; dtmp1
fcp; maxa fcp; maxa
spa spa
jmp 2f jmp 2f " if (accl[fcplan] / dtmp1 > maxa) {
fst; maxa fst; maxa " maxa = accl[fcplan] / dtmp1
lac cplan lac cplan
dac maxj dac maxj " maxj = cplan
2: 2: " }
fdv; dpar fdv; dpar
fst; ftmp1 fst; ftmp1 " ftmp1 = (accl[fcplan] / dtmp1) / dpar
fmp; absx fmp; absx
fad; ax fad; ax
fst; ax fst; ax " ax += ftmp1 * absx
fld; ftmp1 fld; ftmp1
fmp; absy fmp; absy
fad; ay fad; ay
fst; ay fst; ay " ay += ftmp1 * absy
jmp i updacc jmp i updacc
+60 -60
View File
@@ -7,111 +7,111 @@ updshp: 0
jmp .+4 jmp .+4
lac bacflg lac bacflg
sma sma
jmp 3f jmp 3f " if (forflg || bacflg) {
fld; ascale fld; ascale " FAC = ascale
lac forflg lac forflg
sma sma
jmp 1f jmp 1f
lac bacflg lac bacflg
sma sma
jmp 1f+1 jmp 1f+1
fld; fpzero fld; fpzero " if (forflg && bacflg) FAC = 0
jmp 2f jmp 2f
1: 1:
fng fng " if (!forflg) FAC = -FAC
lac scale lac scale
tad aexp tad aexp
dac aexp dac aexp " FAC = FAC * 2**scale
lac forflg lac forflg
sma sma
jmp .+3 jmp .+3
2: 2:
lac accflg lac accflg "[arrow pointing here from the text "how to set?" - scan markup]
sma sma
jmp .+3 jmp .+3
fad; maxa fad; maxa " if (accflg) FAC += maxa
fng fng " FAC = -FAC
fst; ftmp1 fst; ftmp1
fmp; ctheta fmp; ctheta
fad; ax fad; ax
fst; ax fst; ax " ax += ftmp1 * ctheta
fld; ftmp1 fld; ftmp1
fmp; stheta fmp; stheta
fad; ay fad; ay
fst; ay fst; ay " ay += ftmp1 * stheta
3: 3: " }
fld; ox fld; ox
fng fng
fad; ax fad; ax
fst; ftmp1 fst; ftmp1 " ftmp1 = -ox + ax
fld; x fld; x
lac aexp lac aexp
tad d1 tad d1
dac aexp dac aexp
fad; ftmp1 fad; ftmp1
fst; ftmp1 fst; ftmp1 " ftmp1 += x*2
fld; x fld; x
fst; ox fst; ox " ox = x
fld; ftmp1 fld; ftmp1
fst; x fst; x " x = ftmp1
fld; oy fld; oy
fng fng
fad; ay fad; ay
fst; ftmp1 fst; ftmp1 " ftmp1 = -oy + ay
fld; y fld; y
lac aexp lac aexp
tad d1 tad d1
"** 12-92-119.pdf page 11 "** 12-92-119.pdf page 11
dac aexp dac aexp
fad; ftmp1 fad; ftmp1
fst; ftmp1 fst; ftmp1 " ftmp1 += y*2
fld; y fld; y
fst; oy fst; oy " oy = y
fld; ftmp1 fld; ftmp1
fst; y fst; y " y = ftmp1
lac par lac par
sad maxj sad maxj
jmp i updshp jmp i updshp " if (par == maxj) return
jms absxy jms absxy " absxy(par)
jms shipxy jms shipxy " shipxy()
lac par lac par
jms absv jms absv " absv(par)
fld; ox fld; ox
fng fng
fad; x fad; x
fad; absx fad; absx
fst; ox fst; ox " ox = -ox + x + absx
fld; oy fld; oy
fng fng
fad; y fad; y
fad; absy fad; absy
fst; oy fst; oy " oy = -oy + y + absy
lac maxj lac maxj
dac par dac par " par = maxj
jms absv jms absv " absv(par)
fld; ox fld; ox
fng fng
fad; absx fad; absx
fst; ox fst; ox " ox = -ox + absx
fld; oy fld; oy
fng fng
fad; absy fad; absy
fst; oy fst; oy " oy = -oy + absy
lac par lac par
jms absxy jms absxy " absxy(par)
fld; absx fld; absx
fad; shipx fad; shipx
fng fng
fst; x fst; x " x = -(absx + shipx)
fad; ox fad; ox
fst; ox fst; ox " ox += x
fld; absy fld; absy
fad; shipy fad; shipy
fng fng
fst; y fst; y " y = -(absy + shipy)
fadins: fadins: " fad instruction
fad; oy fad; oy
fst; oy fst; oy " oy += y
lac par lac par
tad fppar tad fppar
dac 1f dac 1f
@@ -120,69 +120,69 @@ fadins:
dac 1f dac 1f
fld; 1:.. fld; 1:..
sqrt sqrt
fst; rpar fst; rpar " rpar = sqrt(prsq[par])
jms dspsca jms dspsca " dspsca()
lac par lac par
"** 12-92-119.pdf page 12 "** 12-92-119.pdf page 12
jms dispname jms dispname " dispname(par)
jmp i updshp jmp i updshp
inscr: 0 inscr: 0 " in screen
fng fng
fix fix " AC = (int) -FAC
tad d383 tad d383 " AC += 383
spa spa
jmp i inscr jmp i inscr " if (AC < 0) return
tad dm768 tad dm768 " AC -= 768
sma sma " if (AC >= 0) return
jmp i inscr jmp i inscr
isz inscr isz inscr
jmp i inscr jmp i inscr " return AC
absxy: 0 absxy: 0
sna sna
jmp 7f jmp 7f " if (AC) {
lmq lmq
lac fldins lac fldins
dac 2f-1 dac 2f-1 " C(2f-1) = fld
dac 4f-1 dac 4f-1 " C(4f-1) = fld
lacq lacq
1: 1: " while (true) {
dac absi dac absi " absi = AC
sna sna
jmp i absxy jmp i absxy " if (!absi) return
tad fppar tad fppar
dac 9f+t dac 9f+t
lac i 9f+t lac i 9f+t
5: 5:
tad px tad px
dac 2f dac 2f
fldins: fldins: " fld instruction
fld; absx fld; absx
fad; 2:.. fad; 2:..
fst; absx fst; absx " if (i==0) absx = px[absi]; else absx += px[absi]
lac i 9f+t lac i 9f+t
6: 6:
tad py tad py
dac 4f dac 4f
fld; absy fld; absy
fad; 4:.. fad; 4:..
fst; absy fst; absy " if (i==0) absy = py[absi]; else absy += py[absi]
lac fadins lac fadins
dac 2b-1 dac 2b-1
dac 4b-1 dac 4b-1
lac absi lac absi
tad ppar tad ppar
dac 9f+t dac 9f+t
lac i 9f+t lac i 9f+t " AC = ppar[absi]
jmp 1b jmp 1b " }
7: 7: " } else {
dzm absx dzm absx " absx = 0
dzm absx+1 dzm absx+1
dzm absx+2 dzm absx+2
dzm absy dzm absy " absy = 0
dzm absy+1 dzm absy+1
dzm absy+2 dzm absy+2
jmp i absxy jmp i absxy " }
"** 12-92-119.pdf page 13 "** 12-92-119.pdf page 13
t = t+1 t = t+1
+90 -90
View File
@@ -5,37 +5,37 @@ displa: 0
lac locpar lac locpar
sad cplan sad cplan
skp skp
jmp 2f jmp 2f " if (cplan == locpar) {
lac locflg lac locflg "[arrow points here from the text "how to set?" - scan markup]
sma sma
jmp 1f jmp 1f " if (locflg) {
fld; cphi fld; cphi "[-\ - scan markup]
fmp; absy fmp; absy "[ | - scan markup]
fst; ftmp1 fst; ftmp1 "[ | - scan markup] ftmp1 = cphi * absy
fld; sphi "[ | - scan markup]
fmp; absx "[ | - scan markup]
fad; ftmp1 "[ | - scan markup]
fdv; dpar "[ | - scan markup]
fst; stheta "[ \ lock calculation - scan markup] stheta = (sphi * absx + ftmp1) / dpar
fld; sphi "[ / - scan markup]
fmp; absy "[ | - scan markup]
fng "[ | - scan markup]
fst; ftmp1 "[ | - scan markup] ftmp1 = - (sphi * absy)
fld; cphi "[ | - scan markup]
fmp; absx "[ | - scan markup]
fad; ftmp1 "[ | - scan markup]
fdv; dpar "[ | - scan markup]
fst; ctheta "[ | - scan markup] ctheta = (cphi * absx + ftmp1) / dpar
jmp 2f "[-/ - scan markup]
1: " } else {
fld; sphi fld; sphi
fmp; absx fst; stheta " stheta = sphi
fad; ftmp1
fdv; dpar
fst; stheta
fld; sphi
fmp; absy
fng
fst; ftmp1
fld; cphi fld; cphi
fmp; absx fst; ctheta " ctheta = cphi
fad; ftmp1 2: " } }
fdv; dpar
fst; ctheta
jmp 2f
1:
fld; sphi
fst; stheta
fld; cphi
fst; ctheta
2:
fld; absx fld; absx
sfmp; ctheta sfmp; ctheta
fst; ftmp1 fst; ftmp1 " ftmp1 = absx * ctheta
fld; absy fld; absy
sfmp; stheta sfmp; stheta
fad; ftmp1 fad; ftmp1
@@ -44,30 +44,30 @@ displa: 0
tad scale tad scale
cma cma
dac aexp dac aexp
fst; spy fst; spy " spy = (absy * stheta + ftmp1) / 2**scale
dzm inflg dzm inflg " inflg = false
jms inscr jms inscr
jmp 1f jmp 1f " if ((AC = inscr(spy))) {
tad o145777 tad o145777
dac clistp i dac clistp i
jms rotx jms rotx " rotx()
lac dhalt lac dhalt
dac inflg dac inflg " inflg = true
jms inscr jms inscr
jmp 1f jmp 1f " if ((AC = inscr(spx))) {
tad o161577 tad o161577
dac i clistp dac i clistp
lac cplan lac cplan
jms dsplanet jms dsplanet " dsplanet(cplan)
1: 1: " } }
jms drcirc jms drcirc " drcirc()
"** 12-92-119.pdf page 15 "** 12-92-119.pdf page 15
jmp i displa jmp i displa
rotx: 0 rotx: 0
fld; absx fld; absx
sfmp; stheta sfmp; stheta
fst; ftmp1 fst; ftmp1 " ftmp1 = absx * stheta
fld; absy fld; absy
sfmp; ctheta sfmp; ctheta
fng fng
@@ -77,70 +77,70 @@ rotx: 0
tad scale tad scale
cma cma
dac aexp dac aexp
fst; spx fst; spx " spx = (-(absy * ctheta) + ftmp1) / 2**scale
jmp i rotx jmp i rotx
surf: 0 surf: 0
-1 -1
tad setx tad setx
cma cma
dac tsetx dac tsetx " tsetx = -setx
lac setx lac setx
tad o141577 tad o141577
dac i clistp dac i clistp
-1 -1
tad sety tad sety
cma cma
dac tsety dac tsety " tsety = -sety
lac sety lac sety
tad o165777 tad o165777
dac clistp i dac clistp i
lac narcs lac narcs
dac nt dac nt " nt = narcs
fld; wx fld; wx
fst; twx fst; twx " twx = wx
fld; wy fld; wy
fst; twy fst; twy " twy = wy
fld; v fld; v
fng fng
fst; v fst; v " v = -v
2: 2: " while (nt != 0) {
fld; v fld; v
sfmp; twy sfmp; twy
fng fng
fst; ftmp1 fst; ftmp1 " ftmp1 = -(v * twy)
fld; vv fld; vv
sfmp; twx sfmp; twx
fad; ftmp1 fad; ftmp1
fst; ftmp2 fst; ftmp2 " ftmp2 = vv * twx + ftmp1
fld; v fld; v
sfmp; twx sfmp; twx
fst; ftmp1 fst; ftmp1 " ftmp1 = v * twx
fld; vv fld; vv
sfmp; twy sfmp; twy
fad; ftmp1 fad; ftmp1
fst; twy fst; twy " twy = vv * twy + ftmp1
fad; spy fad; spy
jms inscr jms inscr
jmp 1f jmp 1f " if (!(AC = inscr(twy + spy))) return false
"** 12-92-119.pdf page 16 "** 12-92-119.pdf page 16
tad tsety tad tsety
dac dely dac dely " dely = AC + tsety
cma cma
tad d1 tad d1
tad tsety tad tsety
dac tsety dac tsety " tsety -= dely
fld; ftmp2 fld; ftmp2
fst; twx fst; twx " twx = ftmp2
fad; spx fad; spx
jms inscr jms inscr
jmp 1f jmp 1f " if (!(AC = inscr(twx + spx))) return false
tad tsetx tad tsetx
dac delx dac delx " delx = res + tsetx
cma cma
tad d1 tad d1
tad tsetx tad tsetx
dac tsetx dac tsetx " tsetx -= delx
lac delx lac delx
sma sma
jmp .+3 jmp .+3
@@ -156,17 +156,17 @@ surf: 0
tad delx tad delx
tad o220000 tad o220000
dac i clistp dac i clistp
isz nt isz nt " nt++
jmp 2b jmp 2b " }
jmp i surf jmp i surf " return true
1: 1:
isz surf isz surf
jmp i surf jmp i surf
drcirc: 0 drcirc: 0 " draw circle
lac grvflg lac grvflg
spa spa
jmp i drcirc jmp i drcirc " if (grvflg) return
lac fcplan lac fcplan
tad prsq tad prsq
dac .+2 dac .+2
@@ -177,79 +177,79 @@ drcirc: 0
tad scale tad scale
cma cma
dac aexp dac aexp
fst; dtmp1 fst; dtmp1 " dtmp1 = sqrt(prsq[fcplan]) / (2**scale)
fcp; thrs fcp; thrs
spa spa
jmp i drcirc jmp i drcirc " if (dtmp1 < thrs) return
fng fng
lac dpar lac dpar
cma cma
tad scale tad scale
"** 12-92-119.pdf page 17 "** 12-92-119.pdf page 17
cma cma
dac dpar dac dpar " dpar /= (2**scale)
fad; dpar fad; dpar
sfdv; dpar sfdv; dpar
fst; dtmp2 fst; dtmp2 " dtmp2 = (-dtmp1 + dpar) / dpar
sfmp; spy sfmp; spy
fst; wy fst; wy " wy = dtmp2 * spy
jms inscr jms inscr " if (!(AC = inscr(wy)))
jmp i drcirc jmp i drcirc " return
dac sety dac sety " sety = AC
lac inflg lac inflg
sma sma
jms rotx jms rotx " if (!inflg) rotx()
fld; dtmp2 fld; dtmp2
sfmp; spx sfmp; spx
fst; wx fst; wx " wx = dtmp2 * spx
jms inscr jms inscr " if (!(AC = inscr(wx)))
jmp i drcirc jmp i drcirc " return
dac setx dac setx " setx = AC
fld; spy fld; spy
fng fng
fad; wy fad; wy
fst; wy fst; wy " wy -= spy
fld; spx fld; spx
fng fng
fad; wx fad; wx
fst; wx fst; wx " wx -= spx
fld; dtmp1 fld; dtmp1
sfmp; pid10 sfmp; pid10 " FAC = dtmp1 * pid10
fcp; f400 fcp; f400
spa spa
jmp 1f jmp 1f " if (FAC > 400) {
lac d400 lac d400
dac narcs dac narcs " narcs = 400
jmp 2f jmp 2f " } else {
1: 1:
fix fix " AC = (int) FAC
tad dm20 tad dm20
spa spa
cla cla " if (AC - 20 < 0) AC = 0
tad d20 tad d20 " AC += 20
dac narcs dac narcs " narcs = AC
flt flt " }
2: 2:
fst; dtmp1 fst; dtmp1
-1 -1
tad narcs tad narcs
cma cma
dac narcs dac narcs " narcs = -narcs
fld; f2pi fld; f2pi
sfdv; dtmp1 sfdv; dtmp1
fst; v fst; v " v = f2pi / dtmp1
sfmp; v sfmp; v
-1 -1
tad aexp tad aexp
dac aexp dac aexp
fng fng
fad; fpone fad; fpone
fst; vv fst; vv " vv = -(v*v)/2 + 1
lac o40004 lac o40004 " intens 0
dac i clistp dac i clistp
"** 12-92-119.pdf page 18 "** 12-92-119.pdf page 18
jms surf jms surf
jmp i drcirc jmp i drcirc " if (surf()) return
jms surf jms surf
jmp i drcirc jmp i drcirc " if (surf()) return
jmp i drcirc jmp i drcirc
+15 -15
View File
@@ -1,11 +1,11 @@
"** 12-92-119.pdf page 19 "** 12-92-119.pdf page 19
" space travel 5 " space travel 5
dsplanet: 0 dsplanet: 0 " display planet center
tad points tad points " add points address to ac (planet index)
dac 9f+t dac 9f+t
lac i 9f+t lac i 9f+t
dac i clistp dac i clistp " set planet brightness
lac o246256 lac o246256
dac i clistp dac i clistp
lac o253052 lac o253052
@@ -14,8 +14,8 @@ dsplanet: 0
dac i clistp dac i clistp
jmp dsplanet i jmp dsplanet i
dispname: 0 dispname: 0 " display planet name
tad names tad names " add names address to ac (planet index)
dac 9f+t dac 9f+t
lac i 9f+t lac i 9f+t
tad dm1 tad dm1
@@ -50,26 +50,26 @@ dispname: 0
t = t+2 t = t+2
dspsca: 0 dspsca: 0 " display scale
lac scale lac scale " AC = scale
sma sma
jmp 1f jmp 1f " if (scale < 0) {
lac o55 "- lac o55 "-
dac dssca dac dssca " dssca[0] = '-'
-1 -1
tad scale tad scale
cma cma " AC = -AC
jmp 2f jmp 2f
1: 1: " } else {
"** 12-92-119.pdf page 20 "** 12-92-119.pdf page 20
lac o53 "+ lac o53 "+
dac dssca dac dssca " dssca[0] = '+'
lac scale lac scale
2: 2: " }
cll; idiv; 10 cll; idiv; 10
tad o60 tad o60
dac dssca+2 dac dssca+2 " dssca[2] = (AC % 10) + '0'
lacq lacq
tad o60 tad o60
dac dssca+1 dac dssca+1 " dssca[1] = (AC / 10) + '0'
jmp i dspsca jmp i dspsca
+6 -6
View File
@@ -69,7 +69,7 @@ umbriel: <um>;<br>;<ie>;<l
uranus: <ur>;<an>;<us>;0 uranus: <ur>;<an>;<us>;0
venus: <ve>;<nu>;<s venus: <ve>;<nu>;<s
points: .+1 points: .+1 " planet center point brightness
br3 br3
br2 br2
br0 br0
@@ -109,13 +109,13 @@ fppar: .+1
48;51;54;57;60;63;66;69 48;51;54;57;60;63;66;69
72;75;78;81;84;87;90;93 72;75;78;81;84;87;90;93
ppar: .+1 ppar: .+1 " planet orbits (indices)
0;0;036;015;01;016;031;031 0;0;036;015;01;016;031;031
015;015;031;031;015;0;0;0 015;015;031;031;015;0;0;0
031;036;0;022;036;016;031;0 031;036;0;022;036;016;031;0
031;0;031;031;022;036;0;0 031;0;031;031;022;036;0;0
prsq: .+1 prsq: .+1 " planet radius squared relative to earth (radius 1)
016;0272245;075341 016;0272245;075341
1;0200000;0 1;0200000;0
-07;0244122;0506362 -07;0244122;0506362
@@ -150,7 +150,7 @@ prsq: .+1
05;0206115;0 05;0206115;0
0;0362406;0 0;0362406;0
accl: .+1 accl: .+1 " mass of each planet times gravitational constant
0;0204365;0 0;0204365;0
-023;0320324;0 -023;0320324;0
-036;0227207;0 -036;0227207;0
@@ -184,7 +184,7 @@ accl: .+1
-017;0275653;0 -017;0275653;0
-023;0252667;0 -023;0252667;0
px: .+1 px: .+1 " planet x position relative to orbit (unit=earth radius)
"** 12-92-119.pdf page 24 "** 12-92-119.pdf page 24
0;000000;0 0;000000;0
015;0620356;0 015;0620356;0
@@ -219,7 +219,7 @@ px: .+1
023;0650051;0 023;0650051;0
016;0233751;0 016;0233751;0
py: .+1 py: .+1 " planet y position relative to orbit (unit=earth radius)
000;0000000;0 000;0000000;0
017;0664054;0 017;0664054;0
002;0662035;0 002;0662035;0
+53 -53
View File
@@ -2,81 +2,81 @@
" space travel 7 " space travel 7
clistp = 017 clistp = 017
br0 = 040004 br0 = 040004 " intens 0
br1 = 040005 br1 = 040005 " intens 1
br2 = 040006 br2 = 040006 " intens 2
br3 = 040007 br3 = 040007 " intens 3
d10: 10 d10: 10
d3: 3 d3: 3
o246256: 0246256 o246256: 0246256 " incr n=1 dir=1 (NE), n=2 dir=6 (W)
o253052: 0253052 o253052: 0253052 " incr n=2 dir=4 (S), n=2 dir=2 (E)
o246036: 0246036 o246036: 0246036 " incr n=1 dir=0 (N), n=1 dir=6 (W)
o177: 0177 o177: 0177 " 7-bit mask (127)
nplan: 32 nplan: 32 " number of planets
d1: 1 d1: 1
d20: 20 d20: 20
dm1: -1 dm1: -1
o141577: 0141577 o141577: 0141577 " dsetx 895 (view right)
o161577: 0161577 o161577: 0161577 " dsetx (delay) 895 (view right)
o164372: 0164372 o164372: 0164372 " dsety (delay) 250 (view bottom)
o114: 0114 o114: 0114 " ascii L
o20714: 020714 o20714: 020714 " ascii "CL"
d383: 383 d383: 383 " 895 (view right) - 512 (scope width / 2)
dm768: -768 dm768: -768 " 127 (view left) - 895 (view right)
o145777: 0145777 o145777: 0145777 " dsety 1023 (view top)
o165777: 0165777 o165777: 0165777 " dsety (delay) 1023 (view top)
o7: 7 o7: 7
o60: 060 o60: 060
o55: 055 o55: 055
o53: 053 o53: 053
o41: 041 o41: 041
o220000: 0220000 o220000: 0220000 " short vec vis
d400: 400 d400: 400
dm20: -20 dm20: -20
o40004: 040004 o40004: 040004
fardst: 020;0200000; 0 fardst: 020;0200000; 0 " fardst = 32768
f2pi: 03;0311037;552421 f2pi: 03;0311037;552421 " 2 * pi, missing octal prefix
pid10: -01;0240662;756647 pid10: -01;0240662;756647 " pi / 10, missing octal prefix
thrs: 02;0200000;0 thrs: 02;0200000;0 " threshold = 2.0
f400: 011;0310000;0 f400: 011;0310000;0
crash: -028;0200000;0 crash: -028;0200000;0 " crash ~ 0
stheta: 01;0200000;0 stheta: 01;0200000;0
ctheta: 0;0;0 ctheta: 0;0;0
fpzero: 0;0;0 fpzero: 0;0;0
scale: 0 scale: 0
vscale: 6 vscale: 6
ascale: -1 ascale: -1 " loaded as a float = -1;0777773;0253436 ~ -0.5
sdphi: -05;0253436;0700177 sdphi: -05;0253436;0700177 " sin(1.2 deg)
cdphi: 000;0377743;0201725 cdphi: 000;0377743;0201725 " cos(1.2 deg)
dhalt: 0400000 dhalt: 0400000
fpone: 01;0200000;0 fpone: 01;0200000;0
9: .=.+t 9: .=.+t
horizv: .=.+3 horizv: .=.+3 " horizontal velocity
.pbson: .=.+1 .pbson: .=.+1
.pbsint: .=.+1 .pbsint: .=.+1
dspflg: .=.+1 dspflg: .=.+1
par: .=.+1 par: .=.+1 " current planet
absi: .=.+1 absi: .=.+1
absx: .=.+3 absx: .=.+3
"** 12-92-119.pdf page 27 "** 12-92-119.pdf page 27
absy: .=.+3 absy: .=.+3
v: .=.+3 v: .=.+3
vv: .=.+3 vv: .=.+3
spx: .=.+3 spx: .=.+3 " screen position x
spy: .=.+3 spy: .=.+3 " screen position y
wx: .=.+3 wx: .=.+3
wy: .=.+3 wy: .=.+3
twx: .=.+3 twx: .=.+3
twy: .=.+3 twy: .=.+3
setx: .=.+1 setx: .=.+1
sety: .=.+1 sety: .=.+1
narcs: .=.+1 narcs: .=.+1 " number of arcs
nt: .=.+1 nt: .=.+1
inflg: .=.+1 inflg: .=.+1
grvflg: .=.+1 grvflg: .=.+1 " gravity flag
dtmp1: .=.+3 dtmp1: .=.+3
dtmp2: .=.+3 dtmp2: .=.+3
delx: .=.+1 delx: .=.+1
@@ -85,26 +85,26 @@ tsetx: .=.+1
tsety: .=.+1 tsety: .=.+1
accflg: .=.+1 accflg: .=.+1
locpar: .=.+1 locpar: .=.+1
crflg: .=.+1 crflg: .=.+1 " crash landing flag
rpar: .=.+3 rpar: .=.+3 " planet radius
dpar: .=.+3 dpar: .=.+3 " distance to planet
ax: .=.+3 ax: .=.+3
ay: .=.+3 ay: .=.+3
maxa: .=.+3 maxa: .=.+3 " strongest gravity acceleration
maxj: .=.+1 maxj: .=.+1 " index of planet with strongest gravity
dcplan: .=.+1 dcplan: .=.+1
fcplan: .=.+1 fcplan: .=.+1 " floating point count planet (float index)
cplan: .=.+1 cplan: .=.+1 " count planet (index)
shipx: .=.+3 shipx: .=.+3
shipy: .=.+3 shipy: .=.+3
x: .=.+3 x: .=.+3 " x position relative to planet
y: .=.+3 y: .=.+3 " y position relative to planet
ox: .=.+3 ox: .=.+3
oy: .=.+3 oy: .=.+3
lanflg: .=.+1 lanflg: .=.+1 " landing flag
goflg: .=.+1 goflg: .=.+1 " game over flag
forflg: .=.+1 forflg: .=.+1 " forward flag
bacflg: .=.+1 bacflg: .=.+1 " backward flag
sphi: .=.+3 sphi: .=.+3
cphi: .=.+3 cphi: .=.+3
ftmp1: .=.+3 ftmp1: .=.+3
@@ -116,21 +116,21 @@ dsety = 0164000
vecx = 0120000 vecx = 0120000
vecy = 0124000 vecy = 0124000
m = 02000 m = 02000
displist: displist: " display list
075057 "scale 1 intens 3 blink on lp 0 sym 0 075057 "scale 1 intens 3 blink on lp 0 sym 0
dsetx 800 dsetx 800
dsety 20 dsety 20
dispcl: dispcl: " display L/CL
0 0
060004 "intens 0 blink off 060004 "intens 0 blink off
"** 12-92-119.pdf page 28 "** 12-92-119.pdf page 28
dsetx 0 dsetx 0
dsety 20 dsety 20
namedsp: namedsp: " display name
.=.+10 .=.+10
dsetx 400 dsetx 400
dsety 20 dsety 20
dssca: dssca: " display scale
.=.+3 .=.+3
040040 "scale 0 040040 "scale 0
dsetx 127 dsetx 127
@@ -152,7 +152,7 @@ dssca:
dsety 255 dsety 255
vecy 767 vecy 767
dsetx 127 dsetx 127
dsety 639 dsety 639 "[--- - scan markup]
vecx 767 vecx 767 "[an arrow starts between vecx and dspl, it points to the right - scan markup]
dspl: dspl: " display planets
0400000 0400000
+30 -23
View File
@@ -1,4 +1,10 @@
"** 13-120-147.pdf page 5 "** 13-120-147.pdf page 5
" TMG
" console switches:
" bit 0: do not save/dump core!!
" bit 15: trace first recognition or generate instruction & halt
" bit 16: trace all generation instructions
" bit 17: trace all recognition instructions
t=0 t=0
main: main:
lac 017777 i lac 017777 i
@@ -23,16 +29,16 @@ main:
jms advance; jmp 1f jms advance; jmp 1f
jmp rinterp jmp rinterp
0:lac 2f 0:lac 2f " get EOS
jms obuild jms obuild " add to obuf
1:lac owrite 1:lac owrite " here on retreat
spa spa " anything in obuf?
jmp 0b jmp 0b " no, put EOS
jms oflush jms oflush " flush buffered output
las las " get switches
spa spa " high bit set?
sys exit sys exit " yes: exit
sys save sys save " no, dump core!!!!
2:o777 2:o777
@@ -40,22 +46,23 @@ main:
"puts out and octal strin g from symtab entry "puts out and octal strin g from symtab entry
symoct: symoct: " BUILTIN: (output last symtab ent in octal?)
lac equ lac equ
add equbot add equbot
dac 9f+t dac 9f+t " save temp pointer
lac 1f lac 1f " fetch "gf" (execute native code) inst below
jms twoktab; lac 9f+t i jms twoktab; lac 9f+t i " second word is contents of word *temp
1:gf .+1 x " first word of "two word ktab" entry:
lac ii 1:gf .+1 x " invoke native code (below), and exit
dac 8 lac ii " fetch instruction pointer
lac 8 i dac 8 " save in auto-increment register 8
add symbot lac 8 i " fetch word after *ii
dac 9f+t add symbot " use as offset into symtab
dac 9f+t " save in temp
2:lac 9f+t i 2:lac 9f+t i " fetch symtab word *temp
jms putoct jms putoct " output octal
lac onenl lac onenl " output newline
jms obuild jms obuild
lac 9f+t i lac 9f+t i
and o600600 and o600600
+283 -225
View File
@@ -1,96 +1,112 @@
"** 13-120-147.pdf page 7 "** 13-120-147.pdf page 7
" recognition stack frame advance " recognition stack frame advance
" push stack frame: called in both recognition and generation
" (despite above comment).
" recognition frame size is 6, generation frame size is 4.
" 0: pointer to previous frame
" 1: jmp instr from after "jms advance" (for retreat/return)
" 2: saved ii (inst ptr)
" 3: saved ignore/env
" 4: saved j (always overwritten by nframe in recog. mode)
" 5: saved k
advance:0 advance:0
lac frame lac frame " get frame pointer
dac 8 dac 8 " save in auto-increment register 8
lac advance i lac advance i " get (retreat) instruction after "jms advance"
dac 8 i dac 8 i " save at offset 1
lac ii lac ii " instruction pointer
dac 8 i dac 8 i " save at offset 2
lac ignore lac ignore " ignore mask pointer (env in recog. mode?)
dac 8 i dac 8 i " save at offset 3
lac j lac j " input char pointer
dac 8 i dac 8 i " save at offset 4
lac k lac k " result pointer
dac 8 i dac 8 i " save at offset 5
lac frame lac frame " save current frame pointer
dac nframe i dac nframe i " at nframe offset zero
lac nframe lac nframe
dac frame dac frame " set frame pointer to nframe (new frame)
add dffrmsz add dffrmsz " add current frame size
dac nframe dac nframe " set new new frame pointer
dac nframe dac nframe " AGAIN??!!
jms between; add rbot; add rtop jms between; add rbot; add rtop " check for overflow
jms halt jms halt
isz advance isz advance " skip instruction after jms
jmp advance i jmp advance i " return
" Here on failure/backup (w/ fflag set to 760000)
" AND at (successful) end of rule
" (exit/indirect bit set on last instr).
" Always restores j/k on failure:
" (no such thing as "failure" in generation mode(?))
retreat: retreat:
dzm junk dzm junk
lac gflag lac gflag " in generation mode?
sza sza
jmp 1f jmp 1f " yes, skip bundling
jms bundlep jms bundlep " no, bundle
dac junk dac junk " save pointer (may be zero if no result)
1:lac frame 1:lac frame
dac nframe dac nframe " reset nframe to current frame pointer
lac frame i lac frame i " fetch prev. frame pointer from current frame
dac frame dac frame " pop current frame
dac 8 dac 8 " save in (pre) auto-increment register 8
lac 8 i lac 8 i " restore saved instruction
dac 3f "retrun address dac 3f "retrun address
lac 8 i lac 8 i
dac ii dac ii " restore saved instruction pointer
lac 8 i lac 8 i
dac ignore dac ignore " restore saved ignore ("env" in gen mode???)
lac fflag lac fflag " get failure flag
sna sna " any bits set?
jmp 2f jmp 2f " no, skip
lac 8 i "restore j and k on failure lac 8 i "restore j and k on failure
dac j dac j
lac 8 i lac 8 i
dac k dac k
2:lac junk 2:lac junk " get bundle/result(s)
sna sna " got anything?
jmp 3f jmp 3f " no
dac nframe i "stass reslts dac nframe i "stass reslts
isz nframe isz nframe
3:jmp 3:jmp " (jump following original "jms advance" call)
" bundle up results and return single pointer to them in ac " bundle up results and return single pointer to them in ac
" return 0 if no results " return 0 if no results
"** 13-120-147.pdf page 8 "** 13-120-147.pdf page 8
bundlep:0 bundlep:0
lac fflag lac fflag " check failure flag
sza sza " clear?
jmp 2f "no results on failure jmp 2f "no results on failure
jms nframe0 jms nframe0 " yes: get initial nframe pointer
dac 9f+t dac 9f+t " save
cma cma " get negative, minus one
tad nframe tad nframe " add current value
cma cma " get nframe0 - nframe! (-N or zero)
dac 9f+t+1 dac 9f+t+1 " save
sma sma " negative result?
jmp 2f jmp 2f " no, no change
sad m1 sad m1 " -1 (one result)
jmp 3f "only one result, no bundling necessary jmp 3f "only one result, no bundling necessary
lac 9f+t lac 9f+t " get initial nframe
tad m1 tad m1 " decrement
dac 8 dac 8 " save in (pre-)auto-increment reg. 8
1:lac 8 i 1:lac 8 i " fetch result
jms kput jms kput " save in ktab
isz 9f+t+1 isz 9f+t+1 " increment negative count until zero
jmp 1b jmp 1b " more left, continue
lac k "make up result pointer lac k "make up result pointer
add l.gk add l.gk " return as gk instruction
jmp bundlep i jmp bundlep i
2:cla 2:cla " here with no results, return zero
jmp bundlep i jmp bundlep i
3:lac 9f+t i 3:lac 9f+t i " here with one result, fetch it
jmp bundlep i jmp bundlep i
t=t+1 "where to find results t=t+1 "where to find results
t=t+1 "negative of result count t=t+1 "negative of result count
@@ -98,54 +114,58 @@ t=t+1 "negative of result count
" the main interpreter loop " the main interpreter loop
" locate original value of nframe for present stack level. " locate original value of nframe for present stack level.
nframe0:0 nframe0:0
jms s1get; add d.ii jms s1get; add d.ii " fetch instr. at saved intruction pointer
dac junk dac junk
lac junk i lac junk i " fetch word referenced by instruction
dac junk dac junk
lac junk i lac junk i " fetch word referenced by that word!!
and opmask and opmask " get instruction portion
sad l.rw sad l.rw " is it an "rw" instruction?
jmp 1f jmp 1f " yes.
lac refrsz lac refrsz " no, use recog frame size as offset
jmp 2f jmp 2f
1:lac junk i 1:lac junk i " get contents of word ref'ed by rw instr
and o17777 and o17777 " get rw instr address portion (offset)
2:add frame 2:add frame " make nframe pointer
jmp nframe0 i jmp nframe0 i " return
" halt on various error conditions:
" various table overflows
" console switch 15 set (trace and halt)
" invalid recognize/generate opcodes
halt:0 halt:0
lac 1f lac 1f
jms obuild jms obuild " output "\n?"
lac halt lac halt
jms putoct jms putoct " output return address in octal
lac onenl lac onenl
jms obuild jms obuild " output newline
xct rstack+1 xct rstack+1 " execute retreat jump from initial advance?!
1:.+1;012077;end 1:.+1;012077;end " "\n?"; end=-1 -- two 0777 EOSes
"** 13-120-147.pdf page 9 "** 13-120-147.pdf page 9
rinterp: rinterp: " recognition mode interpreter
las "trace check las "trace check
and d5 and d5
sna sna
jmp .+3 jmp .+3
lac bugr lac bugr
jms bug jms bug " trace
lac fflag lac fflag " fetch failure flag
ral ral " rotate top bit into LINK
lac ii i lac ii i " fetch current instruction
and opmask and opmask " get opcode
sad l.ra sad l.ra " "ra" (conditional branch on LINK set/fail)?
jmp rera jmp rera " yes
sad l.rb sad l.rb " "rb" (conditional branch on LINK clear/succ)?
jmp rerb jmp rerb " yes
szl szl " LINK set (failure)?
jmp retreat jmp retreat " yes: retreat!!
lrs 14 lrs 14 " no: shift opcode bits down
and o17 and o17 " isolate opcode bits
add rbranch add rbranch " create indirect jmp thru rbranch tabe
dac .+1 dac .+1 " save as next
jmp jmp
rbranch: rbranch:
@@ -153,7 +173,7 @@ rbranch:
reno reno
rerx rerx
rerc rerc
regc regc " opcode is "rt"!
rerf rerf
rerw rerw
rera rera
@@ -167,104 +187,112 @@ rbranch:
reuu reuu
reuu reuu
reuu: reuu: " recognition unused operation
jms halt jms halt " halt
rerb: rerb: " recognition "rb" instruction
cml cml " complement LINK bit
rera: rera: " recognition "ra" instruction
dzm fflag dzm fflag " clear failure flag
snl snl " LINK bit set?
jmp goon jmp goon " no: continue (w/ exit check)
jms aget jms aget " yes: fetch address part
dac ii dac ii " save as new instruction pointer
jmp rinterp jmp rinterp " go on (w/o exit check)
backup: backup: " here on failure from "rx", eof, char builtins
lac jsav lac jsav
dac j dac j
nuts: nuts: " here on failure from find/prev builtins
law " (could possibly be used as a "fail" builtin?)
law " get 0760000
"** 13-120-147.pdf page 10 "** 13-120-147.pdf page 10
dac fflag dac fflag " set failure flag
reno: reno: " recognition no(op) instruction
goon: goon: " "go on" on success from recog. builtins, ops
lac ii i lac ii i " fetch current instruction
isz ii isz ii " advance instruction pointer
and exitmask and exitmask " was exit (indirect) bit set on prev instr?
sza sza
jmp retreat jmp retreat " yes, retreat/return
jmp rinterp jmp rinterp " no, go on
rerw: rerw: " recognition rw instr (nframe0 looks for one!)
jms aget jms aget " get address portion of instruction
add frame add frame " use as frame size
dac nframe dac nframe " set nframe pointer
jmp goon jmp goon
rerc: rerc: " recognition rc (call tmg code) instruction
jms advance; jmp goon jms advance; jmp goon " push new frame, continue on retreat
jms aget jms aget " get address from instruction
dac ii dac ii " use as new instruction pointer
jmp rinterp jmp rinterp " go on (w/o exit check)
gegf: gegf: " gen. "gf" intr (invoke builtin func)
rerf: rerf: " recognition rf inst (invoke builtin func)
jms aget jms aget " get address from instruction
add ljmp add ljmp " make into abs jmp to native code
dac .+1 dac .+1
jmp jmp " go to native code
rerx: rerx: " recognition rx instruction (compare lit str)
lac j lac j
dac jsav dac jsav " save j (input char pointer) in jsav
jms aget jms aget " get address from instruction
1:dac 9f+t 1:dac 9f+t
jms lchar jms lchar " get lit character
sad o777 sad o777 " EOS?
jmp goon jmp goon " yes, continue (success)
dac 9f+t+1 dac 9f+t+1 " no, save char
jms getj jms getj " get next input char
sad 9f+t+1 sad 9f+t+1 " as expected?
jmp 2f jmp 2f " yes
jmp backup jmp backup " no: restore j and fail.
2:lac 9f+t 2:lac 9f+t " continue matching (increment lit ptr)
add o400000 add o400000
jmp 1b jmp 1b
t=t+1 "address of next comparison char t=t+1 "address of next comparison char
t=t+1 "character itself t=t+1 "character itself
aget:0 aget:0 " fetch address portion of current instruction
lac ii i lac ii i
and o17777 and o17777
jmp aget i jmp aget i
regc: " Places copy of instruction with exit bit set on stack.
lac ii i " Interpreted as a "gc" instruction (see note at gegc).
and o757777 regc: " recognition "rt" instruction [sic]
xor exitmask lac ii i " fetch instruction word
dac nframe i and o757777 " clear exit bit
xor exitmask " set (toggle) exit bit
dac nframe i " push @nframe
"** 13-120-147.pdf page 11 "** 13-120-147.pdf page 11
isz nframe isz nframe " advance nframe pointer
jmp goon jmp goon " succeed
" push result in AC at "k" (kbuf)
" called from bundlep and twice from twoktab (two word ktab entry)
" returns w/ AC unmodified, k contains index of new entry
kput:0 kput:0
isz k isz k
dac junk1 dac junk1
lac k lac k
jms between; add d0; add kmax jms between; add d0; add kmax
jms halt jms halt " halt on ktab overflow
add kbot add kbot
dac junk dac junk
lac junk1 lac junk1
dac junk i dac junk i
jmp kput i jmp kput i
" fetch word from current frame using "add offset" following jms.
" Only used by parsedo, to restore k.
s0get:0 s0get:0
lac frame lac frame
xct s0get i xct s0get i
@@ -273,6 +301,8 @@ s0get:0
isz s0get isz s0get
jmp s0get i jmp s0get i
" fetch word via ptr in current frame using "add offset" following jms.
" Only used by nframe0, w/ "ii" instruction pointer
s1get:0 s1get:0
lac frame i lac frame i
xct s1get i xct s1get i
@@ -281,6 +311,8 @@ s1get:0
isz s1get isz s1get
jmp s1get i jmp s1get i
" set word in current frame using "add offset" following jms.
" Only used by "gk" instruction to set "ii"
s0put:0 s0put:0
lmq lmq
lac frame lac frame
@@ -293,119 +325,145 @@ s0put:0
" here is the generaion interpreter " here is the generaion interpreter
" the k table cant move while its active " the k table cant move while its active
geno: geno: " gen. noop instruction
ggoon: ggoon: " "go on" from gen. builtins, ops
lac ii i lac ii i " fetch prev instr
isz ii isz ii " increment
and exitmask and exitmask " isolate exit bit
sza sza
jmp retreat jmp retreat " exit bit set, return.
ginterp: ginterp:
las "trace check las "trace check
and d6 and d6
sna sna
jmp .+3 jmp .+3
lac bugg lac bugg
jms bug jms bug " trace
lac ii i lac ii i " fetch current instruction
lrss 14 lrss 14 " shift down to opcode
and o7 and o7 " get low 3 of opcode
"** 13-120-147.pdf page 12 "** 13-120-147.pdf page 12
add gbranch add gbranch " make indirect branch thru gbranch table
dac .+1 dac .+1 " save as next instruction
jmp jmp
gbranch: gbranch:
jmp .+1 i jmp .+1 i
geno geno
gegx gegx
geuu geuu " was once "gz" (in bugg tab)
gegc gegc
gegf gegf
gegk gegk
gegp gegp
gegq gegq
geuu: geuu: " gen. ununimplemented instruction
jms halt jms halt
gegx: " pdp-11 analog is .txs? output string
lac ii i gegx: " gen. "gx" instruction
and o417777 lac ii i " fetch instruction
jms obuild and o417777 " extract character address
jmp ggoon jms obuild " copy to output
jmp ggoon " continue (checking for exit)
gegq: " pdp-11 analog may be .tq: load translation parameter ($1, $2)??
jms advance; jmp ggoon " manual says:
" A translation rule may have parameters, and if it
" does, their number is declared by a parenthesized
" integer prefixed to its body.
gegq: " gen. "gq" instruction
jms advance; jmp ggoon " push state
lac env lac env
add d.ii add d.ii " get addr of env->ii
dac junk dac junk
jms aget jms aget " get address portion of gq instruction
add junk i add junk i " add value at *env->ii
dac junk dac junk
lac junk i lac junk i " fetch *(*env->ii + aget())
dac ii dac ii " save param list ptr as instruction pointer?
lac env lac env
add d.env add d.env " get addr env->env
dac junk dac junk
lac junk i lac junk i " fetch env->env
dac env dac env " restore env ptr (pop env)
jmp ginterp jmp ginterp " go on (w/o exit check)
gegp: " pdp-11 analog is .tp?
jms advance; jmp ggoon " execute rule called for by 1 2 ...
lac env " found relative to instruction counter in the k environment
add d.ii
dac junk
lac frame i
dac env
jms aget
cma
add junk i
dac ii
jmp ginterp
gegk: gegp: " gen. "gp" instruction
lac ii i jms advance; jmp ggoon " push current state
jms aget lac env " get saved env pointer
add kbot add d.ii " get pointer to saved instruction pointer
dac junk " save in temp
lac frame i " get prev frame pointer
dac env " save as env pointer
jms aget " get address portion of instruction
cma " one's complement negation + one's c. add!!
add junk i " back up env instruction pointer by -aget()
dac ii dac ii
jms s0put; add d.ii jmp ginterp " go on (w/o exit check)
lac frame
" pdp-11 comment @ gk:
" delivered compound translation
" instruction counter is in ktable
" set the k environment for understanding 1, 2 ...
" to designate this frame
" PDP-7 NOTES: only place that sets "env" w/o reading first;
" twoktab stores gk instructions in ktab.
gegk: " gen. "gk" instruction
lac ii i " load instruction (value ignored)
jms aget " get address portion of instruction
add kbot " add to ktab base
dac ii " store as new instruction pointer
jms s0put; add d.ii " set frame saved instruction pointer too
lac frame " get frame pointer
"** 13-120-147.pdf page 13 "** 13-120-147.pdf page 13
dac env dac env " save as env pointer
jmp ginterp jmp ginterp " go on (w/o exit check)
gegc: " NOTE: recognition opcode "rt" (code at label regc!) places
jms advance; jmp ggoon " a copy of itself, with exit bit set on stack, since rt and
jms aget " gc use the same opcode, the stacked instruction comes here
dac ii " (addr points to "gen" code), so it calls the referenced code.
jmp ginterp gegc: " gen. "gc" inst (call tmg coded subroutine)
jms advance; jmp ggoon " push current state
jms aget " get address from instruction
dac ii " use as new instruction pointer
jmp ginterp " go on (w/o exit check)
" trace routine (not a bug!)
" invoked from rinterp if switch 15 or 17 set (mask 05)
" invoked from ginterp if switch 15 or 16 set (mask 06)
" calls halt if switch 15 set (mask 04)
bug:0 bug:0
dac 1f+2 dac 1f+2 " save pointer to instruction names
lac onenl lac onenl " output newline
jms obuild jms obuild
lac ii lac ii " output instruction address in octal
jms putoct jms putoct
lac ii i lac ii i " get instruction
lrs 14 lrs 14
and o17 and o17 " get high four bits (opcode)
add 1f+2 add 1f+2 " add to instruction name list pointer
dac 1f+2 dac 1f+2 " save (into output string!)
lac 1f+2 i lac 1f+2 i " fetch two character instruction name
dac 1f+2 dac 1f+2 " save back into output string
lac 1f lac 1f " get pointer to output string
jms obuild jms obuild " output
lac ii i lac ii i " get instruction
jms putoct jms putoct " output in octal
las las " get console switches
and d4 and d4 " is bit 15 set?
sza sza " no.
jms halt jms halt " yes: halt (output return address, then quit)
jmp bug i jmp bug i " no: continue.
1:0400000 .+1; 040; 0; 040777 1:0400000 .+1; 040; 0; 040777 " char ptr to <SPACE> XX <SPACE> <EOS>
" where XX will be instr name
+175 -160
View File
@@ -1,161 +1,172 @@
"** 13-120-147.pdf page 14 "** 13-120-147.pdf page 14
" move characters
" call with source address in AC
" dest addr after "jms move" instruction
move: 0 move: 0
dac 9f+t dac 9f+t " save source addr
lac move i lac move i " get dest addr
1:dac 2f 1:dac 2f " save dest addr after dchar call
lac 9f+t lac 9f+t " restore source addr
jms lchar jms lchar " load char
dac 9f+t+1 dac 9f+t+1 " save source char
jms dchar jms dchar " store char
2: 0 2: 0 " dest addr
lac 9f+t+1 lac 9f+t+1 " examine source char
sad o777 sad o777 " EOS?
jmp 3f jmp 3f " yes
lac o400000 lac o400000 " get char addr increment
add 9f+t add 9f+t " add to source addr
dac 9f+t dac 9f+t " save incremented source addr
lac o400000 lac o400000 " get char addr increment
add 2b add 2b " get incremented dest addr
jmp 1b jmp 1b " go back to top of loop (save dest addr)
3:isz move 3:isz move " skip dest addr arg
lac 2b lac 2b " return dest addr
jmp move i jmp move i
t=t+1 "source address t=t+1 "source address
t=t+1 "source character t=t+1 "source character
" load character
" takes source character address in AC
lchar:0 lchar:0
dac junk dac junk " save source address
ral ral " rotate addr up (high bit into link)
lac junk i lac junk i " fetch source word
snl snl " link set?
lrs 9 lrs 9 " no: move high 9 down
and o777 and o777 " get just 9 bits
jmp lchar i jmp lchar i " return
" deposit character
" takes dest addr after jms instruction
dchar:0 dchar:0
lmq lmq " save char in MQ
lac dchar i lac dchar i " get dest addr
dac junk dac junk " save
spa spa " high bit set?
jmp 1f jmp 1f " yes: get mask for high 9
llss 9 llss 9 " no: shift AC/MQ up 9 (LINK fills MQ low bits)
lac o777 lac o777 " get mask for low 9
jmp .+2 jmp .+2
1:0777000 1:0777000 " get mask for high 9
and junk i and junk i " and dest word w/ mask
omq omq " or MQ in
dac junk i dac junk i " deposit in dest word
isz dchar isz dchar " increment return to skip dest addr
jmp dchar i jmp dchar i " return
" gets designated character from input " gets designated character from input
" (reads block from disk if needed)
" does not increment j
jget:0 jget:0
1:lac j 1:lac j " get input char addr [here also from jmore]
jms cbetween; add jmin; add jmax jms cbetween; add jmin; add jmax " in current block?
jmp jmore jmp jmore " no: not in memory, read block
cma cma
add jmin add jmin
cma cma " get j-jmin
add jbot add jbot " make buffer address
jms lchar jms lchar " fetch character from buffer
jms class; add ignore jms class; add ignore " char in "ignore" mask?
"** 13-120-147.pdf page 15 "** 13-120-147.pdf page 15
jmp jget i jmp jget i " no: return character
lac j lac j " yes: get source char addr
add o400000 add o400000 " increment
dac j dac j " save
jmp 1b jmp 1b " try again (may have crossed block boundary)
" read more input - filthy code, enough to make disk & " read more input - filthy code, enough to make disk &
" terminal input work. Theae only deliver full count " terminal input work. Theae only deliver full count
" except at eof or 1 word " except at eof or 1 word
jmore: jmore:
and o377700 and o377700 " get char offset for start of block
dac jmin dac jmin " save as first
add ljsiz add ljsiz " add buf size
dac 9f+t dac 9f+t " save in t0
lac jmax lac jmax " get current end addr
jms cbetween; add jmin; add 9f+t jms cbetween; add jmin; add 9f+t " in range jmin<=jmax<t0?
lac jmin lac jmin " not in range: get jmin
dac jmax dac jmax " save as new jmax
dac 1f dac 1f " and for seek
cma cma
add jmin add jmin " 1's complement add!
cma cma " get jmin-jmax
add jbot add jbot " make buffer address
dac 2f dac 2f " save as read dest
lac input lac input " get input fd
sys seek sys seek " seek fd
1:0;0 1:0;0
-1 -1 " get 0777777
dac 2f i dac 2f i " save in first word of read buffer
lac input lac input " get input fd
sys read sys read " read (ptr, count follow)
2:0;jsiz 2:0;jsiz
sna sna " get anything?
lac d1 lac d1 " zero: get 1 instead (will fetch 0777)
add jmax add jmax " add to block base
dac jmax dac jmax " save as max char
jmp jget+1 jmp jget+1 " try jget again
t=t+1 t=t+1
" gets next character from input " gets next character from input
" called only from "rx" instruction
getj:0 getj:0
lac j lac j " input char addr
jms jget jms jget " get character
dac junk dac junk " save
lac j lac j " increment character addr
add o400000 add o400000
dac j dac j
lac junk lac junk " return character
jmp getj i jmp getj i
" compare two strings - assume both left justified " compare two strings - assume both left justified
" called only from "find"
" takes one addr in AC, other following jms
" skips on match(?)
comp:0 comp:0
dac 9f+t dac 9f+t " save first argument pointer
lac comp i lac comp i " fetch word after jms
dac 9f+t+1 dac 9f+t+1 " save second argument pointer
isz comp isz comp " skip argument word
1:lac 9f+t i 1:lac 9f+t i " top of loop: fetch word from arg1
sad 9f+t+1 i sad 9f+t+1 i " compare to arg2
"** 13-120-147.pdf page 16 "** 13-120-147.pdf page 16
jmp 3f jmp 3f " identical: check for EOS
and 9f+t+1 i "do both start with eof? and 9f+t+1 i "do both start with eof?
spa spa " no: return without skip
2:isz comp 2:isz comp " yes, give skip return
jmp comp i jmp comp i
3:and o600600 "is there an eof? 3:and o600600 "is there an eof?
sza sza " NO
jmp 2b jmp 2b " YES: saw EOS w/ matching words: skip return
isz 9f+t isz 9f+t " no EOS, increment ptr 1
isz 9f+t+1 isz 9f+t+1 " increment ptr 2
jmp 1b jmp 1b " loop.
t=t+1 "address of string 1 t=t+1 "address of string 1
t=t+1 "address of string 2 t=t+1 "address of string 2
obuild:0 obuild:0 " copy string to output
lmq lmq " save char addr in AC in MQ
lac owrite lac owrite " get obuf index
add obot add obot " get obuf addr
dac 2f dac 2f " save as move dest
lacq lacq " get char addr back
1:jms move 1:jms move " move
2:0 2:0 " move dest
cma cma
add obot add obot
cma cma
dac owrite dac owrite
jms cbetween; add d0; add omax jms cbetween; add d0; add omax " obuf full?
skp skp " yes
jmp obuild i jmp obuild i " no: return
lac lochunk lac lochunk
jms oflush jms oflush
@@ -176,88 +187,92 @@ oflush:0
" outputs octal string from sesignated value " outputs octal string from sesignated value
octal: octal: " BUILTIN
isz ii isz ii " increment instruction pointer
lac ii i lac ii i " fetch instruction word
dac 2f dac 2f " save as geoctal argument??
lac 1f lac 1f " fetch "gf geoctal x" instr
jms twoktab jms twoktab " make two word ktab entry and goon
lac 2f i lac 2f i
1:gf geoctal x 1:gf geoctal x
2:0 2:0 " copy of inst word after octal invocation
" (ptr to word to output????)
"** 13-120-147.pdf page 17 "** 13-120-147.pdf page 17
geoctal: geoctal: " native code invoked by "gf" inst in ktab
lac ii lac ii " get instruction pointer
dac 8 dac 8 " save in auto-pre-increment reg 8
lac 8 i lac 8 i " fetch second ktab word
jms putoct jms putoct " output as octal
jmp ggoon jmp ggoon " success
" converts word in ac into ocatl on output stream " converts word in ac into ocatl on output stream
putoct:0 putoct:0
dac 9f+t dac 9f+t " save output value
lac 7f lac 7f " output "0"
jms obuild jms obuild
dzm 9f+t+2 dzm 9f+t+2 " clear non-zero digit flag
-6 -6
dac 9f+t+1 dac 9f+t+1 " init digit count to -6
1:lac 9f+t 1:lac 9f+t " get value
cll cll " clear link
lrs 15 lrs 15 " get high 3 bits right justified
add o60 add o60 " convert to ASCII digit
dac 8f+1 dac 8f+1 " save in output buffer
lls 18 lls 18 " left justify remaining bits
dac 9f+t dac 9f+t " save back in value
lac 9f+t+2 "have nonzero digits been seen? lac 9f+t+2 "have nonzero digits been seen?
sza sza
jmp 2f jmp 2f " yes: go output
lac 8f+1 "no,is this nonzero? lac 8f+1 "no,is this nonzero?
sad o60 sad o60
jmp 3f "no jmp 3f "no
2:lac 8f 2:lac 8f " output non-zero digit
jms obuild jms obuild
law law " get 760000
dac 9f+t+2 dac 9f+t+2 " save as non-zero digit seen flag
3:isz 9f+t+1 3:isz 9f+t+1 " increment digit count
jmp 1b jmp 1b " non-zero: keep going
jmp putoct i jmp putoct i " count now zero: return
t=t+1 "value to convert t=t+1 "value to convert
t=t+1 "digit count t=t+1 "digit count
t=t+1 "nonzero digit flag t=t+1 "nonzero digit flag
7: .+1; 060777 7: .+1; 060777 " "0" + EOS
8:0400000 .+1;0;end 8:0400000 .+1;0;end " digit, two 0777 EOS bytes
eof: eof: " BUILTIN (succeed at EOF)
lac j lac j
dac jsav dac jsav " save j
jms jget jms jget
sad o777 sad o777 " at EOF?
jmp goon jmp goon " yes, succeed
jmp backup jmp backup " no, restore j from jsav, and fail
"
" called with jms class; add chrtabptr
" skip on return if char in AC in referened character table
class:0 class:0
dac junk1 dac junk1 " save input char
lrss 7 lrss 7
sza sza " high (0200) bit of input set?
jmp 2f jmp 2f " yes, fail
lls 3 lls 3 " get word number (16 bits per word)
xct class i xct class i " execute "add table" instr after "jms class"
isz class isz class " skip the add on return
dac junk dac junk " save word pointer
"** 13-120-147.pdf page 18 "** 13-120-147.pdf page 18
cla cla
llss 4 llss 4 " get low four of character (bit number)
add l.llss add l.llss " make into lls instr
dac 1f dac 1f
lac junk i lac junk i " get word from mask
1:llss 1:llss " shift up by bit number (into sign bit)
spa spa " bit set?
2:isz class 2:isz class " yes: give skip return
lac junk1 lac junk1 " restore character
jmp class i jmp class i
+85 -82
View File
@@ -1,112 +1,115 @@
"** 13-120-147.pdf page 19 "** 13-120-147.pdf page 19
" put symbuf symbol into table " put symbuf symbol into table
table: table: " BUILTIN
lac equwrite lac equwrite " get equtab write index
dac equ dac equ " save as last found
jms between; add d0; add equmax jms between; add d0; add equmax
jms halt jms halt " overflow
add delta add delta " increment
dac equwrite dac equwrite " save as next to write
lac equ lac equ " get our entry index
add equbot add equbot " get our entry address
tad m1 tad m1 " decrement for pre-auto-increment
dac 8 dac 8 " save in auto-increment reg
lac symwrite lac symwrite " get name index into symtab
dac 8 i dac 8 i " save in equtab
add symbot add symbot " get symtab addr
dac 2f dac 2f " save as move dest
lac mdelta lac mdelta " get negative equtab entry word count
1:dzm 8 i 1:dzm 8 i " zero equtab word
tad d1 tad d1 " increment count
spa spa " positive?
jmp 1b jmp 1b " no, loop and zero another
lac sbbot lac sbbot " yes, get symbuf base
jms move jms move " copy string into symtab (string table)
2:0 2:0
add o400000 add o400000 " increment char addr
cma cma
add symbot add symbot
cma cma
add o400000 add o400000
and o17777 and o17777
dac symwrite dac symwrite " save new symtab write pointer
jms between; add d0; add symmax jms between; add d0; add symmax
jms halt jms halt " symtab overflow
jmp goon jmp goon " success
" find occurrence of symbuf symbol in equtab " find occurrence of symbuf symbol in equtab
prev: prev: " BUILTIN
lac equ lac equ " last entry found/created
jmp find+1 jmp find+1 " start search
find: find: " BUILTIN
lac equwrite lac equwrite " get end index to equ table
dac 9f+t dac 9f+t " save
lac o777 lac o777 " get EOS
jms sbput jms sbput " append to sbbuf
lac sbbot lac sbbot " get sbbuf base
dac 2f dac 2f " stash as "comp" argument 2 (loop invariant)
1:lac 9f+t 1:lac 9f+t " get equbuf index
tad mdelta tad mdelta " decrement (by two)
dac 9f+t dac 9f+t " save
spa spa " still positive?
jmp nuts jmp nuts " no: return failure
add equbot add equbot " turn into equbuf pointer
dac junk dac junk " save as temp
lac junk i lac junk i " get symtab entry offset
add symbot add symbot " get symtab entry address
jms comp jms comp " compare
2:0 2:0 " compare arg2 here
jmp 1b jmp 1b " non-skip return: continue
lac 9f+t lac 9f+t " skipped: get offset
dac equ dac equ " save as last found
"** 13-120-147.pdf page 20 "** 13-120-147.pdf page 20
jmp goon jmp goon " success!
t=t+1 "next equtab location to test t=t+1 "next equtab location to test
sbput:0 sbput:0 " put character in AC into symbuf (sbbuf)
lmq lmq " save character in MQ
lac sbwrite lac sbwrite " get sbbut write index
add sbbot add sbbot " add to start of sbbuf
dac 1f dac 1f " save as dchar dest
lacq lacq " get char back
jms dchar jms dchar " save
1:0 1:0
lac sbwrite lac sbwrite " get sbbuf write index
add o400000 add o400000 " increment
dac sbwrite dac sbwrite " save back
jms cbetween; add d0; add sbmax jms cbetween; add d0; add sbmax
jms halt jms halt " sbbuf overflow
jmp sbput i jmp sbput i
getname: getname: " BUILTIN
lac equ lac equ " get last entry index
add equbot add equbot " get equtab addr (addr of pointer to string)
dac 9f+t dac 9f+t " save in temp
lac 1f lac 1f " get "gf" instruction
jms twoktab; lac 9f+t i jms twoktab; lac 9f+t i " make 2-work ktab entry (does not return)
1:gf .+1 x 1:gf .+1 x " jump to native code & exit
lac ii lac ii " get instruction pointer
dac 8 dac 8 " save in auto-pre-increment reg 8
lac 8 i lac 8 i " fetch next word (symtab index)
add symbot add symbot " make pointer into symtab
and o17777 and o17777 " get just address
jms obuild jms obuild " send to output
jmp ggoon jmp ggoon " success
t=t+1 "equtable entry t=t+1 "equtable entry
" puts double word entries in ktab and gives " puts double word entries in ktab and gives
"pointer to first as result "pointer to first as result
" takes first word (addr for gk instr) in AC
" and indirect load instr after "jms twoktab"
" Called (as final action) by builtins (symoct,octal,getname)
" DOES NOT RETURN!!!
twoktab:0 twoktab:0
jms kput jms kput " save AC in ktab
lac l.gk lac l.gk
add k add k " make gk intruction, pointing to new entry
dac nframe i dac nframe i " push onto nframe
isz nframe isz nframe
xct twoktab i xct twoktab i " execute lac i instruction after "jms twoktab"
jms kput jms kput " save in ktab as second word
jmp goon jmp goon " success
+38 -38
View File
@@ -1,75 +1,75 @@
"** 13-120-147.pdf page 21 "** 13-120-147.pdf page 21
char: char: " BUILTIN: match one char from bitset or fail.
lac j lac j
dac jsav dac jsav
isz ii isz ii
jms ctest jms ctest
jmp backup jmp backup " not in bitset: restore j from jsav, fail
jmp goon jmp goon
string: string: " BUILTIN: match zero or more chars from bitset
isz ii isz ii
jms ctest jms ctest
jmp goon jmp goon " not in bitset, quit (but do not fail)
jmp string+1 jmp string+1
ctest:0 ctest:0
jms jget jms jget
jms class; add ii i jms class; add ii i " bitset check w/ table ptr *ii
jmp ctest i jmp ctest i " char not in bitset, return w/o skip
jms sbput jms sbput " matched: add to symbuf
lac j lac j " increment j (char ptr)
add o400000 add o400000
dac j dac j
isz ctest isz ctest " give skip return
jmp ctest i jmp ctest i
mark: mark: " BUILTIN: clear symbuf
jms jget jms jget " consume ignored characters
dzm sbwrite dzm sbwrite
jmp goon jmp goon
parsedo: parsedo: " BUILTIN: invoke rule
isz ii isz ii
jms advance; jmp 3f jms advance; jmp 3f " on retreat restore k
jms advance; jmp 1f jms advance; jmp 1f " on retreat switch to generation
jms aget jms aget " get new instruction pointer
dac ii dac ii
jmp rinterp jmp rinterp
1:lac frame 1:lac frame " on retreat (second advance call)
add refrsz add refrsz
dac ii dac ii " set instruction pointer to "nframe"
sad nframe sad nframe " was anything pushed onto nframe??
jmp retreat jmp retreat " no: retreat again.
dac gflag dac gflag " yes: set gflag (don't bundle on retreat)
lac gefrsz lac gefrsz
dac dffrmsz dac dffrmsz " change (advance) frame size to generate size
jms advance; jmp 2f jms advance; jmp 2f " on retreat switch back to recognition mode
jmp ginterp jmp ginterp " interpret generate instructions!
2:lac refrsz 2:lac refrsz " on retreat from generate mode
dac dffrmsz dac dffrmsz " switch back to recognition sized frames
add frame add frame
dac nframe dac nframe " reset nframe pointer
dzm gflag dzm gflag " clear gflag (resume bundling on retreat)
jmp retreat jmp retreat " retreat (again)!!
3:jms s0get; add d.k 3:jms s0get; add d.k " on retreat (first advance call)
dac k dac k " restore k from current frame
jmp goon jmp goon
bundle: bundle: " BUILTIN: bundle results
jms bundlep jms bundlep " get bundle of results (if more than one)
"** 13-120-147.pdf page 22 "** 13-120-147.pdf page 22
dac 9f+t dac 9f+t
sna sna " got any?
jmp goon jmp goon " nope. success.
jms nframe0 jms nframe0 " look for original nframe
dac nframe dac nframe " restore
lac 9f+t lac 9f+t " get bundle result ptr (in ktab if multi-word)
dac nframe i dac nframe i " push @nframe
isz nframe isz nframe
jmp goon jmp goon
t=t+1 t=t+1
+110 -108
View File
@@ -1,63 +1,63 @@
"** 13-120-147.pdf page 23 "** 13-120-147.pdf page 23
rerm: rerm: " recognition "rm" instruction
jms aget jms aget " get address portion (abs addr)
jmp 1f jmp 1f " join "rs"to fetch
rers: rers: " recognition "rs" instruction
jms aget jms aget " get address portion (positive frame offset)
add frame add frame " add frame pointer
1:dac holdlv 1:dac holdlv " save as "hold lvalue"
lac holdlv i lac holdlv i " fetch addressed word
jmp 2f jmp 2f " go push
rerv: rerv: " recognition "rv" instruction
jms aget jms aget " get address portion
lls 6 lls 6 " discard high six bits
lrs 6 lrs 6 " replac with six copies of LINK bit
2:dac nframe i 2:dac nframe i " save @nstack
isz nframe isz nframe " increment
jmp goon jmp goon " success
rero: rero: " recognition "ro" (opr) instruction
jms decnf jms decnf " pop top of nstack
dac rand1 dac rand1 " save as (op)rand 1
jms aget jms aget " get address portion of instruction
and o77 and o77 " get low six bits for sub-opcode
add obranch add obranch " make xct into o(pr)branch table
dac 2f dac 2f " save
cma cma " negate (minus one)
tad unary tad unary " add unary base xct
spa spa " positive?
jmp 1f jmp 1f " no: was unary, skip second arg fetch
jms decnf jms decnf " yes: binary op, pop second arg from nstack
dac rand2 dac rand2 " save as second (ope)rand
1:lac rand1 1:lac rand1 " get first (ope)rand in AC
2:xct 2:xct " execute instruction from obranch table
jmp result jmp result " if noop, join result processing
obranch: obranch:
xct .+1 xct .+1
opr ;op=0400000+1 opr ;op=0400000+1 " (no)op
jmp rorel ;le=op;op=op+1 jmp rorel ;le=op;op=op+1 " relop <=
jmp rorel ;ne=op;op=op+1 jmp rorel ;ne=op;op=op+1 " relop !=
jmp rorel ;lt=op;op=op+1 jmp rorel ;lt=op;op=op+1 " relop <
jmp rorel ;ge=op;op=op+1 jmp rorel ;ge=op;op=op+1 " relop >=
jmp rorel ;eq=op;op=op+1 jmp rorel ;eq=op;op=op+1 " relop ==
jmp rorel ;gt=op;op=op+1 jmp rorel ;gt=op;op=op+1 " relop >
tad rand2 ;ad=op;op=op+1 tad rand2 ;ad=op;op=op+1 " binop +
jms sub ;sb=op;op=op+1 jms sub ;sb=op;op=op+1 " binop -
and rand2 ;an=op;op=op+1 and rand2 ;an=op;op=op+1 " binop &
jmp roor ;or=op;op=op+1 jmp roor ;or=op;op=op+1 " binop |
xor rand2 ;xo=op;op=op+1 xor rand2 ;xo=op;op=op+1 " binop ^ (xor)
jmp rosr ;sr=op;op=op+1 jmp rosr ;sr=op;op=op+1 " binop <<
jmp rosl ;sl=op;op=op+1 jmp rosl ;sl=op;op=op+1 " binop >>
jmp romn ;mn=op;op=op+1 jmp romn ;mn=op;op=op+1 " binop min??
jmp romx ;mx=op;op=op+1 jmp romx ;mx=op;op=op+1 " binop max??
lac rand2 ;as=op;op=op+1 lac rand2 ;as=op;op=op+1 " binop ??? (always returns rh operand)
opr ;pl=op;op=op+1 opr ;pl=op;op=op+1 " unary + (noop)
jmp romi ;mi=op;op=op+1 jmp romi ;mi=op;op=op+1 " unary - (negate)
cma ;cm=op;op=op+1 cma ;cm=op;op=op+1 " unary ~ (complement)
jmp roindir;indir=op;op=op+1 jmp roindir;indir=op;op=op+1 " unary indirect (fetch *holdlv)
lac holdlv ;addr=op;op=op+1 lac holdlv ;addr=op;op=op+1 " unary addr (return last holdlv)
unary:xct obranch+1+pl unary:xct obranch+1+pl
rorel: "<= 001 rorel: "<= 001
@@ -78,6 +78,8 @@ rorel: "<= 001
cma cma
jmp result jmp result
" return rand1 minus rand2
" used by rorel, rosub
sub:0 sub:0
cma cma
tad rand2 tad rand2
@@ -85,79 +87,79 @@ sub:0
jmp sub i jmp sub i
roor: roor:
lmq lmq " save rand1 in MQ
lac rand2 lac rand2 " get rand2 in AC
omq omq " or AC and MQ
jmp result jmp result
rosr: rosr:
lac rand2 lac rand2 " get rh operand
add l.lrs add l.lrs " make long right shift (fills with LINK)
cll cll " clear link
jmp 1f jmp 1f
rosl: rosl:
lac rand2 lac rand2 " get rh operand
add l.lls add l.lls " make long left shift (fills from MQ)
clq clq " clear MQ
1:dac .+2 1:dac .+2 " save shift instruction
lac rand1 lac rand1 " get left hand operand
0 0 " perform shift
jmp result jmp result " join result processing
romn: romn:
jms sub jms sub " get rand1-rand2
cma cma " complement (rand2-rand1-1)
jmp .+2 jmp .+2
romx: romx:
jms sub jms sub " get rand1-rand2
ral ral " rotate left (sign bit into LINK)
lac rand1 lac rand1 " get first operand
szl szl " link clear?
lac rand2 lac rand2 " no, get second operand instead
jmp result jmp result " return result
romi: romi: " unary minus
cma cma " complement
tad d1 tad d1 " add one
jmp result jmp result
roindir: roindir:
dac holdlv dac holdlv " save as "hold lvalue"
lac holdlv i lac holdlv i " fetch value
"** 13-120-147.pdf page 25 "** 13-120-147.pdf page 25
jmp result jmp result " return result
result: result: " ro result processing
dac junk dac junk " save in temp
dac nframe i dac nframe i " store at *nframe++
isz nframe isz nframe
lac ii i lac ii i " fetch original instruction
and stbit and stbit " get st(ore?) bit
sna sna " set?
jmp exprtest jmp exprtest " no
lac junk lac junk " yes: get result
dac holdlv i dac holdlv i " store at *holdlv
lac ii i lac ii i " fetch original instruction
and fibit and fibit " fi(nal?) bit set?
sza sza " no, skip
jms decnf jms decnf " yes: discard stacked result
jmp goon " succeed
exprtest: " here if st(ore?) bit not set
lac ii i " fetch instruction
and fibit " get fi(nal?) bit
sna " set?
jmp goon " no: succeed
jms decnf " yes: poped stacked result
lac nframe i " (redundant?????)
sza " was result zero?
-1 " no: get all ones
cma " complement (zero -> -1, -1 -> zero)
dac fflag " save as failure flag
jmp goon jmp goon
exprtest: decnf:0 " decrement nframe, return stacked value
lac ii i
and fibit
sna
jmp goon
jms decnf
lac nframe i
sza
-1
cma
dac fflag
jmp goon
decnf:0
-1 -1
tad nframe tad nframe
dac nframe dac nframe
+49 -69
View File
@@ -1,8 +1,8 @@
"** 13-120-147.pdf page 26 "** 13-120-147.pdf page 26
9:.=.+t 9:.=.+t
end = -1 end = -1 " end of string (two 0777 bytes)
" recognition / generation opcodes:
no = 0000000 no = 0000000
rx = 0040000; gx = rx rx = 0040000; gx = rx
rc = 0100000 rc = 0100000
@@ -16,23 +16,23 @@ rm = 0440000
rs = 0500000 rs = 0500000
rv = 0540000 rv = 0540000
" literal words
ljmp:jmp ljmp:jmp
l.llss:llss l.llss:llss
l.lrs:lrs l.lrs:lrs
l.lls:lls l.lls:lls
l.ra:ra l.ra:ra " used for comparison
l.rb:rb l.rb:rb " used for comparison
l.rw:rw l.rw:rw " used for comparison
l.gk:gk l.gk:gk " used to create instr in twoktab
l.gcx:gc x l.gcx:gc x " NOT USED?
x = 020000
st = 0100
fi = 0200
opmask:0740000
exitmask: x
x = 020000 " exit bit (on all recog/gen instrs)
st = 0100 " store(?) bit on recog op (ro) instrs
fi = 0200 " final(?) bit on recog op (ro) instrs
opmask:0740000 " opcode mask
exitmask: x " exit bit mask
" number lits:
m1:0-1 m1:0-1
d0:o0:0 d0:o0:0
d1:o1:1 d1:o1:1
@@ -43,13 +43,18 @@ d5:o5:5
d6:o6:6 d6:o6:6
d7:o7:7 d7:o7:7
d8:o10:8 d8:o10:8
asciisp:040 asciisp:040 " ascii space (NOT USED)
asciinl:012 asciinl:012 " ascii newline (NOT USED)
nl:012777 nl:012777 " newline + EOS
onenl:nl onenl:nl " pointer to newline+EOS
bugr:.+1;<rn>;<rx>;<rc>;<rt>;<rf>;<rw>;<ra>;<rb> bugr:.+1;<rn>;<rx>;<rc>;<rt>;<rf>;<rw>;<ra>;<rb> " ptr to rec. op names
<ro>;<rm>;<rs>;<rv> <ro>;<rm>;<rs>;<rv>
bugg:.+1;<gn>;<gx>;<gz>;<gc>;<gf>;<gk>;<gp>;<gq> bugg:.+1;<gn>;<gx>;<gz>;<gc>;<gf>;<gk>;<gp>;<gq> " ptr to gen. op names
" NOTE! ginterp ignores high bit of
" opcode (to allow as char indicator
" bit for gx instruction), but bug
" routine does not, so table should
" include two more entries???
o17:017 o17:017
o60:060 o60:060
@@ -66,6 +71,7 @@ o17777:017777
o757777:0757777 o757777:0757777
o600600:0600600 o600600:0600600
" variables
junk:0 junk:0
junk1:0 junk1:0
@@ -100,55 +106,29 @@ sbbot:sbbuf
fflag:0 fflag:0
gflag:0 gflag:0
ignore:.+1;0400000;0;0;0;0;0;0;4 ignore:.+1;0400000;0;0;0;0;0;0;4 " pointer to ignored character set
frame:rstack " default ignore set (NUL and DEL)
nframe:rstack+6 " set stored using first (high) 16 of each wd.
frame:rstack " frame pointer
nframe:rstack+6 " next frame pointer
env = ignore env = ignore
d.ii = d2 d.ii = d2 " frame offset for instruction pointer
d.env = d3 d.env = d3 " frame offset for env/ignore
d.blkmod = d3 d.blkmod = d3 " SYMBOL NOT USED
d.j = d4 d.j = d4 " frame offset for saved j
d.k = d5 d.k = d5 " frame offset for saved k
dffrmsz:6 dffrmsz:6 " current frame size (one of [rg]efrsz)
framsiz:4 framsiz:4 " LOCATION NOT USED
refrsz = d6 refrsz = d6 " recognition frame size
gefrsz = d4 gefrsz = d4 " generation frame size
ii: start ii: start " interpreter instruction pointer
k:0 k:0 " saved data (ktab) pointer
rsiz = 500 rsiz = 500 " stack size
rmax: rsiz rmax: rsiz " stack size as variable
rbot:rstack rbot:rstack " pointer to first stack entry
rtop:rstack+rsiz rtop:rstack+rsiz " pointer to last stack entry
owrite:0 owrite:0 " index into obuf
obot:obuf obot:obuf " pointer to first word of output buffer
osiz=64 osiz=64 " output buffer size
" **************** missing last page? below this line added by phil
omax:osiz
jsiz=100 " PLB: total guess (char buffer?)
j:0
jsav:0
jmax:jsiz
jmin:0
jbot:jbuf
ljsiz:jsiz " PLB: likely bogus!
ksiz=100 " PLB: total guess (char buffer?)
kmax:ksiz
kbot:kbuf
lochunk: 0 " PLB: WAG
" tables/buffers: last so not allocated in executable
symtab: .=.+symsiz
equtab: .=.+equsiz
sbbuf: .=.+sbsiz
rstack: .=.+rsiz
obuf: .=.+osiz
jbuf: .=.+jsiz
kbuf: .=.+ksiz
start: .=.+100 " pointed to by ii: may be a stack?
+43 -43
View File
@@ -4,50 +4,50 @@
" no iot ops are defined " no iot ops are defined
" system cal entries are defined " system cal entries are defined
" "
dac = 0040000 dac = 0040000 " MEM: deposit AC
jms = 0100000 jms = 0100000 " MEM: jump to subroutine
dzm = 0140000 dzm = 0140000 " MEM: deposit zero to memory
lac = 0200000 lac = 0200000 " MEM: load AC
xor = 0240000 xor = 0240000 " MEM: XOR with AC
add = 0300000 add = 0300000 " MEM: one's complement add
tad = 0340000 tad = 0340000 " MEM: two's complement add
xct = 0400000 xct = 0400000 " MEM: execute
isz = 0440000 isz = 0440000 " MEM: increment and skip if zero
and = 0500000 and = 0500000 " MEM: AND
sad = 0540000 sad = 0540000 " MEM: skip if AC different
jmp = 0600000 jmp = 0600000 " MEM: jump
eae = 0640000 eae = 0640000 " Extended Arithmetic Element
i = 020000 i = 020000 " indirect
opr = 0740000 opr = 0740000 " Operator (bit encoded)
law = opr i law = opr i " OPR: load accumulator with (instr)
cma = opr 1 cma = opr 1 " OPR: complement AC
cml = opr 2 cml = opr 2 " OPR: complement LINK
ral = opr 010 ral = opr 010 " OPR: rotate AC left
rar = opr 020 rar = opr 020 " OPR: rotate AC right
sma = opr 0100 sma = opr 0100 " OPR: skip on minus AC
sza = opr 0200 sza = opr 0200 " OPR: skip on zero AC
snl = opr 0400 snl = opr 0400 " OPR: skip on non-zero link
skp = opr 01000 skp = opr 01000 " OPR: skip unconditionally
spa = opr 01100 spa = opr 01100 " OPR: skip on positive AC
sna = opr 01200 sna = opr 01200 " OPR: skip on non-zero AC
szl = opr 01400 szl = opr 01400 " OPR: skip on zero link
cll = opr 04000 cll = opr 04000 " OPR: clear link
cla = opr 010000 cla = opr 010000 " OPR: clear AC
las = opr 010004 las = opr 010004 " OPR: load AC from switches
lrs = eae 0500 lrs = eae 0500 " EAE: long right shift
lrss = i lrs lrss = i lrs " EAE: long right shift, signed
lls = eae 0600 lls = eae 0600 " EAE: long left shift
llss = i lls llss = i lls " EAE: long left shift, signed
als = eae 0700 als = eae 0700 " EAE: AC left shift
alss = i als alss = i als " EAE: AC left shift, signed
lacq = eae 01002 lacq = eae 01002 " EAE: load AC with MQ
lacs = eae 01001 lacs = eae 01001 " EAE: load AC with SC (not used)
clq = eae 010000 clq = eae 010000 " EAE: clear MQ
omq = eae 2 omq = eae 2 " EAE: OR MQ into AC
cmq = eae 4 cmq = eae 4 " EAE: complement MQ
lmq = eae 012000 lmq = eae 012000 " EAE: load MQ from AC
sys = i sys = i " CAL instruction w/ indirect bit
save = 1 save = 1
open = 3 open = 3
read = 4 read = 4
+1 -1
View File
@@ -258,7 +258,7 @@ pbadr: .=.+1
blink: .=.+1 blink: .=.+1
blk1: .=.+1 blk1: .=.+1
blk2: .=.+1 blk2: .=.+1
9: .=.+1 9: .=.+t
stack: stack:
dnop = 040040 dnop = 040040

Some files were not shown because too many files have changed in this diff Show More