Elmo HARSFEN0602, HARmonica software manual 217, Examples, Jp##Label, JS##LABEL Label, Jz##Label

Models: HARmonica HARSFEN0602

1 220
Download 220 pages 51.63 Kb
Page 219
Image 219

 

HARSFEN0602ElmoHARmonicaSoftwareManual

 

 

PRELIMINARYDRAFT

 

 

 

 

 

 

 

 

 

 

 

 

command AF

 

 

 

 

 

 

 

2

WT command

 

WT=xxx

 

wait xxx

 

 

 

The keyword ‘wait is used instead the

 

 

 

 

 

 

 

 

command WT

 

 

 

 

 

 

 

3

JP command without condition

 

JP##LABEL

 

goto##LABEL

 

 

 

The keyword ‘goto’ is used for jump to

 

 

 

 

 

 

 

 

the label

 

 

 

 

 

 

 

4

JP command with condition

 

JP##LABEL,cond

 

if cond

 

 

 

The ‘if’ statement is used for condition

 

 

 

goto##LABEL

 

 

 

 

 

 

 

 

end

 

 

5

JS command without condition

 

JS##LABEL

 

LABEL

 

 

 

The subroutine call is used

 

 

 

 

 

 

 

6

JS command with condition

 

JS##LABEL,cond

 

if cond

 

 

 

The ‘if’ statement is used for condition

 

 

 

LABEL

 

 

 

 

 

 

 

 

end

 

 

7

JZ command without condition

 

JZ##LABEL

 

reset LABEL

 

 

 

The keyword ‘reset’ is used for killing

 

 

 

 

 

 

 

 

stack and jump to the subroutine

 

 

 

 

 

 

 

8

JZ command with condition

 

JZ##LABEL,cond

 

if cond

 

 

 

The ‘if’ statement is used for condition

 

 

 

reset LABEL

 

 

 

 

 

 

 

 

end

 

 

9

EN command

 

EN

 

exit

 

 

 

The keyword ‘exit’ is used instead the

 

 

 

 

 

 

 

 

command EN

 

 

 

 

 

 

 

10

RT command

 

RT

 

return

 

 

 

The keyword ‘return’ is used instead the

 

 

 

 

 

 

 

 

command RT

 

 

 

 

 

 

 

11

The ‘is equal’ symbol inside the condition

 

=

 

==

 

 

 

12

The ‘not equal’ symbol inside the

 

<>

 

!=

 

 

 

 

condition

 

 

 

 

 

 

 

13

Hexadecimal number representation

 

1234H

 

0x1234

 

 

14

Separation of expressions

 

UM=5;MO=1;BG

 

UM=5;

 

 

 

A single line may contain several

 

 

 

MO=1;

 

 

 

expressions to evaluate separated with

 

 

 

BG

 

 

 

semicolon. In the Harmonica all

 

 

 

 

 

 

 

 

expressions of the same line must be

 

 

 

 

 

 

 

 

executed without return control to the

 

 

 

 

 

 

 

 

Interpreter. It does not relevant for the

 

 

 

 

 

 

 

 

Saxophone/Clarinet, so every expression

 

 

 

 

 

 

 

 

will be set to the separate line.

 

 

 

 

 

 

 

15

IA[N], RA[N] commands

 

 

 

int IA[100];

 

 

 

The global variables IA and RA are

 

 

 

float RA[100];

 

 

 

defined in the beginning of every

 

 

 

 

 

 

 

 

program. They are vectors of the length

 

 

 

 

 

 

 

 

100.

 

 

 

 

 

 

 

18.5

Examples

 

 

 

 

 

 

 

Here are some examples of the conversion:

 

 

 

 

 

 

 

 

 

 

 

 

Clarinet/Saxophone format

 

The Harmonica’s format

 

 

 

 

 

int IA[100];

 

 

 

 

 

 

 

 

float RA[100];

 

 

 

 

 

##START

 

##START

 

 

 

 

217

Page 219
Image 219
Elmo HARSFEN0602, HARmonica software manual 217, Examples, Jp##Label, JS##LABEL Label, Jz##Label