Next: iklib arrays poke, Previous: iklib pointers poke, Up: iklib pointers [Index]
With all the following functions: the memory argument must be a
valid pointer object; the offset argument must be an exact integer
in the range of the C language type ptrdiff_t
. When adding an
offset to a pointer: all the following functions do not scale
the offset to the size of the peeked value; pointer arithmetics is
performed with byte offsets.
The following bindings are exported by the libraries (vicare)
and (vicare system $foreign)
and reexported by the library
(vicare ffi)
.
The following functions retrieve signed and unsigned exact integers from raw memory location selecting the size with the number of bits required to represent the value.
Peek the 8 bits located at offset from memory and return them as signed or unsigned exact integer.
Peek the 16 bits located at offset from memory and return them as signed or unsigned exact integer.
Peek the 32 bits located at offset from memory and return them as signed or unsigned exact integer.
Peek the 64 bits located at offset from memory and return them as signed or unsigned exact integer.
The following functions store signed and unsigned exact integers from raw memory locations selecting the size according to the one used by the C language implementation.
Peek the signed char
or unsigned char
integer located
at offset from memory and return it as signed or unsigned
exact integer.
Peek the signed short int
or unsigned short int
integer located
at offset from memory and return it as signed or unsigned
exact integer.
Peek the signed int
or unsigned int
integer located
at offset from memory and return it as signed or unsigned
exact integer.
Peek the signed long
or unsigned long
integer located
at offset from memory and return it as signed or unsigned
exact integer.
Peek the signed long long
or unsigned long long
integer located
at offset from memory and return it as signed or unsigned
exact integer.
Peek the size_t
integer located at offset from memory
and return it as exact integer.
Peek the ssize_t
integer located at offset from memory
and return it as exact integer.
Peek the off_t
integer located at offset from memory
and return it as exact integer.
Peek the ptrdiff_t
integer located at offset from
memory and return it as exact integer.
Return the four–byte float (represented as IEEE 754 single precision floating point number) stored at offset from memory. The value is extended to an IEEE 754 double precision floating point number that Vicare uses to represent inexact numbers.
Return the eight–byte float (represented as IEEE 754 double precision floating point number) stored at offset from memory.
Return a cflonum built from the two eight–byte floats (represented as IEEE 754 double precision floating point numbers) stored at offset from memory, real part at the lowest address.
Return the pointer stored at offset from memory. The size of the pointer (also the number of bytes loaded) depends on the architecture: it is 4 bytes on 32-bit systems and 8 bytes on 64-bit systems.
Next: iklib arrays poke, Previous: iklib pointers poke, Up: iklib pointers [Index]