Elmo HARmonica Network Hardware User Manual


 
HARSFEN0602
flags
Addressing modes Absent
Promotion Int / Float
Executes as
(float) Int / Float
Output type Int / Int Int
Int / Float
Float
Float / Float
Float
Imposes end of line No
7.7.5 EOL – End Of Line
Purpose:
Indicate this is end of line to the
Harmonica environment.
Algorithm:
Zeroes line execution flag.
Attributes:
Attribute Value Comment
Op code May change in future
versions
Number of arguments None
Argument types N.A.
Addressing modes N.A.
Promotion N.A.
Output type N.A.
Imposes end of line No
7.7.6 FORITR – FOR Loop Iteration
Purpose:
Handle FOR loop – check condition, if true update iterator and execute loop body otherwise break loop and
continue program.
Algorithm:
itr – (iterator)
(SP-2)
itr (set iterator with start value)
(SP-1)
step
(SP)
target (final value, to which itr is tested)
if (step > 0)
if (itr > target) free top three entries at the stack and jump end of loop
else if (step < 0)
if (itr < target) free top three entries at the stack and jump end of loop
else
error (step = 0 , meaning infinite loop)
(SP-2) + step
(SP-2) ( increment iterator by step)
(PC is incremented and loop body is executed)
Attributes
Attribute Value Comment
Op code May change in future
versions
Number of arguments 2
Argument Type1 Signed short integer
Argument Type2 Signed short integer
Addressing mode1 Immediate2
Jump address to the end of