Accessing Files Programmer's Guide (32650-90885)

150 Chapter11
Accessing a File Using Mapped Access
New Intrinsics
Returns the status of the HPFMOVEDATALTOR call. If no errors or warn-
ings are encountered, status returns 32 bits of zero. If errors or warnings
are encountered, status is interpretted as two 16-bit fields.
Bits (0:16) comprise status.info. A negative value indicates an error condi-
tion, and a positive value indicates a warning condition.
Bits (16:16) comprise status.subsys. The value represents the subsystem
that set the status information.
Operation Notes
This intrinsic is especially useful when the source and target buffers are overlapping. The
HPFMOVEDATALTOR intrinsic is typically used when the target buffer’s address is to
the left (smaller) of the source buffer’s address. Moving the data from the left to the right
ensures that the data in the source buffer is copied to the target buffer before it is
overwritten itself.
Related Information
Manual Accessing Files Programmer's Guide
HPFMOVEDATARTOL
NM callable only.
This routine can be used to efficiently move data from a source buffer to a target buffer. If
the source and target buffers were viewed horizontally, like a line of text, the data
movement is performed by starting at rightmost position of the source buffer (to the
rightmost position of the target buffer) and proceeding to the leftmost
Syntax
I64 @64 @64 I32
HPFMOVEDATARTOL(count,
source_ptr
,
target_ptr
,
status
,
Parameters
count
64-bit signed integer by reference (required)
The count parameter allows the caller to specify the number of bytes to
move from the source buffer to the target buffer.
source_ptr
64-bit pointer by value (required)
The source_ptr can be a 64-bit pointer to any valid object that the calling
process has access to. The buffer may be in the caller’s stack, heap, or
obtained by opening a file with user mapped access
target_ptr
64-bit pointer by value (required)
The target_ptr can be a 64-bi pointer to any valid object that the calling
process has access to. The buffer may be in the caller’s stack, heap, or
obtained by opening a file with user mapped access.
status
32-bit signed integer by reference (optional)