1. Cyclic shift instructions
Right and left circular shift (d) ROR (p) and (d) ROL (p) numbered FNC30 and FNC31 respectively. Implementation of the directive, all the data to the right (or left) cycle n, and finally moved out one at a time into the carry flag in M8022, as shown in Figure 1.
2. Circular shift with carry instruction
Loop right and left shift with carry instruction (d) RCR (p) and (d) the RCL (p) numbered FNC32 and FNC33 respectively. Implementation of these two directives, all data together with the decimal (M8022) turn right (or left) to move n
When you use the ROR/ROL/RCR/RCL directive should be noted:
1) goal KnY,KnM,KnS,T,C,D,V the operands desirability and z-target combinations of components finger positioning components only in K4 (16-bit) and K8 (32-bit instruction) is effective.
2) 16-bit instructions step 5 program, 32-bit instructions step 9 program.
3) continuous instruction execution, circular shift operations performed once per cycle.
3. Right and left command
Right, left, orders SFTR (p) and the SFTL (p) numbered FNC34 and FNC35 respectively. Them the status of the element in the group to the right (or left) to move. N1 refers to the length of the positioned element, N2 specifies the number of shift, N1 and N2, and vary and range from models of the relationship, typically N2 ≤ N1 ≤ 1024
Right and left instructions should be used note:
1) source operand is either x, y, m, s, target operand y, m, and s.
2) only 16-bit operation, 9 programs.
4. Words to the right and left command
Words to the right and left instructions WSFR (p) and the WSFL (p) directive number FNC36 and FNC37, respectively. Word shift right and left instructions to the Word as a unit, process similar to the shift of its work was N1 or N2 characters to the left to the right.
Use the words to the right and the left instructions should be noted:
1) source operand desirable KnX, KnY, KnM, KnS, t, c, and d, the target operand desirable KnY, KnM, KnS, t, c, and d.
2) shift only 16-bit operation, take up program step 9.
3) relationship between N1 and N2 N2 N1 ≤ 512 or less.
5. the first–in–first–out writing and reading instruction
First–in–first–out written instructions and first–in–first–out write read command SFWR (p) and SFRD (p) numbered FNC38 and FNC39 respectively.
First into first out writes instruction SFWR of using as Figure 4 by shows, dang X0 by OFF into ON Shi, SFWR implementation, D0 in the of data writes D2, and D1 into pointer, its value for 1 (D1 must first clear 0); Dang X0 again by OFF into ON Shi, D0 in the of data writes D3,D1 into 2, followed by analogy, D0 in the of data followed by writes data registers. Into the D0, D2 from the right of the data in order, writes the number of the source data in D1, when you reach n-1 of D1 does not do this, and carry flag M8022 set to 1.
SFRD FIFO reading instructions, when X0 from OFF to ON, and data sent to the D20 D2 and D1 of the pointer value 1,D3~D9 move one word to the right of the data, the data is always read out from D2, D1 pointer to 0 o’clock, no longer do this and M8020 set to 1.
SFWR and SFRD instruction should be used note:
1) target operand KnY, KnM, KnS, t, c, and d, fuck all data source types.
2), instruction only 16-bit operation, step 7 procedures.




