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