hex.write_nth_hex

*(ptr + index*2w) = src — write src into the index-th hex past *ptr.

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

Signature

def write_nth_hex ptr, index, src < hex.pointers.nth_ptr { ... }

Defined in hex/pointers/write_pointers.fj — lines 92–95 (view on GitHub).

Complexity

  • Time: w(3@+10.25) + 11@+25     // for w=64

  • Space: w(3@+69)    + 11@+112     // 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.write_byte/3 Next: hex.write_nth_byte