Elmo HARSFEN0602, HARmonica software manual MLT Multiply, MOV Assignment Operator =

Models: HARmonica HARSFEN0602

1 220
Download 220 pages 51.63 Kb
Page 85
Image 85

HARSFEN0602ElmoHARmonicaSoftwareManual

PRELIMINARYDRAFT

Purpose:

Increase stack pointer with the value given as an argument and zeroes the new entries to stack.

Algorithm:

SP SP + OP1

Attributes

Attribute

Value

Comment

Op code

 

May change in future

 

 

versions

Number of arguments

1

 

Argument type

Unsigned char integer

 

Addressing modes

Immediate1

Number of new entries to

 

stack

Promotion

N.A.

 

Output type

N.A.

 

Imposes end of line

No

 

7.7.19MLT – Multiply

Purpose:

Multiply two numbers (top two entries at the stack).

 

Algorithm:

 

 

 

 

 

 

 

(SP) * (SP-1) (SP-1)

 

 

 

 

 

 

SP

SP-1

 

 

 

 

 

 

 

Attributes

 

 

 

 

 

 

 

Attribute

 

Value

 

 

Comment

 

 

Op code

 

 

 

 

May change in future

 

 

 

 

 

 

 

 

versions

 

 

Number of arguments

None

 

 

 

 

 

Argument types

N.A.

 

 

Both arguments types are set

 

 

 

 

 

 

according to stack members

 

 

 

 

 

 

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.20

MOV – Assignment Operator (=)

 

Purpose:

 

 

 

 

 

 

Assignment operator (=) between global/localvariables, assign value can also be constant or value from

 

stack.

 

 

 

 

 

Algorithm:

 

 

 

 

 

 

 

OP1

OP2

 

 

 

 

 

 

83

Page 85
Image 85
Elmo HARSFEN0602, HARmonica software manual MLT Multiply, MOV Assignment Operator =