PDP-10 / its

Incompatible Timesharing System
Other
841 stars 80 forks source link

Muddle 55's PURITY and SUBRFY libraries don't work on KLH10 and pdp10-ks #2182

Open eswenson1 opened 1 year ago

eswenson1 commented 1 year ago

I tried to use Muddle's PURITY and SUBRFY libraries to, respectively, purify and "subrfy" some Muddle code, and this functionality failed during the purify step (both PURITY and SUBRFY perform a purify step) on KLH10. I tried the same thing on pdp10-ks, with the same results. The failure looks like this:

ES>mud55↑K--Clobber Existing Job--
MUDDLE 55 IN OPERATION.
LISTENING-AT-LEVEL 1 PROCESS 1
<USE "PURITY">◊
/PURITY USE
<GROUP-LOAD "hello;hello nbin">◊
HELLO
<GROUP-PURIFY HELLO <SET C <OPEN "PRINT" ".temp.;hello purity">>>◊
PURPG; 703752>>BLT 1,1777(2)   1/   61405,,24000   E.A. _ 24372

Note the PURPG exception -- which I think means that the job attempted to write to a "pure" (read-only) page.

The above sequence uses a pure library version of PURITY (the USE loads the PURITY FBIN (impure) code and loads the pure code from the pure library.

Another error occurs when, instead of using the purified version of PURITY, you load the NBIN:

*mud55^K!
MUDDLE 55 IN OPERATION.
LISTENING-AT-LEVEL 1 PROCESS 1
<FLOAD "muddle;purity nbin">$
"DONE"
<USE "PURITY">$
USE
<GROUP-LOAD "hello;hello nbin">$
HELLO
<GROUP-PURIFY HELLO <SET C <OPEN "PRINT" ".temp.;hello purify">>>$
:$ FATAL ERROR MPV IN GARBAGE COLLECTOR $

The second sequence (haven't tried the first) works fine on pdp10-ka. Note that it fails on two KS systems and works on one KA system. I haven't tried this yet on a KL system.

I'm wondering if the purify code only works on KA systems?

eswenson1 commented 1 year ago

I tried this on pdp10-kl and it also fails there:

ecomp^K!
You have about 8 cpu minutes to do your thing.
MUDDLE COMPILER NOW READY.
T
<FILE-COMPILE "hello;hello mud" "hello;hello nbin">$
Input from DSK:HELLO;HELLO MUD
Output to DSK:HELLO;HELLO nbin
Bounds checking on.
Default declaration is UNSPECIAL.
Output in fast mode.
Temporary output going to:  _HELLO >
Running disowned, with record on DSK:HELLO;HELLO RECORD
Toodle-oo.
:PROCED
KL>
Job ECOMP wants the TTY
$p
DTTY; 716064>>.CALL 716712 (IOT)    $P
"So you re-owned me, eh?  I'm done anyway."
<QUIT>$

KL>mud55^K!
MUDDLE 55 IN OPERATION.
LISTENING-AT-LEVEL 1 PROCESS 1
<FLOAD "muddle;purity nbin">$
"DONE"
<USE "PURITY">$
USE
<GROUP-LOAD "hello;hello nbin">$
HELLO
<GROUP-PURIFY HELLO <SET C <OPEN "PRINT" ".temp.;hello purify">>>$
:$ FATAL ERROR MPV IN GARBAGE COLLECTOR $
eswenson1 commented 1 year ago

Note, on neither my pdp10-ks nor my pdp10-kl system did I have the FBINs in the appropriate places referenced by the package/library systems in order to try the use case where we simply load PURITY by using <USE "PURITY">.

Also, on KLH10, pdp10-ks, and pdp10-kl, I get the following error trying to use SUBRFY:

mud55^K--Clobber Existing Job--
MUDDLE 55 IN OPERATION.
LISTENING-AT-LEVEL 1 PROCESS 1
<FLOAD "muddle;subrfy nbin">$
/SORTX "DONE"
<USE "SUBRFY">$
USE
<GROUP-LOAD "hello;hello nbin">$
HELLO
<SUBRFY HELLO "hello;hello prelod" <SET C <OPEN "PRINT" ".temp.;hello subrfy">>!
>$
PURPG; 703752>>BLT 1,1777(2)   1/   73556,,72000   E.A. _ 72221

Note, SUBRFY invokes PURIFY (built into the Muddle interpreter). PURITY (the package) also calls PURITY (the SUBR).

larsbrinkhoff commented 1 year ago

One theory would be that the KA10 instruction set is slightly different from KS10. The fact that KL10 also fails is consistent with this, because the KL10 and KS10 instruction sets are fairly close in user mode.

I wanted to test this myself, but apparently the right libraries are not installed yet?

<USE "PURITY">$

*ERROR*
PACKAGE
"PURITY"
NOT-FOUND
eswenson1 commented 1 year ago

Right. I’ll test it all on pdp10-ka and commit the changes to the repo.