Arithmetic Services File

The files that contain interface definitions for arithmetic services (AS files in the following) are named services.ini, and they have to be located in each ASCET target directory.

The AS files contain the interface definitions that are necessary for generating code with ASCET. The structure of AS files conforms to the Windows standard for *.ini files. These files contain only definitions of sets, interface definitions and comments.

A set definition is a character string enclosed in square brackets ([ ]), an interface definition takes the form of any character string that conforms to predetermined syntax, and a comment is any character string that starts with a semicolon.

An AS file should contain at least one set, and no more than 255 sets, of arithmetic services. A set begins with the declaration of its name, and contains all interface definitions below the declaration, up to the next set definition or the end of the file.

An AS file might look like this:

[Set name]

Function

Function

...

[Set name]

;Comment

Function

Function

...

The definitions of arithmetic services are maintained outside of ASCET in services.ini files. A file of this type is stored separately for each target in the corresponding target directory (ASCET<n>\target\<target>). The file complies with the Windows standard for *.ini files.

To be able to quickly change the ASCET code generator for different requirements within a target, and thus gain the ability to use self-defined arithmetic service routines with great flexibility, it is possible to define and keep various sets of arithmetic services within one services.ini file. When it initializes, ASCET loads all information from the file for the current target, thus making it possible to apply any of the defined sets each time the code generator is run.

The entries in these files must follow this syntax (in BNF):

SERVICE-FILE ::= [ENTRY]+

ENTRY ::= [FUNCTION] | [COMMENT] | [SET]

COMMENT ::= ";" ∑*

SET ::= "[“∑+"]"

FUNCTION ::= [OPERATION](„|“[OPERAND])+ "=" ∑*

OPERATION ::= "abs" | "neg" | "+" | "-" | "*" | "/" | "%" | "+l" | "-l" | "*l" | "/l" | "*>" | "/>" | "*>l" | "/>l" | "*/" | "*/l"

OPERAND ::= "*" | "u8" | "u16" | "u32" | "s8" | "s16" | "s32" "r32" | "r64"

services.ini files can be created and edited using any common text editor; see also Editing an AS File.

See also

Editing an AS File

Managing Service Sets

Managing Entries