Installation manual

1 Publication 1747-RM001G-EN-P - November 2008
Chapter
5
Data Handling Instructions
This chapter contains general information about the data handling instructions
and explains how they function in your application program. Each of the
instructions includes information on:
what the instruction symbol looks like.
how to use the instruction.
Table 5.1 Data Handling Instructions
Instruction Purpose Page
Mnemonic Name
TOD Convert to BCD Converts the integer source value to BCD format and stores it in the
destination.
5-2
FRD Convert from BCD Converts the BCD source value to an integer and stores it in the
destination.
5-5
DEG Convert from Radians to
Degrees
Converts radians (source) to degrees and stores the result in the
destination.
5-8
RAD Convert from Degrees to
Radians
Converts degrees (source) to radians and stores the result in the
destination.
5-9
DCD Decode 4 to 1 of 16 Decodes a 4-bit value (0 to 15), turning on the corresponding bit in the
16-bit destination.
5-10
ENC Encode 1 of 16 to 4 Encodes a 16-bit source to a 4-bit value. Searches the source from the
lowest to the highest bit, and looks for the first set bit. The corresponding
bit position is written to the destination as an integer.
5-11
COP and FLL
Copy File and
Fill File
The COP instruction copies data from the source file to the destination file
The FLL instruction loads a source value into each position in the
destination file.
5-13
MOV Move Moves the source value to the destination. 5-17
MVM Masked Move Moves data from a source location to a selected portion of the
destination.
5-18
AND And Performs a bitwise AND operation. 5-20
OR Or Performs a bitwise inclusive OR operation. 5-21
XOR Exclusive Or Performs a bitwise exclusive OR operation. 5-22
NOT Not Performs a NOT operation. 5-23
NEG Negate Changes the sign of the source and stores it in the destination. 5-24
FFL and FFU
FIFO Load and
FIFO Unload
The FFL instruction loads a word into a FIFO stack on successive
false-to-true transitions. The FFU unloads a word from the stack on
successive false- to-true transitions. The first word loaded is the first to be
unloaded.
5-26
LFL and LFU
LIFO Load and
LIFO Unload
The LFL instruction loads a word into a LIFO stack on successive
false-to-true transitions. The LFU unloads a word from the stack on
successive false-to-true transitions. The last word loaded is the first to be
unloaded.
5-28