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 82–94 (view on GitHub).

Complexity¶

  • 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.

Depends on¶

Used by¶