Delta Electronics DOP-A Series Network Card User Manual


 
Chapter 4 Macro Function|ScrEdit Software User Manual
4-26 Revision Apr. 30th, 2007, 2007PDD23000002
SWAP
Swap BYTE Data of the WORD
Equation: SWAP (V1, V2, V3)
Swap high-byte and low-byte of V2, V2+1, V2+2…V2+V3 (WORD) and store the result in the
starting position of V1, V1+1, V1+2…V1+V3 in order.
Example:
SWAP($1, $10, 5)
Swap the high-byte and low-byte of $10, $11, …, $14 and store the result in $1, $2, …, $5 in order.
SWAP($2, $11, 1)
If $11 = 1234H, $2 = 3412H after executing SWAP command.
XCHG
Exchange Data
Equation: XCHG (V1, V2, V3)[(DW)]
Exchange the data of V2, V2+1, V2+2…V2+V3 and the data of V1, V1+1, V1+2.., V1+V3. The data
of V1 and V2 will be exchanged after executing XCHG command.
Example:
XCHG($1, $10, 5)
Exchange the data of $10, $11, …, $14 and the data of $1, $2, ..., $5 in order.
XCHG($2, $11, 1)
If $11 = 1234H and $2 = 5678H, $2 = 1234H and $1 = 5678H after executing XCHG command.
MAX
Get Maximum Value
Equation: V1 = MAX(V2, V3)
Get the maximum value from V2 and V3 and store the result in V1.
Example:
$1 = 2
$2 =10
$0 = MAX($1, $2)
The result is $0 = 10
MIN
Get Minimum Value
Equation: V1 = MIN(V2, V3)
Get the minimum value from V2 and V3 and store the result in V1.