The ttmask instruction selectively identifies touch-tones that can be reported.
Synopsis
ttmask(ctype.ttstr, ctype.prev_ttstr)
Description
The ttmask() instruction sets the TouchTone (TT) input mask to the string indicated by ctype.ttstr and copies the previous mask value to ctype.prev_ttstr. The TT interrupt mask determines what touch-tones are received as input by the script. If char.-1 is used for ctype.prev_ttstr, then the previous mask value is not returned. If char.-1 is used for ctype.ttstr, then the current mask value is not changed.
Return values
ttmask() returns 0 in register 0 (r.0) for success and -1 for failure.
Examples
The following example sets input mask so only digits 2, 4, 6, or 8 are received, stores previous mask at address defined by PREV_INPMASK.
ttmask("2468", char.PREV_INPMASK)
The following example sets the mask back to its previously stored value.
ttmask(char.PREV_INPMASK, char.-1)
See also