Mitsubishi — 5.6 Descriptions of the Applied Instructions

Chapter 5 Applied Instructions Explanation  S : Source device  When the 16-bit instruction is executed, the high eight bits in S are interchanged with the low eight bits in S .  When the 32-bit instruction is executed, the high eight bits in S are interchanged with the low eight bits in S , and the high eight bits in S +1 are interchanged with the low eight bits in S +1.  Generally, the pulse instructions SWAPP and DSWAPP are used.  When X0.0 is ON, the high byte in D0 is interchanged with the low byte in D0.

Example 1 X0.0 D0  When X0.0 is ON, the high eight bits in D11 are interchanged with the low eight bits in D11, and the high eight bits in D10 are interchanged with the low eight bits in D10. Example 2 X0.0 D11 D10 5-115 API Instruction code Operand Function Interchanging the high byte in a device with 152 D SWAP P S the low byte in the device Device Xn.n Yn.n M S K 16# F KnM KnS D W T C V Z S         Pulse instruction 16-bit instruction (3 steps) 32-bit instruction (3 step s)    SWAPP D0 High eight bits Low eight bits DSWAP D10 High eight bits Low eight bits High eight bits Low eight bits