.PEEK - snap memory.

Alternate Entry Name: _PEEK

Usage:

B:
   status = .peek(offset [, seg, vec, words, doffs]);
C:
   int _peek(int offset [, int seg,
             int *vec, int words, int doffs] );

Where:

offset
is the word offset into the other segment where the copy is to start.
seg
identifies the other segment. The default is PKS.CR (the Gcos communication region).
vec
is the starting address of the data within the current program.
words
is the number of words to be copied.
doffs
is the word offset into an indirect descriptor segment, for the descriptor of the actual data segment.
status
If "size" is non-zero, this indicates whether or not the snap was successful. For a list of the possible values, see the TSS User Guide. If "size" is zero, it is assumed that the snap was successful and "status" will be the addressed word. Nothing will be stored at "vec".

Description:

.PEEK is used to examine memory locations outside the program's normal address space. Its use is privileged except when "seg" has the PKS.GVER value. In TSS it uses DRL T.CMOV, and in batch the call is mapped into a call to .SNOOP.

Unlike PEEK, .PEEK does not terminate the program if the snap fails.

The "seg" argument can have a number of special codes defined by the manifest files B/MANIF/SD.XXX, and B/MANIF/PEEK. If "seg" has the value PKS.WTSS, the data is copied from the program into the ISR of the current copy of TSS. In all other cases, the data is copied from the specified segment into the program's ISR segment. Symbolic values of the form SD.xxx are defined in B/MANIF/SD.XXX and refer to segments in the system linkage segment.

Starting with SR4500, it is possible to "indirect" through one of the system descriptor segments. Assume that "SD.ddd" is the name of a system descriptor segment. If "seg" is set to the value

PKS.IND + SD.ddd

the argument "doffs" will be used to specify the word offset into "SD.ddd" of the actual descriptor to use.

In batch PKS.TSS, PKS.WTSS and PKS.IND are not supported. PKS.SSA and PKS.PAT refer the the SSA an PAT segments of the current job. PKS.GVER is privileged.

See Also:

expl b lib .snoop
for a routine that can be used in batch.
expl b lib peek
for a convenient routine that checks statuses.
expl b manif peek
for a list of the special codes for "seg".

Copyright © 1996, Thinkage Ltd.