 |
SymFindPtr |
Function (ROM Call 0x283) |
Finds a symbol and returns a pointer to the VAT entry.
SymFindPtr acts like SymFind and related
functions, but instead of a HSym
structure, it returns a pointer to the actual VAT entry. SymFindPtr returns
NULL in case of an error.
So, it acts somewhat as a combination of
SymFind and
DerefSym.
Flags is an additional argument which determines the searching method.
It is a set of binary flags. The exact meaning of these flags are still
unknown for me, but at the moment, I know the following for sure:
- If Flags = 0, the search is performed like using the
SymFind function (i.e. through current or given
folder);
- If Flags = 4, the search is performed like using the
SymFindMain function (i.e. through main
folder only).
What I also know is that if b15 in Flags is set, the search is
somewhat related to the folder list, and it is possible to search for folders
as well. But I still can't conclude the exact meaning of these flags.
So, instead of giving uncertain information, I will stop here. Everything
about this function presented so far is certainly true. Fortunately, the TIOS
set of VAT functions is rich enough so that eventual additional possibilities
of this function may be simulated using other known functions. Any additional
information will be welcomed, if someone knows more than me.
As an example of usage, this is a legal method how to lock a variable named
"tetris":
SymFindPtr(SYMSTR("tetris"),0)->flags.bits.locked = 1;
See SYMSTR for info about symbol names.
Uses: CheckSysFunc, FolderAdd, SymCmp, DlgMessage, XR_stringPtr, ParseSymName, _mu16u16
Used by: SymAddTwin, SymDel, SymFind, SymFindMain, SymMove, VarRecall, VarStore, GraphOrTableCmd, ROM Call 0x439
See also: SymFind, SymFindMain, SymFindHome