Programmer (HHP) User guide
11
Chapter
11–1
Using 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
• typical execution time for the instruction
• how to use the instruction
• how to enter the instruction
In addition, the last section contains an application example for a paper
drilling machine that shows the data handling instructions in use.
Data Handling Instructions
Mnemonic
Function
Code
Name Purpose Page
TOD 100
Convert to BCD Converts the integer source value to BCD format and stores it in the destination. 11–2
FRD 101
Convert from BCD Converts the BCD source value to an integer and stores it in the destination. 11–3
DCD 102
Decode 4 to 1 of
16
Decodes a 4-bit value (0 to 15), turning on the corresponding bit in the 16-bit
destination.
11–7
ENC 103
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.
11–8
COP
FLL
104
105
Copy File
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.
11–10
MOV 106
Move Moves the source value to the destination. 11–15
MVM 107
Masked Move Moves data from a source location to a selected portion of the destination. 11–16
AND 108
And
Performs a bitwise AND operation. (This differs from the AND input instruction
discussed in chapter 7.)
11–18
OR 109
Or
Performs a bitwise inclusive OR operation. (This differs from the OR input
instruction discussed in chapter 7.)
11–19
XOR 110
Exclusive Or
Performs a bitwise Exclusive OR operation. 11–20
NOT 111
Not Performs a NOT operation. 11–21
NEG 112
Negate Changes the sign of the source and stores it in the destination. 11–22
FFL
FFU
113
114
FIFO Load
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-true
transitions. The first word loaded is the first to be unloaded.
11–25
LFL
LFU
115
116
LIFO Load
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.
11–28