Supported Functions
The following syscalls (platform functions) are supported by all:
String-related:
Asc string character —> ASCII code;
- Chr ASCII code —> string character;
- Val numerical string—> 16-bit value (word or short);
- Lval numerical string —> 32-bit value (dword or long);
- Strtof numerical string —> real value;
- Bin unsigned 16-bit numeric value (word) —> binary numerical string;
- Lbin unsigned 32-bit numeric value (dword) —> binary numerical string;
- Str unsigned 16-bit numeric value (word) —> decimal numerical string;
- Stri signed 16-bit numeric value (short) —> decimal numerical string;
- Lstr unsigned 32-bit numeric value (dword) —> decimal numerical string;
- Lstri signed 32-bit numeric value (long) —> decimal numerical string;
- Hex unsigned 16-bit numeric value (word) —> hexadecimal numerical string;
- Lhex unsigned 32-bit numeric value (dword) —> hexadecimal numerical string;
- Ftostr real value —> numerical string;
- Len gets the string length;
- Left gets a left portion of a string;
- Mid gets a middle portion of a string;
- Right gets a right portion of a string;
- Insert inserts a string into another string;
- Instr finds a substring in a string;
- Strgen generates a string using repeating substring;
- Strsum calculates 16-bit (word) sum of string characters' ASCII codes;
- Ddstr dot-decimal value —> dot-decimal string;
- Ddval dot-decimal string —> dot-decimal value;
- Strand logical AND on corresponding data bytes from two strings;
- Stror logical OR on corresponding data bytes from two strings;
- Strxor logical XOR on corresponding data bytes from two strings.
Date and time serialization and de-serialization:
Daycount given year, month, and date —> day number;
- Mincount given hours and minutes —> minute number;
- Year given day number —> year;
- Month given day number —> month;
- Date given day number —> date;
- Weekday given day number —> day of the week;
- Hours given minutes number —> hours;
- Minutes given minutes number —> minutes.
Hash calculation, encryption, and related functions:
Aes128enc encrypts data according to the AES128 algorithm ( not supported on the EM500W and DS1100 platforms);
- Aes128dec decrypts data according to the AES128 algorithm ( not supported on the EM500W and DS1100 platforms);
- Rc4 encrypts/decrypts data according to the RC4 algorithm;
- Md5 calculates MD5 hash of a string;
- Sha1 calculates SHA-1 hash of a string;
- Random generates a random string;
Miscellaneous
Cfloat checks the validity of a real value.