116
MANUAL DO USUÁRIO DC-2000 / PROGRAMA WINTASKGEN - Revisão 1.5
4.3.8 CMP
Syntax:
Operator
Source Operand
Destination Operand
CMP
OPERAND1
OPERAND2
Description:
Compare OPERAND1 with OPERAND2, and set the flag;
if OPERAND1 is equal to OPERAND2, the flag is set to EQ;
if OPERAND1 is not equal to OPERAND2, the flag is set to NE;
if OPERAND1 is greater than OPERAND2, the flag is set to GT;
if OPERAND1 is less than OPERAND2, the flag is set to LT.
The operand contents are not changed.
Operand Data Type:
OPERAND1
numeric constant, numeric variable, string constant, string variable,DATE
string, TIME string
OPERAND2
numeric constant, numeric variable, string constant, string variable
Examples:
In the verification process we define these macros to re-enter data if 0 is
entered.
Line No.
Operator
Source Operand
Destination
Operand
1
INP
*
2
CMP
*
0
3
JMP
NE
5
4
JMP
UC
1
5
.
4.3.9 DIV
Syntax:
Operator
Source Operand
Destination Operand
DIV
OPERAND1
OPERAND2
Description:
Divide OPERAND2 by OPERAND1 and store the result in OPERAND2.
Operand Data Type:
OPERAND1