Supported Functions

The following syscalls (platform functions) are supported by all:

Function

Description

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 deserialization

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