PEEK - copy memory into your address space.
Usage:
B:
ret = peek( offset [, vec, nwds, seg, doffs] );
C:
int peek(const int offset [, void *vec,
int nwds, int seg, int doffs] );
Where:
- offset
- is the word offset within the other segment where copying
is to begin.
- vec
- is a pointer to a vector where the words are to be
placed.
- nwds
- is the number of words to copy. If "nwds" is
not specified or is zero, no words will be copied
anywhere, but "ret" will receive the contents
of the single word at "address".
- seg
- is a code to identify the segment to be examined. The
default is PKS.TSS refers to the ISR segment of the
current copy of TSS.
- doffs
- is the word offset into an indirect descriptor segment of
the descriptor of the actual source segment.
Description:
PEEK is used to write privileged TSS subsystems that inspect
the state of TSS or Gcos.
If PEEK fails, it always calls EXIT after printing an error
message. Possible causes of error include
address out of program
address out of range
permissions denied
(the subsystem or user must be privileged)
too many words
See Also:
- expl b lib .peek
- for a related routine that returns statuses rather than
exiting with an error. This explain also gives a more
complete discussion of the use of the "seg" and
"doffs" arguments.
- expl b manif peek
- for a decription of manifests for code for
"seg".
Copyright © 1996, Thinkage Ltd.