hex.write_nth_byte¶
*(ptr + index*2w)[:2] = src[:2] — write the index-th byte past *ptr.
src is a hex[:2]; 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_byte ptr, index, src < hex.pointers.nth_ptr { ... }
Defined in hex/pointers/write_pointers.fj — lines 102–105 (view on GitHub).
Complexity¶
Time:
w(3@+10.25) + 17@+37 // for w=64Space:
w(3@+69) + 17@+200 // 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¶
Click to view the macro body
def write_nth_byte ptr, index, src < hex.pointers.nth_ptr {
.ptr_index hex.pointers.nth_ptr, ptr, index
.write_byte hex.pointers.nth_ptr, src
}
Depends on¶
← Previous: hex.write_nth_hex