 |
SymAddTwin |
Function (ROM Call 0x27F) |
Creates a twin symbol.
SymAddTwin creates a twin entry in the variable allocation table (VAT) for an
existing symbol SymName. A twin symbol is, in fact, another entry in the VAT
with the same variable name, but with a different handle. The TIOS creates twin symbols
during execution of archived programs, just in front of the normal symbol in the VAT table
(see EM_twinSymFromExtMem).
A twin symbol is "stronger" that a normal symbol, i.e. existence of a twin symbol temporary hides the symbol with the same
name, until the twin symbol is deleted. Twin symbols have the "twin" bit set in the VAT
entry (see SYM_ENTRY for the structure of a VAT entry), but in
the VAR-LINK menu, it is shown as "archived". SymAddTwin returns the same result as
SymAdd (HS_NULL in case of an error). If the symbol SymName
does not exist, this is also an error.
Uses: MakeHSym, SymCpy, SymFindPtr, HeapRealloc, memmove, _ds32s32
Used by: EM_twinSymFromExtMem