User's Manual
HARSFEN0602
Attributes
Attribute Value Comment
Op code May change in future
versions
Number of arguments None
Argument types N.A. Both arguments types must
be integer (set according to
stack members flags)
Addressing modes Absent
Promotion N.A.
Output type Int & Int Int
Imposes end of line No
7.7.3 CMP – Compare
Purpose:
Compare two values (they can be global/local variables, constants or from stack), if they are equal condition
is true otherwise it is false.
Algorithm:
(Op1 == Op2 )
(SP)
SP
SP + 1
Attributes:
Attribute Value Comment
Op code May change in future
versions
Number of arguments 2
Argument type1 Int or Float If argument is from stack,
type is set according to stack
member flag
Argument type2 Int or Float
Addressing mode1 Absent , Immediate, Mem_Direct ,
Stack Immediate, BP_Relative
Addressing mode2 Absent , Immediate, Mem_Direct ,
Stack Immediate, BP_Relative
Promotion N.A.
Output type Int Compare result is always
integer
Imposes end of line No
7.7.4 DIV – Divide
Purpose:
Division of two numbers (top two entries at the stack).
Algorithm:
(SP-1) / (SP)
(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