A domain, as it runs, generates addresses in the range 0:2**32-1 {our 370s generate addresses less than 2**24} and (_applies) them to the key in slot C3 of the domain.
The result of this application is a byte for a successful read, the modification of a page for a successful write or an error code if the application was unsuccessful.
This section defines the result of applying an address to a key.
{ni}If all disk blocks with the current page value are damaged then the result is an error with code 11.
Else if the read-only bit in the databyte of the page key is on and the reference is a write reference, the result is an error with code 1. See (tp) about this.
Otherwise the result is to access the location at that address in the page.
If the value of ssc is not in the range 3 <= ssc <= 12 the result is an error with code 9. If there is some other error in the format of the segmode key or {in the case of a red segment node} in the node it designates, the result is an error with code 7. If the read-only bit in the databyte of the segmode key is on and the reference is a write reference, the result is an error with code 1. See (tp) about this.
Otherwise, the segmode key is considered (_valid). If (the address divided by 16**ssc) is greater than or equal to the number of initial slots in the segment node then:
{ni}otherwise the result is the result of applying the address to the background key in effect at this node {(p1,currentback)}.
If that key is a data key whose databody mod 4 is 2 or 3 {a window key} then:
If the offset is not a multiple of 16**ssc, the result is an error with code 10.
If the read-only bit is on (the databody mod 16 >= 8) and the reference is a write reference, the result is an error with code 1.
Otherwise, the result is the result of applying the address ((address mod 16**ssc) + (the offset)) to another key.
If the value of the window key is odd then that other key is the background key in effect at this node {(p1,currentback)}. If there is no background key in effect, the result is an error with code 13.
The current background key is the one from the most recent {along the memory path} red segment node with a background key. If a red segment node has a background key then that key is in effect for the initial slots of that node.
The number of keys in a part may not be more than 20, otherwise the result is an error with code 6.
Within one unit of operation {see POP} several memory accesses may occur. {At most 8 pages will be involved.} Each of these accesses involve an access path. For each unit of operation there is also a node path from the domain root to the primordial meter. Consider three sets of nodes: the nodes in all the access paths, the nodes in the meter path, and the three nodes of the domain. A node may belong to at most one of these sets. The total number of nodes thus involved in a unit of operation should not be more than 100. If these conditions are not met, the result may be an error with code 4, or the domain may fail to make headway.
If during one unit of operation one page is addressed with a virtual address that allows writing and another address that does not, the unit of operation will not finish. CPU resources will continue to be consumed.
Consider the sequence of keys forming the access path. We
eliminate from the sequence all keys after and including
any key with the NO_CALL bit on. Also, if any window keys
with the no-call bit on were examined in determining the
result, we eliminate all keys after that point. We then
eliminate all keys that do not have a segment keeper key
{(p1,segkeepkey)}. If there
are any keys left, the last one is called the (_last kept
key).
The segment keeper key to call is the segment keeper key of the last kept key, if there is one. {See (p1,parmcall) however.}
The segment keeper key to call is the segment keeper key of the last kept key, if there is one. Otherwise the segment keeper is one {supplied by the kernel} that returns the error code. See (kernl-keep) for application of this keeper. See (parmcall) however about an effect of receiving parameter strings in kept segments.
Key arguments 0 and 1 are DK(0).
Key argument 2 is a node key. It designates the node holding the last kept key and its databyte is 0.
It would be more relevant to deliver the state as the "machine" {(tp)} reached the red segment. What are the security issues here?
The argument string is six bytes long and consists of the address {with the right 12 bits set to 0} that was applied to the last kept key.
Summary of error codes. The detailed meanings of these are found in section (p1,applyaddr).
2 invalid key {other than data}
3 invalid address {too big}
4 path passes thru node that belongs to the domain
5 invalid data key
6 tree too deep
7 slot 15 of red segment node not a data key
8 bad format for slot 15 {format key} of red segment node
9 ssc out of range
10 window key offset not a multiple of slot size
{ni}12 hardware node damage
13 background window key was used but there is no background key
See (p2,segrc) for conventional error codes from segment keepers that may appear where you expect a segment access trap.