.SNOOP - snap memory on GCOS8.
Usage:
B:
status = .snoop(kpx, segment, offset [, vector, words])
C:
#equate _snoop .snoop
int _snoop(int kpx, int segment, int offset,
[void *vector, int words]);
Where:
- kpx
- is the program number or Known Process indeX of the
program which owns the segment being snapped. There are
two special values of "kpx".
- 0
- This implies that it is a system segment.
- -1
- This implies that it is the current process, and
avoids having to find your own process number.
- segment
- identifies the segment being snapped. It is divided into
's' and 'd' fields like the hardware segid.
- s = 3 (06000 - 07777)
- The D field is the segment number in the system
linkage segment (use SD.xxx symbols) or in the
named KPX's Linkage segment. Note that for
accommodation mode programs, 06000 is the ISR.
- s=0, d < 1760 (0 - 01757)
- The 'd' field is an index into the process's
PUSH. This is illegal for kpx=0, and odd values
of 'd' will fail. Use the PH.xxx symbol.
- s=0, d = 1760 -
- This hardware illegal segid refers to the
process's PUSH. This is not supported in the
batch version.
- s=0, d > 1760 (01761 - 01777)
- These are the hardware values for specific
descriptor registers. The segment currently
described by that register is used. Only .LSR may
be used for KPX=0. .CTYP (01761) and .DSDR
(01763) are always illegal. This feature is not
supported in batch.
The referenced descriptor must describe a data,
descriptor, or super segment (type 0, 1, 2, 3, 4 or 6).
- offset
- is the offset into the selected segment of the first word
to be snapped.
- vector
- is the starting address in the current program where the
snapped data is to be stored. If "words" is
zero or omitted, then "vector" may be omitted
or specified as zero. The default is zero.
- words
- specifies the number of words to be snapped. The default
is zero.
- status
- will contain the value of the first addressed word if
"words" is zero. If "words" is
non-zero, "status" indicates whether the snap
was successful. The following statuses may be returned in
the lower 16 bits:
- 0
- Successful. In this case, a residue count is
returned in the upper 20 bits of
"status". For most cases, you can
simply use the upper 18 bits as a word residue.
- 1
- Process busy.
- 2
- Process is swapped (not in memory).
- 3
- Non-existent process.
- 4
- Process is busy snapping some other process.
- 5
- Permissions denied.
- 6
- Too many words to move.
- 7
- Word offset out of bounds.
- 8
- Illegal TYPE segment specified.
- 9
- Bad segid. The 's' and 'd' fields are not
meaningful for the selected KPX.
- 10
- Bad argument. The PMME was given a bad output
data segment.
Description:
.SNOOP allows the user to examine addresses outside the
program's normal address space. Its use is privileged. A TSS user
must be able to issue the Thinkage DRL T.PEEK. A batch program
must be able to issue MME .EMMS.
Some of the above statuses are not issued when .SNOOP is used
in batch. Instead, the program may simply abort or memory fault.
The TSS implementation of this function depends on Thinkage's
DRL T.PEEK; thus .SNOOP cannot be used at sites that do not
support this DRL and the corresponding PMME. This routine only
functions under GCOS8. Consequently, in situations where the same
information can be obtained with .PEEK, .PEEK should be used.
See Also:
- expl b lib .peek
- for corresponding GCOS3 functionality.
- expl b manif prognums
- for symbolic names for the GCOS system slaves.
Copyright © 1996, Thinkage Ltd.