LMS 2012
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Math

opADD8 (SOURCE1, SOURCE2, DESTINATION)

  • Add two 8 bit values DESTINATION = SOURCE1 + SOURCE2
  • Dispatch status unchanged

    Parameters
    (DATA8)SOURCE1
    (DATA8)SOURCE2
    Returns
    (DATA8) DESTINATION

    opADD16 (SOURCE1, SOURCE2, DESTINATION)

  • Add two 16 bit values DESTINATION = SOURCE1 + SOURCE2
  • Dispatch status unchanged

    Parameters
    (DATA16)SOURCE1
    (DATA16)SOURCE2
    Returns
    (DATA16) DESTINATION

    opADD32 (SOURCE1, SOURCE2, DESTINATION)

  • Add two 32 bit values DESTINATION = SOURCE1 + SOURCE2
  • Dispatch status unchanged

    Parameters
    (DATA32)SOURCE1
    (DATA32)SOURCE2
    Returns
    (DATA32) DESTINATION

    opADDF (SOURCE1, SOURCE2, DESTINATION)

  • Add two floating point values DESTINATION = SOURCE1 + SOURCE2
  • Dispatch status unchanged

    Parameters
    (DATAF)SOURCE1
    (DATAF)SOURCE2
    Returns
    (DATAF) DESTINATION

    opSUB8 (SOURCE1, SOURCE2, DESTINATION)

  • Subtract two 8 bit values DESTINATION = SOURCE1 - SOURCE2
  • Dispatch status unchanged

    Parameters
    (DATA8)SOURCE1
    (DATA8)SOURCE2
    Returns
    (DATA8) DESTINATION

    opSUB16 (SOURCE1, SOURCE2, DESTINATION)

  • Subtract two 16 bit values DESTINATION = SOURCE1 - SOURCE2
  • Dispatch status unchanged

    Parameters
    (DATA16)SOURCE1
    (DATA16)SOURCE2
    Returns
    (DATA16) DESTINATION

    opSUB32 (SOURCE1, SOURCE2, DESTINATION)

  • Subtract two 32 bit values DESTINATION = SOURCE1 - SOURCE2
  • Dispatch status unchanged

    Parameters
    (DATA32)SOURCE1
    (DATA32)SOURCE2
    Returns
    (DATA32) DESTINATION

    opSUBF (SOURCE1, SOURCE2, DESTINATION)

  • Subtract two floating point values DESTINATION = SOURCE1 - SOURCE2
  • Dispatch status unchanged

    Parameters
    (DATAF)SOURCE1
    (DATAF)SOURCE2
    Returns
    (DATAF) DESTINATION

    opMUL8 (SOURCE1, SOURCE2, DESTINATION)

  • Multiply two 8 bit values DESTINATION = SOURCE1 * SOURCE2
  • Dispatch status unchanged

    Parameters
    (DATA8)SOURCE1
    (DATA8)SOURCE2
    Returns
    (DATA8) DESTINATION

    opMUL16 (SOURCE1, SOURCE2, DESTINATION)

  • Multiply two 16 bit values DESTINATION = SOURCE1 * SOURCE2
  • Dispatch status unchanged

    Parameters
    (DATA16)SOURCE1
    (DATA16)SOURCE2
    Returns
    (DATA16) DESTINATION

    opMUL32 (SOURCE1, SOURCE2, DESTINATION)

  • Multiply two 32 bit values DESTINATION = SOURCE1 * SOURCE2
  • Dispatch status unchanged

    Parameters
    (DATA32)SOURCE1
    (DATA32)SOURCE2
    Returns
    (DATA32) DESTINATION

    opMULF (SOURCE1, SOURCE2, DESTINATION)

  • Multiply two floating point values DESTINATION = SOURCE1 * SOURCE2
  • Dispatch status unchanged

    Parameters
    (DATAF)SOURCE1
    (DATAF)SOURCE2
    Returns
    (DATAF) DESTINATION

    opDIV8 (SOURCE1, SOURCE2, DESTINATION)

  • Divide two 8 bit values DESTINATION = SOURCE1 / SOURCE2
  • Dispatch status unchanged

    Parameters
    (DATA8)SOURCE1
    (DATA8)SOURCE2
    Returns
    (DATA8) DESTINATION

    opDIV16 (SOURCE1, SOURCE2, DESTINATION)

  • Divide two 16 bit values DESTINATION = SOURCE1 / SOURCE2
  • Dispatch status unchanged

    Parameters
    (DATA16)SOURCE1
    (DATA16)SOURCE2
    Returns
    (DATA16) DESTINATION

    opDIV32 (SOURCE1, SOURCE2, DESTINATION)

  • Divide two 32 bit values DESTINATION = SOURCE1 / SOURCE2
  • Dispatch status unchanged

    Parameters
    (DATA32)SOURCE1
    (DATA32)SOURCE2
    Returns
    (DATA32) DESTINATION

    opDIVF (SOURCE1, SOURCE2, DESTINATION)

  • Divide two floating point values DESTINATION = SOURCE1 / SOURCE2
  • Dispatch status unchanged

    Parameters
    (DATAF)SOURCE1
    (DATAF)SOURCE2
    Returns
    (DATAF) DESTINATION

    opMATH (CMD, ....)

  • Math function entry
  • Dispatch status unchanged

    Parameters
    (DATA8)CMD - Specific command parameter


    • CMD = EXP
      e^X (R = expf(X))
      • Parameters
        (DATAF)X -
      • Returns
        (DATAF) R -

    • CMD = POW
      Exponent (R = powf(X,Y))
      • Parameters
        (DATAF)X -
      • Parameters
        (DATAF)Y -
      • Returns
        (DATAF) R -

    • CMD = MOD8
      Modulo (R = X % Y)
      • Parameters
        (DATA8)X -
      • Parameters
        (DATA8)Y -
      • Returns
        (DATA8) R -

    • CMD = MOD16
      Modulo (R = X % Y)
      • Parameters
        (DATA16)X -
      • Parameters
        (DATA16)Y -
      • Returns
        (DATA16) R -

    • CMD = MOD32
      Modulo (R = X % Y)
      • Parameters
        (DATA32)X -
      • Parameters
        (DATA32)Y -
      • Returns
        (DATA32) R -

    • CMD = MOD
      Modulo (R = fmod(X,Y))
      • Parameters
        (DATAF)X -
      • Parameters
        (DATAF)Y -
      • Returns
        (DATAF) R -

    • CMD = FLOOR
      Floor (R = floor(X))
      • Parameters
        (DATAF)X -
      • Returns
        (DATAF) R -

    • CMD = CEIL
      Ceil (R = ceil(X))
      • Parameters
        (DATAF)X -
      • Returns
        (DATAF) R -

    • CMD = ROUND
      Round (R = round(X))
      • Parameters
        (DATAF)X -
      • Returns
        (DATAF) R -

    • CMD = ABS
      Absolut (R = fabs(X))
      • Parameters
        (DATAF)X -
      • Returns
        (DATAF) R -

    • CMD = NEGATE
      Negate (R = 0.0 - X)
      • Parameters
        (DATAF)X -
      • Returns
        (DATAF) R -

    • CMD = TRUNC
      Truncate
      • Parameters
        (DATAF)X - Value
      • Parameters
        (DATA8)P - Precision [0..9]
      • Returns
        (DATAF) R - Result

    • CMD = SQRT
      Squareroot (R = sqrt(X))
      • Parameters
        (DATAF)X -
      • Returns
        (DATAF) R -

    • CMD = LOG
      Log (R = log10(X))
      • Parameters
        (DATAF)X -
      • Returns
        (DATAF) R -

    • CMD = LN
      Ln (R = log(X))
      • Parameters
        (DATAF)X -
      • Returns
        (DATAF) R -

    • CMD = SIN
      Sin (R = sinf(X))
      • Parameters
        (DATAF)X -
      • Returns
        (DATAF) R -

    • CMD = COS
      Cos (R = cos(X))
      • Parameters
        (DATAF)X -
      • Returns
        (DATAF) R -

    • CMD = TAN
      Tan (R = tanf(X))
      • Parameters
        (DATAF)X -
      • Returns
        (DATAF) R -

    • CMD = ASIN
      ASin (R = asinf(X))
      • Parameters
        (DATAF)X -
      • Returns
        (DATAF) R -

    • CMD = ACOS
      ACos (R = acos(X))
      • Parameters
        (DATAF)X -
      • Returns
        (DATAF) R -

    • CMD = ATAN
      ATan (R = atanf(X))
      • Parameters
        (DATAF)X -
      • Returns
        (DATAF) R -