hex.ptr_addΒΆ
ptr[:w/4] += value * 2w (advance ptr by value)
@note: The complexity is calculated with n_const=2, and for log(w) in 16,32,64,128.
SignatureΒΆ
def ptr_add ptr, value { ... }
Defined in hex/pointers/pointer_arithmetics.fj β lines 26β28 (view on GitHub).
ComplexityΒΆ
Time:
13@+26Space:
w(0.375@ + 3.25) + 7.5@+94
See the complexity glossary for what @, w, dw, dbit, n mean.
Requires initΒΆ
The following must be initialised before this macro is invoked:
hex.add.init (or hex.init)
SourceΒΆ
Click to view the macro body
def ptr_add ptr, value {
hex.add_constant w/4, ptr, value * dw
}
Depends onΒΆ
Used byΒΆ
Example usesΒΆ
hex.sp_addinhex/pointers/stack.fj
β Previous: hex.ptr_dec
Next: hex.ptr_sub β