====== NEG Box Function ====== **Negate** Category: [[en-us_products:mpino_studio2:box_functions:conversion|Conversion Box Functions]] ===== Behavior ===== Reverses the sign of the source value and stores the result. ===== Syntax and Arguments ===== **Syntax:** ''NEG D0 D1'' * 1st = S: source address or constant to negate * 2nd = D: result destination address ===== Behavior Example ===== ^ Run condition ^ Before ^ Command entered ^ Expected result ^ | Left condition ON | D0=10 | ''NEG D0 D1'' | D1=-10 | {{ :en-us_products:mpino_studio2:conversion-examples.svg?1000 |Inputs and results for Conversion Box Functions }} ===== Cautions ===== * Use the WORD data formats required by the command for the source and destination. ===== Box Functions in the Same Category ===== * [[en-us_products:mpino_studio2:box_functions:conversion:inv|INV View details]] — Invert * [[en-us_products:mpino_studio2:box_functions:conversion:h2d|H2D View details]] — BCD Decode (Hex to Decimal) * [[en-us_products:mpino_studio2:box_functions:conversion:d2h|D2H View details]] — BCD Encode (Decimal to Hex)