hex/pointers/stack.fjΒΆ

β€”β€”β€”- Stack

View source on GitHub

MacrosΒΆ

hexΒΆ

  • hex.sp_inc β€” Like:  sp++

  • hex.sp_dec β€” Like:  sp--

  • hex.sp_add β€” Like:  sp += value

  • hex.sp_sub β€” Like:  sp -= value

  • hex.push_ret_address β€” Note: the pushed returned address must be popd out afterwards with pop_ret_address.

  • hex.pop_ret_address β€” return_address is a fj-op address, so we assume is dw-aligned.

  • hex.push_hex β€” Like:  stack[++sp] = hex

  • hex.push_byte β€” byte is a hex[:2].

  • hex.push β€” M is (n+1)/2, which is because the function pushes the entire parameter as bytes.

  • hex.pop_hex β€” hex is only an output parameter.

  • hex.pop_byte β€” byte is hex[:2], and it’s only an output parameter.

  • hex.pop β€” M is (n+1)/2, which is because the function pops all the parameters as bytes.