HARSFEN0602ElmoHARmonicaSoftwareManual

PRELIMINARYDRAFT

16.2.5Contents of Text4-Text7

This text specifies which op-codes a specific the Harmonica supports, and also the limitations: Size of available flash space (may vary with Harmonica grades), size of data segment in RAM, maximal number of variables, maximum number of functions, and Maximum stack depth.

The text4 file specifies the supported mnemonics. By “mnemonic” we mean a case insensitive combination of two letters, which refer to system service. It contains comma-delimited list of 6768 numbers. Each number corresponds to combination of two English letters. Each letter is given a value – A is 0, B is 1, C is 2, and so on until Z=25.

The first of the 676 numbers corresponds to the two letters combination with the value of 0 – that is AA = 0*26 + 0. The second number corresponds to value of 1 which matches the combination AB = 0*26+1 until the last number 675 which matches the combination ZZ=26*25+25.

Each number of the list specifies the index of the service function for a specific mnemonic. The number –1 specifies that the mnemonic is not connected to any service function.

The list –1,34,67,-1,-1,... specifies that from the mnemonics AA,AB,AC,AD, and AE, only AB and AC are meaningful – AB is connected to the service function of index 34 and AC is connected to the service function of index 67.

The text5 file describes the virtual assembly commands that the Harmonica can service, and specify the index of their service functions. Text5 contains a list with the following format:

MLT , 0

SUB , 1

ADD , 2

DIV , 3

REM , 4 RSLTAND , 5 RSLTOR , 6

...

From the first line of the list we understand that there is a virtual assembly command named MLT. MLT is implemented by the service function of index 0. The next lines are interpreted similarly.

The list of HARMONICA op codes is given in Section Error! Reference source not found.:

The text6 file lists all the system functions. It has the format rnd , 34 , 1 , 1

sqrt , 35 , 1 , 1

...

The first line specifies that the rnd (round to nearest integer) function is serviced by the service function of index 34, and that it has 1 input argument and 1 output argument.

Next lines are interpreted similarly.

The text7 file specifies the type of service given by each of the service functions. It has the format 34562 8232

Each number is a bit field which its composed according to the table below.

Each number describes the nature of a specific command, system function or virtual assembly code.

Bit

Description

Meaning

0x1

FLAG_Float

System parameter type is float

0x2

FLAG_Long

System parameter type is long

0x4

FLAG_PreProcess

Return an answer based on internal data processing

0x8

FLAG_PostProcess

Process the data for internal use

0x10

FLAG_BitField

System parameter is a bit field

8There are 676 possible combinations of two English letters. There are 26 letters and 676 = 26 * 26.

206

Page 208
Image 208
Elmo HARmonica, HARSFEN0602 software manual 206, Contents of Text4-Text7