Delta Electronics DUP-B Series User Manual page 358

Human machine interface
Table of Contents

Advertisement

SWAP (Swap High-Byte and Low-Byte Data)
Equation
SWAP (Var1, Var2, Var3)
Explanation
Swap high-byte and low-byte of Var3 number of words starting at Var2 and save it in
memory starting at Var1.
Remark
The calculation result can be stored as unsigned WORD.
Var1 and Var2 can be internal memory only. Var3 can be internal memory or
constant.
Example
Swap the high-byte and low-byte of $11 and store the result in $2 (this is an
operation of unsigned 16-bit data).
If $11 = 1234H, after executing SWAP command, $2 = 3412H.
XCHG (Exchange Data)
Equation
XCHG (Var1, Var2, Var3)
Explanation
Exchange Var3 number of words of data starting at Var2 with the same number of
words starting at Var1.
Remark
The calculation result can be stored as unsigned WORD.
Var1 and Var2 can be internal memory only. Var3 can be internal memory or
constant.
Revision May, 2010
Chapter 3 Creating and Editing Screens
3-337

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dop-b series

Table of Contents