3 . I n s t r u c t i o n S e t
M N 0 5 0 0 3 0 0 3 E F o r m o r e i n f o r m a t i o n v i s i t :
w w w. e a t o n . c o m
3 - 3 3 7
API Mnemonic
Operands
Function
147
D SWAP P
S
Swap High/Low Byte
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H KnX KnY KnM KnS T
C
D
E
F
S
*
*
*
*
*
*
*
*
SWAP, SWAPP: 3 steps
DSWAP, DSWAPP: 5
steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32
16
P
32
16
P
32
16
P
32 16
P
32
16
P
Operands:
S
: Address of the value to be byte swapped.
Description:
1.
When used as a 16-bit instruction, swap high/low bytes.
2.
When used as a 32-bit instruction, swap high/low bytes of each word separately.
3.
This instruction works best using the pulse option (SWAPP, DSWAPP).
4. If
operand
D
is used with index register F, it is only available as a 16-bit instruction.
Program Example 1:
When X0=ON, swap the high/low bytes of D0.
D0
SWAPP
X0
D0
High Byte
Low Byte
Program Example 2:
When X0=ON, swap the high/low bytes of word D10 and of word D11.
D10
DSWAP
X0
D11
High By te
Low Byte
D 0
1
High Byte
Low Byte
Содержание ELC-PB
Страница 1: ......
Страница 5: ...For more information visit www eaton com MN05003003E iv...
Страница 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Страница 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Страница 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Страница 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...