hex.pointers.stack_initΒΆ

Initializes a stack of size n (maximal capacity of n hexes / return-addresses).
n is the size of the stack.

SignatureΒΆ

def stack_init n @ stack_error_handler > sp, stack { ... }

Defined in hex/pointers/basic_pointers.fj β€” lines 86–98 (view on GitHub).

ComplexityΒΆ

  • Time: O(1)

  • Space: n+w/4 + 330

See the complexity glossary for what @, w, dw, dbit, n mean.

Output labelsΒΆ

This macro exposes labels into the caller’s scope via >:

  • sp β€” the stack pointer. sp always points to the last pushed value (at start - to stack[-1])

  • stack β€” the global stack.

SourceΒΆ

Depends onΒΆ

Used byΒΆ

Example usesΒΆ


← Previous: hex.pointers.set_flip_and_jump_pointers Next: hex.ptr_jump β†’