Keyboard
Programming Manual
19
SATO Europe
Functions
Functions are built-in procedures or subroutines used to evaluate, make calculations on,
or transform data.
Functions used in TSKL can be grouped into numeric functions or string functions. For
more information, please refer to TSKL Functions.
Numeric Functions
Numeric functions include integral functions and floating point functions. For example,
INT(), ASC().
String Functions
String functions include string conversion and string manipulation. For example,
RIGHT$(), STR$().
Operators
The operators used in TSKL can be grouped into numeric operators, string operators and
relational operators.
Arithmetic Operators
Arithmetic operators: ‘+’, ’-‘, ’*’, ’/’.
String Operators
String operators: ‘+’.
Relational Operators
Relational operators: ‘>’, ‘=’, ‘<’, ‘<>’,’>=’,’<=’
Programming Manual
Keyboard
SATO Europe
20
Expressions
Operators, constants, and variables are the constituents of expressions. An expression in
TSKL is any valid combination of these pieces. There are three kinds of expressions in
TSKL.
Arithmetic Expressions
Arithmetic expressions can be integral expressions or floating point expressions,
depending on the calculation value. In integral expressions, floating point operands
will be converted to integer, and vice versa.
String Expressions
There is only one operator in string expression, ‘+’, that is, add a string to another
string.
Relational Expressions
The relational expressions are used to determine the relationship of one quantity to
another. The result is true if the value is non-zero, otherwise, it is false.
Keyboard
Programming Manual
21
SATO Europe
Commands and Statements
Commands instruct K012 to work accordingly. Sometimes, commands followed by one or
several parameters, For example, INPUT A$. For more information refer to TSKL
Commands.
A statement is composed of one command or several commands, For example,
IF…THEN…ELSE.
Programming Manual Keyboard
SATO Europe
22
TSKL Commands
!R
Description
This command is used to reset the keyboard. The keyboard will search for an
AUTO.BAS auto-execution program as the first after reset.
Syntax
!R
Remarks
is ASCII 27 escape character.
Example
N/A
Keyboard
Programming Manual
23
SATO Europe
!W
Description
This command is used to upgrade the firmware. The keyboard will enter BIOS upgrade
mode after receiving this command and disable the execution of any AUTO.BAS
program.
Syntax
!W
Remarks
N/A
Example
N/A
Programming Manual Keyboard
SATO Europe
24
SOUND
Description
Turn the speaker on at the specified frequency and interval.
Syntax
SOUND frequency,
interval
Where
Frequency: 0~15
Interval: 0~65535 msec,
Remarks
N/A
Example
FOR F=0 TO 15
FOR I=0 TO 65535
SOUND F,I
FOR J=1 TO 10
NEXT J
NEXT I
NEXT F
Keyboard
Programming Manual
25
SATO Europe
CLS
Description
Clears the LCD display.
Syntax
CLS
Remarks
CLS clears the LCD and places the cursor in the upper left corner. (At position 0,0)
Example
CLS
Programming Manual Keyboard
SATO Europe
26
CLEAR
Description
Remove all the declared variables, arrays, and opened files in the program from
memory.
Syntax
CLEAR
Remarks
N/A
Example
CLEAR
Keyboard
Programming Manual
27
SATO Europe
CURSOR
Description
Selects cursor appearance.
Syntax
CURSOR mode
Remarks
The available modes for the cursor are listed below:
0: Hides the cursor.
1: Block with blinking cursor.
2: Fixed Underline cursor.
3: Block blinking and underline fixed cursor. (Default)
Example
CURSOR 1