User Tools

Site Tools


en-us_products:mpino_studio2:box_functions:arithmetic:sub

SUB Box Function

Subtract

Category: Arithmetic Box Functions

Behavior

Subtracts the second value from the first and stores the result in the destination.

Syntax and Arguments

Syntax: SUB D0 D1 D2

  • 1st = S1: address or constant
  • 2nd = S2: address or constant
  • 3rd = D: result destination address

Behavior Example

Run condition Before Command entered Expected result
Left condition ON D0=12, D1=5 SUB D0 D1 D2 D2=7

Inputs and results for Arithmetic Box Functions

Cautions

  • Make sure the result stays within the value range of the destination memory.

Box Functions in the Same Category

en-us_products/mpino_studio2/box_functions/arithmetic/sub.txt · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki