=–                Assign a TML variable with the negate of another TML variable

Syntax                        

VAR16D = -VAR16S

set VAR16D to –VAR16S value

VAR32D = -VAR32S

set VAR32D to –VAR32S value

 

OperandsVAR16D: destination integer variable

VAR16S: source integer variable

VAR32D: destination long/fixed variable

VAR32S: source long/fixed variable

PlaceTMLOnline

Binary code

DescriptionAssigns a 16-bit / 32-bit variable with the negate of another 16-bit / 32-bit variable. The instruction uses a 9-bit short address for the destination variable. Bit value X specifies the destination address range:

Addressrange

 

Execution        Copies the negate of a 16-bit or 32-bit value from the source to the destination

 

Example

int Var1;

long Var2;

...

Var1 = - Var1;

Var2 = -Var2;

 

Before instruction

 

After instruction

Var1

1256

 

Var1

-1256

Var2

-224500

 

Var2

224500