Delta AH500 — 6.10.2 Explanation of Rotation Instructions

Chapter 6 Applied Instructions API 0904 Symbol: S : Matrix source Word D : Operation result Word n : Length of the array Word Explanation: 1. The values of the n rows of bits in S are rotated to the right or to the left. When SM616 is OFF, the values of the bits are rotated to the left. When SM616 is ON, the values of the bits are rotated to the right. The vacancy resulting from the rotation is filled by the value of the bit rotated last, and the operation result is stored in D . The value of the bit rotated last not only fills the vacancy, but also is transmitted to the carry flag SM614. 2. The operand n should be within the range between 1 and 256. 3.

Generally, the pulse instruction MBRP is used. Example 1: When X0.0 is ON, SM616 is OFF. The values of the bits in the 16-bit registers D0~D2 are rotated to the left, and the operation result is stored in the 16-bit registers D20~D22. The value of the bit marked ※ is transmitted to the carry flag SM614. 6-225 Instruction code Operand Function MBR P S, D, n Rotating the matrix bits Device X Y M S T C HC D L SM SR E PR K 16# “$” DF S         D        n           Pulse instruction 16-bit instruction (7 steps) 32-bit instruction AH500 AH500 -