Table Data Processing Instructions; Swap - Omron SYSMAC CP Series Instruction & Reference Manual

Cpu unit
Hide thumbs Also See for SYSMAC CP Series:
Table of Contents

Advertisement

Table Data Processing Instructions

SWAP

Instruction
SWAP BYTES
Symbol
Applicable Program Areas
Area
Step program areas
Usage
OK
Operands
Operand
N
Number of words
R1
First word in range
N: Number of words
N specifies the number of words in the range and must be 0001 to FFFF hexadecimal (or &1 to
&65,535).
R1: First word in range
Leftmost byte Rightmost byte
15
R1
to
to
R1+(N–1)
Note R1 and R1+(N-1) must be in the same data area.
Operand Specifications
Word addresses
Area
CIO
WR
HR
N
OK
OK
OK
R1
Flags
Name
Error Flag
CP1E CPU Unit Instructions Reference Manual(W483)
Mnemonic
Variations
SWAP
@SWAP
Description
8 7
0
to
AR
T
C
DM
OK
OK
OK
OK
Label
P_ER
• ON if the N is 0.
• OFF in all other cases.
Function
code
Switches the leftmost and rightmost bytes in all of
637
the words in the range.
SWAP
SWAP(637)
N
N: Number of words
R1
R1: First word in range
Subroutines
OK
Data type
UINT
UINT
Indirect DM addresses
Constants
@DM
*DM
OK
OK
OK
---
Operation
2 Instructions
Function
Interrupt tasks
OK
Size
1
Variable
CF
Pulse bits
TR bits
---
---
---
2-253
2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents