Automationdirect.com DirectLOGIC DL205 Series User Manual page 386

Table of Contents

Advertisement

Table Shift Left (TSHFL)
The Table Shift Left instruction shifts all the bits in a V-memory
230
table to the left a specified number of bit positions.
240
250-1
260
Table Shift Right (TSHFR)
The Table Shift Right instruction shifts all the bits in a V-memory
table to the right a specified number of bit positions.
230
240
250-1
The following description applies to both the Table Shift Left and Table Shift Right
260
instructions. A table is a range of V-memory locations. The Table Shift Left and Table Shift
Right instructions shift bits serially throughout the entire table. Bits are shifted out the end of
one word and into the opposite end of an adjacent word. At the ends of the table, bits are
either discarded, or zeros are shifted into the table. The example tables below are arbitrarily
four words long.
DS
Used
HPP Used
Step 1: Load the length of the table (number of V-memory locations) into the first level of the
accumulator stack. This parameter must be a HEX value, 0 to FF.
Step 2: Load the starting V-memory location for the table into the accumulator. This parameter must
be a HEX value. You can use the LDA instruction to convert an octal address to hex.
Step 3: Insert the Table Shift Left or Table Shift Right instruction. This specifies the number of bit
positions you wish to shift the entire table. The number of bit positions must be in octal.
Helpful hint: — Remember that each V-memory location contains 16 bits. The bits of the
first word of the table are numbered from 0 to 17 octal. If you want to shift the entire table
by 20 bits, that is 24 octal. Flag 53 will be set if the number of bits to be shifted is larger than
the total bits contained within the table. Flag 67 will be set if the last bit shifted (just before it
is discarded) is a "1".
Table Shift Left
V - xxxx
V - xxxx + 1
V - xxxx + 2
Discard Bits
Operand Data Type
V-memory
Chapter 5: Standard RLL Instructions - Table
Table Shift Right
Shift in zeros
Shift in zeros
DL260 Range
aaa
V
All (See page 3 - 56)
DL205 User Manual, 4th Edition, Rev. B
TSHFL
Vaaa
TSHFR
Vaaa
Discard Bits
10
11
12
13
14
5–169
1
2
3
4
5
6
7
8
9
A
B
C
D

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?

Table of Contents

Save PDF