DECO
DECO, DECOP, ENCO, ENCOP
DECO instruction decodes (n) number of source and sets the decoded bit(2^n) among the total of bits in the Destination.
ENCO instruction encodes source as 2^n and sets the encoded bit(n) to the Destination (encoding start point is b0).
| |
S | Source |
D | Destination |
n | Number of bit to be decoded or encoded |
Instruction | Device address | No. of Steps | Flag | |||||||||||||||
M | X | Y | K | L | F | T | C | S | Z | D | @D | Int. | Error | Zero | Carry | |||
DECO(P) ENCO(P) | S | o | o | o | o | o | o | o | o | - | o | o | o | o | 4 | o | - | - |
D | o | - | o | o | o | - | o | o | - | o | o | o | - | |||||
n | o | o | o | o | o | o | o | o | - | o | o | o | o |
DECO, DECOP
When enabled, the DECO instruction decodes (n) number of source and sets the decoded bit () among the total of bits in the Destination.
You can choose 1~8 for (n).
If n is 0, there will be no change in the Destination.
Example)
If M00 is ON, DECOP instruction decodes 3 number of source (X00, X01, and X02).
As X00 and X01 are 1, the decimal value is 3 so decoded value is 8.
In 16bit binary, 8 is 4th bit. Therefore, M13 is set to 1.
ENCO, ENCOP
When enabled, the ENCO instruction encodes source as and sets the encoded bit(n) to the Destination (encoding start point is b0).
You can choose 1~8 for (n).
If n is 0, there will be no change in the Destination.
Example)
If X00 is ON, ENCOP instruction encodes.
In 16bit binary, D8 and D9 are set to 1.