Chapter 4 Macro Function
|
ScrEdit Software User Manual
4-16
Revision Apr. 30th, 2007, 2007PDD23000002
Example:
Subtract 1 form the value contained within the internal memory address #2
$2 = $2 - 1
The value contained within the internal memory address #1 is subtracted from the value contained
within the internal memory address #2 and the result of this calculation is stored in the internal memory
address #3.
$3 = $2 - $1
Subtract 1.9 form the value contained within the internal memory address #4
$4 = FSUB($4, 1.9) (Signed DW)
The floating point value contained within the internal memory address #4 is subtracted from the floating
point value contained within the internal memory address #6 and the result of this calculation is stored
in the internal memory address #8.
$8 = FSUB($4, $6) (Signed DW)
*, FMUL
Multiplication
Equation: V1 = V2 * V3
V1 = FMUL(V2, V3) (Signed DW)
Perform the multiplication of V2 and V3, and store the multiplication result in V1.
Example:
The value contained within the internal memory address #2 is multiplied by 2
$2 = $2 * 2
The value contained within the internal memory address #2 is multiplied by #1 and the result of this
calculation is stored in the address #3.
$3 = $2 * $1
The value contained within the internal memory address #4 is multiplied by 1.5
$4 = FMUL($4, 1.5) (Signed DW)
The floating point value contained within the internal memory address #4 is multiplied by #6 and the
result of this calculation is stored in the address #8.
$8 = FMUL($4, $6) (Signed DW)
/, FDIV
Division
Equation: V1 = V2 / V3
V1 = FDIV(V2, V3) (Signed DW)
Perform the division of V2 and V3, and store the division result in V1. The value contained
Summary of Contents for AE80THTD
Page 1: ......