UP

The domain key grants its holder the ability to extract and insert all of the data and keys that would be available to a process running in the domain. It also provides access to portions of the domain which are not automatically available to programs running in the domain. The domain key thus allows examination of and intervention in the execution of the domain's program.

A domain key may be used to examine or modify the domain even while it is running. Changes to the domain take effect immediately.

Let D represent a domain key.

D(DOMAIN__GET{=0}+1;==>;K) returns C1 {the domain's meter {(p1,d1)}} and D(DOMAIN__SWAP{=32}+1;K==>;L) stores K in C1 and returns the previous contents in L.

D(DOMAIN__GET{=0}+2;==>;K) returns C2 {the domain's keeper {(p1,d2)}} and D(DOMAIN__SWAP{=32}+2;K==>;L) stores K in C2 and returns the previous contents in L.

D(DOMAIN__GET{=0}+3;==>;K) returns C3 {the domain's address segment key {(p1,d3)}} and D(DOMAIN__SWAP{=32}+3;K==>;L) stores K in C3 and returns the previous contents in L.

D(DOMAIN__REPLACE_MEMORY{=74},(4,iaddr);K ==>;L) stores K in C3 {the domain's address segment {(p1,d3)}} and iaddr in the instruction address in C4 {the domain's psw key {(p1,d4)}} and returns the previous contents of C3 in L.

If n is 10 or 11 then D(DOMAIN__GET{=0}+n; ==>;K) returns Cn and D(DOMAIN__SWAP{=32}+n;K==>;L) stores K in Cn and returns the previous contents in L. C10 and C11 are available for general use {(p1,d10)}. C10 is frequently the symbol table for the domain's DDT.

D(DOMAIN__GET{=0}+13;==>;K) returns C13 {the domain's busy flag {(p1,d13)}}.

If n<16 then D(DOMAIN__GET_KEY{=16}+n;==> c;K) returns the key from slot n of the general keys node of domain D. c = 2 iff the domain is malformed, 0 if successful.

If n<16 then D(DOMAIN__SWAP_KEY{=48}+n;K==> c;L) stores K in slot n of the general keys node of D and returns the prior contents of that slot in L. c = 2 only of the domain is malformed, 0 if successful.

D(DOMAIN__MAKE_START{=64},(1,b1);==> ;E) creates a start key E to the domain with databyte b1.

D(DOMAIN__GET_CONTROL{=68};==>,bs;) returns the right 6 bytes of the data from the data keys in C4 thru C9. {Returns zeros if slots don't hold data keys.}

D(DOMAIN__PUT_CONTROL{=69},bs;==>;) creates data keys in C4 thru C9 with the data from bs in them {using 6 bytes from bs for each key}.

D(DOMAIN__GET_REGS{=70};==> c,((64,genregs),(32,floatregs));) gets all general and floating register values from the domain. c = 2 only if the domain is malformed, 0 if successful.

D(DOMAIN__PUT_REGS{=71},((64,genregs),(32,floatregs));==> c;) places values into the registers of the domain. c = 2 only if the domain is malformed, 0 if successful.

D(DOMAIN__PUT_STUFF{=75},((64,genregs),(32,floatregs),(36,bs));==> c;) places values into the registers of the domain, and creates data keys in C4 thru C9 and puts the data from bs in them {using 6 bytes from bs for each key}. c = 2 only if the domain is malformed, 0 if successful.

D(DOMAIN__MAKE_AVAILABLE{=65};==>c;) deletes all resume keys to the domain and, if the domain is running, deletes the process in the domain. C13 is set to DK(0) {available}. c is set to 0 if the domain was available and 1 if it was busy. c = 2 only if the domain is malformed.

D(DOMAIN__MAKE_BUSY{=67};==>c;EX) deletes all resume keys to the domain and deletes the process in the domain if the domain is running. C13 is set to DK(1) {busy}. c is set to 0 if the domain was available and 1 if it was busy. c = 2 only if the domain is malformed. EX is a fault key to D.

D(DOMAIN__MAKE_FAULT_EXIT{=66};==>c;EX) puts DK(1) in C13 {busy}. c = 2 only if the domain is malformed. If the domain was already busy c is set to 1 and EX is DK(0). Otherwise c is 0 and EX is a fault key to D.

D(DOMAIN__MAKE_RETURN_EXIT{=73};==>c;EX) puts DK(1) in C13 {busy}. c = 2 only if the domain is malformed. If the domain was already busy c is set to 1 and EX is DK(0). Otherwise c is 0 and EX is a return key to D.

Summary of operations that affect busy/available state

Design proposals:

D(kt;==>c) returns in c 7+256*(databyte of D).

Programming Notes:

Fine print:

The following definitions are in PLIGATES MACLIB member DOMDEFS. DOMAIN__GET=0, DOMAIN__GET_KEY=16, DOMAIN__SWAP=32, DOMAIN__SWAP_KEY=48, DOMAIN__CREATE_ENTRY=64,
DOMAIN__MAKE_AVAILABLE=65, DOMAIN__CREATE_FAULT_EXIT=66, DOMAIN__MAKE_BUSY=67, DOMAIN__GET_CONTROL=68,
DOMAIN__PUT_CONTROL=69, DOMAIN__GET_REGS=70, DOMAIN__PUT_REGS=71, DOMAIN__WEAKEN=72, DOMAIN__CREATE_RETURN_EXIT=73,
DOMAIN__REPLACE_MEMORY=74.