The following functions will take an SP_term_ref and convert it to C data. They return zero if the conversion fails, and a nonzero value otherwise, and store the C data in output arguments, except the last two, which merely decompose compound terms.
SP_get_integer()
SP_get_float()
SP_get_atom()
SP_get_string()
SP_get_address()
SP_get_list_codes()
SP_get_list_n_codes()
SP_get_list_n_bytes()
SP_get_number_codes()
SP_get_integer_bytes()
SP_get_functor()
SP_get_list()
SP_get_arg()