xiaomi — SWAP

Appendix D Use of Application Instructions | DOP-EXIO Series Operands: S : Device for swapping 8 high/low byte. Explanations: 1. As 16-bit instruction: the contents in the 8 high bytes and 8 low bytes are swapped. 2. As 32-bit instruction: the 8 high bytes and 8 low bytes in the two registers swap with each other respectively. Program Example 1: When X0 = On, the high 8 bytes and low 8 bytes in D0 will swap with each other. X0 D0 Program Example 2: When X0 = On, the high 8 bytes and low 8 bytes in D11 will swap with each other and the high 8 bytes and low 8 bytes in D10 will swap with each other. X0 D-70 Revision March, 2008, Doc. Name:

2007PDD23000014 Mnemonic Operands Function SWAP D S Byte Swap Bit Devices Word Devices 16-bit instruction(5 Steps) Continuous SWAP execution 32-bit instruction (9 Steps) Continuous DSWAP execution y Flags: None X Y M S K H KnX KnY KnM KnS T C D E F S ¼ ¼ ¼ ¼ ¼ ¼ ¼ ¼ y Note: 1. If D is used in device F, only 16-bit instruction is applicable. WAPP D0 High Byte Low Byte DSWAPP D10