FACTOR 26 modified the inner loop to run from 100 rather than from the
ACs, with a comment indicating that this was faster on the KL10.
But it didn't have the intended effect; the code modifies itself using
TRC and HRRI, which only have a 4-bit AC field, so the inner loop's step
size wasn't being changed. The factoring algorithm still worked by
chance, because the step size is initialised to 2 and the TRC/HRRI
harmlessly changed A instead, but it had to consider every odd number as
a possible factor.
When the code isn't running from the ACs, there are plenty of spare ACs,
so keep the step size in AC 7 instead for the KL version.
Register 5 has names E and DV -- I've used DV where it's being used on
its own as a potential divisor, and E where it's being used as part of
the pair DE for a number.
Differences from AI's TS FACTOR:
- KL10 define to put the TEST inner loop code at 100 rather than in the
registers -- ";;KL10 RUNS SLOWER IN ACS".
- Lookup table for commands, including uppercase and lowercase.
- A new "quit" command.
- Mixed-case messages.
- System calls modernised a bit; .CALL /OPEN/ rather than .SUSET/.OPEN,
and not opening the TTY in DDT mode.
@larsbrinkhoff found the source for a slightly later version of FACTOR.
This produces the same binary as my original disassembly, but matches
RZ's source where possible, for easier comparison.
Differences from the WAITS code:
- Converted back to MIDAS syntax.
- Reconstructed the ITS I/O code. Like WUMPUS, this originally opened
the TTY with the 20 flag set to convert input to uppercase, and was
later binary-patched to do the conversion itself (and convert output
to lowercase). The program had a PATCH area originally, so I've
included the patches in the source.
- The ITS version BLTs the jot-counting code into the registers and runs
it from there. The WAITS version has the BLT commented out and just
runs it from the BLTLOC buffer directly.
The TS JOTTO binary on AI/MC (dated 1990-08-14, although it's probably
much older than that) has been dumped after loading the dictionary. When
re-entered at BEG0, the original code asks for a DECtape number to read
the dictionary from, and constructs a UTx device name based on that in
UTNAME. However, in TS JOTTO, UTNAME contains DSK, so it must have been
dumped by patching that device name in directly; I've reproduced this in
build.tcl.
After the dump process, this produces a binary identical to TS JOTTO
except for the contents of the game variables. For the record, when
MC's version was last played before dumping, the computer chose the word
PETAL.
Fixes#789.
This is FAIL source, but it started life as MIDAS code for ITS; see in
particular the IFN-d out code for reading the dictionary file (BEG2),
and the RNG initialisation (ERASE). The dictionary is identical to the
one compiled into MC's TS JOTTO.
SAILDART has this source file with the following dates:
1972-11-18 17:58 JOTTO[S,RPH]
1973-06-17 03:54 JOTTO[CSP,SYS]
And the dictionary file with these dates:
1972-10-24 22:50 JOTTO.DIC[S,RPH]
1972-10-25 07:15 JT.DIC[SW,REG]
1973-06-17 03:54 JOTTO.DIC[CSP,SYS]
1987-03-18 08:21 JOTTO.DIC[GRF,DEK]
So it looks like it was ported to WAITS in October/November 1972,
perhaps by Dick Helliwell.
This is based on a disassembly of the binary AI:SYS1;TS FACTOR; the
binary and its help file .INFO.;FACTOR ORDER are both dated 1977-09-27.
MC had an identical copy with a later date.
This assembles into a binary that's identical to the original, except
that the original version has all its symbols marked as global, and no
assembly info.
Fixes#96.
@larsbrinkhoff spotted that TS3TTY has a comment listing TTY input open
mode bits which includes:
;3.5 => CONVERT LOWER TO UPPER CASE
This mode bit isn't documented in the similar lists in BITS or CALLS
(they skip from 3.4 to 3.6), and doesn't appear to be implemented
anywhere. However, ITS 785 (circa 1973) has a test for this bit in
TTYO4:
TRNE D,10 ;SKIP ON OLD MODE OFF
IOR J,[000400,,0] ;OLD MODE INPUT -> CONVERT LOWER CASE TO UPPER
So it looks like when WUMPUS was first written, this bit was how it
handled lower-case input; at some point, ITS stopped supporting this
bit, and WUMPUS was binary-patched to handle lower-case input explicitly
instead.
This is equivalent to the binary patch that was applied to
AI:SYS1;TS WUMPUS; the original patch was:
.IOT TTYI,A ; at 50; jumped to from GETLF
CAIL A,"a-1
SUBI A,"a-"A
JUMPA T,GETLF+1
JUMPA T,GETLF+2
CAIE T,"s ; at 55; jumped to from MOVE2
CAIN T,"S
JUMPA T,MOVE2+1
JUMPA T,MOVE2+2
PATCH: ; at 61; not used
AI:SYS1;TS WUMPUS was last modified 1977-04-12 18:16. It's closely
related to SRI-NIC's version, but it's unclear which is newer, or
whether they both derive from a common source.
This assembles into a binary that's identical to TS WUMPUS, except for
jumps from GETLF and MOVE2 to two binary patches at 50 and 55 which make
input case-insensitive.
(Note that EXPL ends with a bare \r, which is encoded as \356 here for
itstar's benefit.)
Fixes#108.
Resolves#284.
Commented out uses of time-origin in maxtul; mcldmp (init) until we
can figure out why it gives arithmetic overflows under the emulators.
Updated the expect script statements in build_macsyma_portion to not
attempt to match expected strings, but simply sleep for some time
since in some cases the matching appears not to work.