hex.read_nth_byte

dst[:2] = *(ptr + index*2w) — read the index-th byte past *ptr.

dst is a hex[:2]; ptr is a hex[:w/4]; index is a signed hex[:w/4] (may be negative). ptr, index are preserved.

Signature

def read_nth_byte dst, ptr, index < hex.pointers.nth_ptr { ... }

Defined in hex/pointers/read_pointers.fj — lines 88–91 (view on GitHub).

Complexity

  • Time: w(3@+10.25) + 9@+13      // for w=64

  • Space: w(3@+69)    + 9@+72      // for w=64

See the complexity glossary for what @, w, dw, dbit, n mean.

Requires init

The following must be initialised before this macro is invoked:

  • hex.init and stl.ptr_init (or stl.startup_and_init_all).

Source

Depends on


← Previous: hex.read_nth_hex