 |
DerefSym |
Function (ROM Call 0x79) |
Dereferences a symbol.
DerefSym dereferences the symbol by converting Sym (which is return value from many
TIOS VAT functions) into the actual VAT entry. DerefSym returns a pointer to the entry,
which is a pointer to the structure
of type SYM_ENTRY, which represents a VAT entry. Returns
NULL in a case of error. Beware that VAT entries may moved during the heap compression,
so SYM_ENTRY pointers may become invalid after the heap compession.
DerefSym may be simulated using HeapDeref.
For example, the statement
SymPtr = DerefSym (hsym);
is equal to the statement
SymPtr = (SYM_ENTRY*)((char*)HeapDeref(hsym.folder) + hsym.offset);
I don't know what the best way to find the handle of the main folder is, but one method
which is certainly legal is the following:
MainHandle = DerefSym(SymFindHome(SYMSTR("main")))->handle;
Note: SYM_ENTRY structures are usually
not locked, which means that pointers to them will become invalid if a heap
compression occurs. Basically, this means that you can only operate on them
for a short time in which you know that no heap compression can occur.
Used by: AddSymToFolder, checkCurrent, EM_moveSymFromExtMem, EM_moveSymToExtMem, EM_twinSymFromExtMem, HSymDel, HSYMtoName, partial_len, VarRecall, VarStore, cmd_andpic, cmd_archive, cmd_blddata, cmd_custom, cmd_cyclepic, cmd_delfold, cmd_delvar, cmd_dialog, cmd_fill, cmd_get, cmd_local, cmd_lock, cmd_movevar, cmd_newdata, cmd_newpic, cmd_newprob, cmd_passerr, cmd_popup, cmd_rclpic, cmd_request, cmd_rplcpic, cmd_showstat, cmd_sinreg, cmd_sorta, cmd_sortd, cmd_stogdb, cmd_toolbar, cmd_unarchiv, cmd_unlock, cmd_xorpic, push_csolve, push_czeros, push_gettype, push_max, push_min, push_nsolve, push_randpoly, push_solve, push_zeros, push_indir_name, ERD_process, push_internal_simplify, push_parse_text, handleRclKey, handleVarLinkKey, FClose, FDelete, FOpen, FSetVer, gdb_len, gdb_recall, gdb_store, OSLinkCmd, sendcalc, fopen, de_initRes, de_loop, delete_list_element, did_push_approx_inflection_point, did_push_var_val, does_push_fetch, dv_create_graph_titles, EQU_getNameInfo, EQU_select, EQU_setStyle, FindGrFunc, GetStatValue, GM_Derivative, GM_DistArc, GM_Inflection, GM_Integrate, GM_Intersect, GM_Math1, GM_TanLine, gr_add_fldpic, gr_ck_solvergraph, gr_de_value, gr_execute_seq, gr_remove_fldpic, gr_seq_value, gr_stopic, GT_Open, GT_SaveAs, InitDEMem, InitTimeSeq, NG_setup_graph_fun, push_parse_prgm_or_func_text, push_simplify, push_user_func, recall_data_var, seqWebInit, setup_more_graph_fun, spike_geo_titles, spike_in_editor, spike_optionD, statFree, store_data_var, tokenize_if_TI_92_or_text, VarStoreLink, ROM Call 0x437, ROM Call 0x438, ROM Call 0x45E, ROM Call 0x468, ROM Call 0x4D1