stl.call (arity 1)¶
Saves the return address to the stack and jumps to the given “address”.
When returned, it removes the return-address from the stack.
note: the pop_ret_address is for the future return (counts as space, but not time, complexity).
@Assumes: stack has room (caller-side responsibility).
@Assumes: stack has room (caller-side responsibility)
Signature¶
def call address @ return_label { ... }
Defined in ptrlib.fj — lines 35–42 (view on GitHub).
Complexity¶
Time:
~2.5w@ (exact: w(2.25@+10) + 24@+51)Space:
<3w@ (exact: w(2.625@+49) + 20@+231)
See the complexity glossary for what @, w, dw, dbit, n mean.
Requires init¶
The following must be initialised before this macro is invoked:
the stack_init.
Source¶
Click to view the macro body
def call address @ return_label {
hex.push_ret_address return_label
;address
pad 2
return_label:
hex.pop_ret_address return_label
}
Depends on¶
← Previous: stl.stack_init
Next: stl.call/2 →