hex.ptr_subΒΆ
ptr[:w/4] -= value * 2w (retreat ptr by value)
@note: The complexity is calculated with n_const=2, and for log(w) in 16,32,64,128.
SignatureΒΆ
def ptr_sub ptr, value { ... }
Defined in hex/pointers/pointer_arithmetics.fj β lines 35β37 (view on GitHub).
ComplexityΒΆ
Time:
13@+35Space:
w(0.375@ + 3.25) + 7.5@+106
See the complexity glossary for what @, w, dw, dbit, n mean.
Requires initΒΆ
The following must be initialised before this macro is invoked:
hex.sub.init (or hex.init)
SourceΒΆ
Click to view the macro body
def ptr_sub ptr, value {
hex.sub_constant w/4, ptr, value * dw
}
Depends onΒΆ
Used byΒΆ
Example usesΒΆ
hex.xor_hex_to_ptrinhex/pointers/xor_to_pointer.fjhex.xor_byte_to_ptrinhex/pointers/xor_to_pointer.fjhex.read_hexinhex/pointers/read_pointers.fj
β Previous: hex.ptr_add
Next: hex.ptr_index β