2 * String substitution symbols
4 ; if no quotes, interpret as subsymbol
5 ; if quotes, interpret as string, and do forced substitution
13 * Substitution symbol functions
14 label: .word $symlen(SYMBOL) ; 5, substitutes string for symbol
15 .word $symlen(":SYMBOL:") ; 5, forced substitution
16 .word $symlen("SYMBOL") ; 6, uses string directly
18 .word $symcmp(SYMBOL,"value") ; 0
20 ; requires 2nd arg to be a character; zero if not found
21 .word $firstch(":SYMBOL:",'a') ; 2
22 .word $lastch(SYMBOL,'a') ; 2
24 .word $isdefed(SYMBOL) ; 0 (value not in symtab)
25 .word $isdefed("label") ; 1 (string contents in symtab)
26 .word $isdefed("unknown") ; 0
29 ; both args must be identifiers
30 .word $ismember(SYMBOL,list) ; 1
34 .word $iscons("010b") ; 1
35 .word $iscons("11111111B") ; 1
36 .word $iscons("011") ; 2 (5 -- TI bug)
37 .word $iscons("0x10") ; 3 (0 -- TI bug)
38 .word $iscons("'a'") ; 4
39 .word $iscons(SYMBOL) ; 5 ("1")
40 .word $iscons("SYMBOL") ; 0
42 .word $isname(SYMBOL) ; 0
44 .word $isreg(SYMBOL) ; 0
46 ; .word $isreg("AG") ; should be 0, but we always
49 x .word $isreg("AG") ; 1 if .mmregs, 0 otherwise
54 .word $structacc(tag) ; this op is unspecified