Next: , Previous: , Up: syslib bytevectors accessors   [Index]


12.17.5.4 64-bit setters and getters

About 64-bit words, we have to remember the following memory layouts:

                                     lowest memory ------------> highest memory
endianness |         word        | 1st | 2nd | 3rd | 4th | 5th | 6th | 7th | 8th
-----------+---------------------+-----+-----+-----+-----+-----+-----+-----+-----
  little   | #xAABBCCDD EEFFGGHH | HH  | GG  | FF  | EE  | DD  | CC  | BB  | AA
   big     | #xAABBCCDD EEFFGGHH | AA  | BB  | CC  | DD  | EE  | FF  | GG  | HH
bit offset |                     |  0  |  8  | 16  | 24  | 32  | 40  | 48  | 56

For these operations: the argument bv is a bytevector object; the argument fx-idx is a non–negative fixnum representing an octet index in the bytevector; ei-val is a fixnum or bignum representing a value to be stored in a bytevector.

NOTE For these operations: the index fx-idx does not need to be aligned to a multiple of 8.

Function: $bytevector-u64l-ref bv fx-idx
Function: $bytevector-u64l-set! bv fx-idx ei-val

Setter and getter for unsigned little–endian 64-bit words.

Function: $bytevector-u64b-ref bv fx-idx
Function: $bytevector-u64b-set! bv fx-idx ei-val

Setter and getter for unsigned big–endian 64-bit words.

Function: $bytevector-u64n-ref bv fx-idx
Function: $bytevector-u64n-set! bv fx-idx ei-val

Setter and getter for unsigned native–endian 64-bit words.

Function: $bytevector-s64l-ref bv fx-idx
Function: $bytevector-s64l-set! bv fx-idx ei-val

Setter and getter for signed little–endian 64-bit words.

Function: $bytevector-s64b-ref bv fx-idx
Function: $bytevector-s64b-set! bv fx-idx ei-val

Setter and getter for signed big–endian 64-bit words.

Function: $bytevector-s64n-ref bv fx-idx
Function: $bytevector-s64n-set! bv fx-idx ei-val

Setter and getter for signed native–endian 64-bit words.

Function: $bytevector-u64-ref bv fx-idx endianness
Function: $bytevector-u64-set! bv fx-idx ei-val endianness

Setter and getter for unsigned 64-bit words. endianness must be a symbol among: ‘big’, ‘little’, ‘native’.

Function: $bytevector-s64-ref bv fx-idx endianness
Function: $bytevector-s64-set! bv fx-idx ei-val endianness

Setter and getter for signed 64-bit words. endianness must be a symbol among: ‘big’, ‘little’, ‘native’.


Next: , Previous: , Up: syslib bytevectors accessors   [Index]