Next: iklib pointers peek, Previous: iklib pointers misc, Up: iklib pointers [Index]
With all the following functions: the memory argument must be a
valid pointer object or memory-block
instance; 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 poked
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 store signed and unsigned exact integers in raw memory location selecting the size with the number of bits required to represent the value.
Set to value the single byte of memory located at offset from memory. VALUE must be an exact integer in the range representable by 8 bits.
Set to value the two bytes of memory located at offset from memory. VALUE must be an exact integer in the range representable by 16 bits.
Set to value the four bytes of memory located at offset from memory. VALUE must be an exact integer in the range representable by 32 bits.
Set to value the eigth bytes of memory located at offset from memory. VALUE must be an exact integer in the range representable by 64 bits.
The following functions store signed and unsigned exact integers in raw memory locations selecting the size according to the one used by the C language implementation.
Set to value a number of bytes corresponding to the signed
char
or unsigned char
type located at offset from
memory.
Set to value a number of bytes corresponding to the signed
short int
or unsigned short int
type located at offset from
memory.
Set to value a number of bytes corresponding to the signed
int
or unsigned int
type located at offset from
memory.
Set to value a number of bytes corresponding to the signed
long
or unsigned long
type located at offset from
memory.
Set to value a number of bytes corresponding to the signed
long long
or unsigned long long
type located at offset from
memory.
Set to value a number of bytes corresponding to the size_t
type located at offset from memory.
Set to value a number of bytes corresponding to the ssize_t
type located at offset from memory.
Set to value a number of bytes corresponding to the off_t
type located at offset from memory.
Set to value a number of bytes corresponding to the
ptrdiff_t
type located at offset from memory.
Convert the Scheme floating point number flonum (represented in Vicare as an IEEE 754 double precision floating point number) to a float (an IEEE 754 single precision floating point number) and store the result in the four bytes at offset from memory.
Store the double precision IEEE 754 floating point value of the Scheme flonum in the eight bytes at offset from memory.
Store the double precision IEEE 754 floating point values composing the Scheme cflonum in the 16 bytes at offset from memory, real part at the lowest address.
Store address of the raw memory location referenced by the pointer value at offset from memory.
Next: iklib pointers peek, Previous: iklib pointers misc, Up: iklib pointers [Index]