Domain Macros. These macros are in DOMAIN MACLIB on the Gnosis disk. On Gnosis they are in SYS.DOMAINMAC. .
"oc" must be an integer expression less than 4096. It will be used as the order code. If "oc" is absent, the order code must be loaded into register 1 before the KC macro.
If "pstr" is omitted, no string is passed. If it is of the form "(psaddr,pslen[,R])", a string is passed.
"pslen" is the length of the string. It will be loaded into general register 3. If omitted, register 3 must already be set up.
If "R" is present, the address of psaddr is an offset in the registers. E.g., if psaddr is 24, the string will begin with the high order byte of general register 6. The floating registers follow general register 15. If "R" is absent, psaddr is an address in the domain's memory.
If "rstr" is omitted, no string is received. If it is of the form "(rsaddr,rslen[,R])", a string is received.
"rslen" is the length of the area. It will be loaded into general register 5. If omitted, register 5 must already be set up.
If "R" is present, the address of rsaddr is an offset in the registers as above, otherwise it is an address in the domain's memory.
The rk's are the slot numbers to accept the keys returned. Any may be omitted.
Specify ERR=erraddr to accept the return code in register 1 and branch to erraddr if it is nonzero.
Specify RC=R1 to accept the return code in register 1.
Specify neither of the above two to reject the return code.
oc is non-null (e.g. "ARC" or "R1") to accept the order code in R1.
rstr is null if no string is to be accepted, otherwise it is (rsaddr,rslen[,R]) as in KC.
Specify DATABYTEWANTED=1 or DBW=1 to accept the databyte in R2.
Specify STRINGLENGTHWANTED=1 or SLW=1 to accept the length of the offered string in R3.
k0, k1, k2, k3 are slot numbers to accept key parameters; a null slot number rejects that parameter.
ik is the slot number of the key to be invoked.
pstr is null if no string is to be passed, otherwise it is (psaddr,pslen[,R]) as in KC.
k0, k1, k2, k3 are slot numbers of parameter keys to be passed; if a slot number is null, DK(0) is passed.
See Tymshare's "CP and CMS Assembler User's Supplement" for detailed information on their usage.
The IF macro takes as its argument the same possibilities as the CRASH macro. These macros can be used in the following combinations:
A matched set of these macros may each have the same label in the label field. If these labels should not match, an MNOTES will be issued by the assembler. These symbols are not placed, as such, in the assembler's symbol table.
The LOCTR feature of the H assembler is used in an essential way in these macros. The code following the IF is compiled elsewhere in all cases. The code between the ELSE and FI is compiled inline. It is thus faster to design your code so the probability of the code following the IF is small. {A brief survey of the kernel indicates that this is true in 90% of the IFS.}
"IF 0000" is special in that it compiles no code but does switch to another LOCTR. Except for this case the IF always compiles 4 bytes of code {a BC instruction}. We have taken advantage of this in cases such as: BAL R14,a IF 1111 ... code to be executed for return to 0(R14) ENDIF ... code to be executed for return to 4(R14).
CASES
While KJUMP is running there are no legitimate uses of the domain's real slots or the supernodes slots except via the KJUMP mechanisms. Via KJUMP there appear to be 64K slots instead of 16. These are called "c-slots" here.
C-slots are designated by halfwords in the range 0 through 2**16-2. (The value of the halfword is the index in the super node reserved for that c-slot.)
To use KJUMPA reentrantly, copy from entry point KJUMPBEG up to entry point KJUMPEND to private storage. Call the procedures by going to the appropriate offset in the private area. {Some day the loader will make this unnecessary}.
R14 has the address to return to.
R13 points to a save area. 12(R13) through 71(R13) will be clobbered by the called program.
R1 points to a parameter list.
All registers are saved.
Just after calling KJUMPAI, the contents of C-slots 1 through 9 will be the keys that had been in general key slots 1 through 9. The initial contents of other C-slots will be the keys from the corresponding same index positions within from the super node.
The procedure KJUMPAI should be called before any of the other procedures described here. R1 points to the address of a halfword containing a c-slot index. KJUMPA will not allocate new c-slots less than or equal to that index. If KJUMPAI is not called, the index is assumed to be 9.
ASTRINGFROMLENGTH DS A
Graphically: 0001RDSL KKKK0000
ASTRINGTOLENGTH DS A
The entry KJUMPAE resets the status of the cache and the domain's key slots to that of before any KJUMP requests.