Register Logic Commands
Overview
Register commands evaluate and control 16-bit values.
The custom logic editor uses the following register commands:
-
LOAD_K_REG -
LOAD_REG -
LOAD_TMP_REG -
LOAD_NV_REG -
COMP_K_REG -
COMP_REG -
COMP_TMP_REG -
COMP_NV_REG -
AND_K -
AND_REG -
AND_TMP_REG -
AND_NV_REG -
OR_K -
OR_REG -
OR_TMP_REG -
OR_NV_REG -
XOR_K -
XOR_REG -
XOR_TMP_REG -
XOR_NV_REG -
ON_SET_REG -
ON_SET_TMP_REG -
ON_SET_NV_REG
LOAD_K_REG
The LOAD_K_REG command loads a 16-bit constant value into the 16-bit accumulator
in logic memory.
|
Arguments |
Representation |
|---|---|
|
1 |
|
|
Input arguments |
Type |
Range |
Description |
|---|---|---|---|
|
|
|
0–65,535 |
A constant value |
No output arguments.
LOAD_REG
The LOAD_REG command loads a copy of a register into the 16-bit accumulator in
logic memory.
|
Arguments |
Representation |
|---|---|
|
1 |
|
|
Input arguments |
Type |
Range |
Description |
|---|---|---|---|
|
|
|
0–9249 |
The register address |
No output arguments.
LOAD_TMP_REG
The LOAD_TMP_REG command loads a copy of a temporary register
into the 16-bit accumulator in logic memory.
|
Arguments |
Representation |
|---|---|
|
1 |
|
|
Input arguments |
Type |
Range |
Description |
|---|---|---|---|
|
|
|
0–299 |
The temporary register number |
No output arguments.
LOAD_NV_REG
The LOAD_NV_REG command loads a copy of a non-volatile register into the 16-bit
accumulator in logic memory.
|
Arguments |
Representation |
|---|---|
|
1 |
|
|
Input arguments |
Type |
Range |
Description |
|---|---|---|---|
|
|
|
0–63 |
The non-volatile register number |
No output arguments.
COMP_K_REG
The COMP_K_REG command compares the 16-bit accumulator content to the Argument
1 constant value and sets the result of the comparison in one bit
of the Argument 2 temporary register.
|
Arguments |
Representation |
|---|---|
|
2 |
|
|
Input arguments |
Type |
Range/Bit |
Description |
|---|---|---|---|
|
|
|
0–65,535 |
A constant value |
|
Output arguments |
Type |
Range/Bit |
Description |
|---|---|---|---|
|
|
|
Bit1 |
16-bit accumulator < |
|
Bit2 |
16-bit accumulator = |
||
|
Bit3 |
16-bit accumulator > |
COMP_REG
The COMP_REG command compares the 16-bit accumulator content to the content of
the register defined by Argument 1 and sets the result of the comparison
in one bit of the Argument 2 temporary register.
|
Arguments |
Representation |
|---|---|
|
2 |
|
|
Input arguments |
Type |
Range/Bit |
Description |
|---|---|---|---|
|
|
|
0–9249 |
The register address |
|
Output arguments |
Type |
Range/Bit |
Description |
|---|---|---|---|
|
|
|
Bit1 |
16-bit accumulator < |
|
Bit2 |
16-bit accumulator = |
||
|
Bit3 |
16-bit accumulator > |
COMP_TMP_REG
The COMP_TMP_REG command compares the 16-bit accumulator content
to the content of the temporary register defined by Argument 1 and
sets the result of the comparison in one bit of the Argument 2 temporary
register.
|
Arguments |
Representation |
|---|---|
|
2 |
|
|
Input arguments |
Type |
Range/Bit |
Description |
|---|---|---|---|
|
|
|
0–299 |
Temporary register number |
|
Output arguments |
Type |
Range/Bit |
Description |
|---|---|---|---|
|
|
|
Bit1 |
16-bit accumulator < |
|
Bit2 |
16-bit accumulator = |
||
|
Bit3 |
16-bit accumulator > |
COMP_NV_REG
The COMP_NV_REG command compares the 16-bit accumulator content to the content of
the non-volatile register defined by Argument 1 and sets the result
of the comparison in one bit of the Argument 2 temporary register.
|
Arguments |
Representation |
|---|---|
|
2 |
|
|
Input arguments |
Type |
Range/Bit |
Description |
|---|---|---|---|
|
|
|
0–63 |
Non-volatile register number |
|
Output arguments |
Type |
Range/Bit |
Description |
|---|---|---|---|
|
|
|
Bit1 |
16-bit accumulator < |
|
Bit2 |
16-bit accumulator = |
||
|
Bit3 |
16-bit accumulator > |
AND_K
The AND_K command makes a logical AND link
between a 16-bit constant value and the 16-bit accumulator content
in logic memory. The result is saved in the 16-bit accumulator.
The AND process compares each
bit in the 16-bit accumulator with the corresponding bit in the linked
16-bit constant value:
-
If both bits equal 1, the result of the
ANDprocess for that bit number is also 1. -
In all other cases the result of the
ANDprocess for that bit number is 0.
|
Arguments |
Representation |
|---|---|
|
1 |
|
|
Input arguments |
Type |
Range |
Description |
|---|---|---|---|
|
|
|
0–65,535 |
A constant value |
No output arguments.
AND_REG
The AND_REG command makes a logical AND link
between the register value and the 16-bit accumulator content in logic
memory. The result is saved in the 16-bit accumulator.
The AND process compares each bit in the 16-bit
accumulator with the corresponding bit in the linked register:
-
If both bits equal 1, the result of the
ANDprocess for that bit number is also 1. -
In all other cases the result of the
ANDprocess for that bit number is 0.
|
Arguments |
Representation |
|---|---|
|
1 |
|
|
Input arguments |
Type |
Range |
Description |
|---|---|---|---|
|
|
|
0–9249 |
The register address |
No output arguments.
AND_TMP_REG
The AND_TMP_REG command makes a logical AND link
between the temporary register value and the 16-bit accumulator content
in logic memory. The result is saved in the 16-bit accumulator.
The AND process compares each
bit in the 16-bit accumulator with the corresponding bit in the linked
temporary register:
-
If both bits equal 1, the result of the
ANDprocess for that bit number is also 1. -
In all other cases the result of the
ANDprocess for that bit number is 0.
|
Arguments |
Representation |
|---|---|
|
1 |
|
|
Input arguments |
Type |
Range |
Description |
|---|---|---|---|
|
|
|
0–299 |
The temporary register number |
No output arguments.
AND_NV_REG
The AND_NV_REG command makes a logical AND link
between the non-volatile register value and the 16-bit accumulator
content in logic memory. The result is saved in the 16-bit accumulator.
The AND process compares each
bit in the 16-bit accumulator with the corresponding bit in the linked
non-volatile register:
-
If both bits equal 1, the result of the
ANDprocess for that bit number is also 1. -
In all other cases the result of the
ANDprocess for that bit number is 0.
|
Arguments |
Representation |
|---|---|
|
1 |
|
|
Input arguments |
Type |
Range |
Description |
|---|---|---|---|
|
|
|
0–63 |
The non-volatile register number |
No output arguments.
OR_K
The OR_K command makes a logical OR link
between a 16-bit constant value and the 16-bit accumulator content
in logic memory. The result is saved in the 16-bit accumulator.
The OR process compares each bit
in the 16-bit accumulator with the corresponding bit in the linked
16-bit constant value:
-
If any compared bit equals 1, the result of the
ORprocess for that bit number is also 1. -
If all compared bits equal 0, the result of the
ORprocess for that bit number is 0.
|
Arguments |
Representation |
|---|---|
|
1 |
|
|
Input arguments |
Type |
Range |
Description |
|---|---|---|---|
|
|
|
0–65,535 |
A constant value |
No output arguments.
OR_REG
The OR_REG command makes a logical OR link
between the register value and the 16-bit accumulator content in logic
memory. The result is saved in the 16-bit accumulator.
The OR process compares each bit in the 16-bit
accumulator with the corresponding bit in the linked register:
-
If any compared bit equals 1, the result of the
ORprocess for that bit number is also 1. -
If all compared bits equal 0, the result of the
ORprocess for that bit number is 0.
|
Arguments |
Representation |
|---|---|
|
1 |
|
|
Input arguments |
Type |
Range |
Description |
|---|---|---|---|
|
|
|
0–9249 |
The register address |
No output arguments.
OR_TMP_REG
The OR_TMP_REG command makes a logical OR link
between the temporary register value and the 16-bit accumulator content
in logic memory. The result is saved in the 16-bit accumulator.
The OR process compares each bit
in the 16-bit accumulator with the corresponding bit in the linked
temporary register:
-
If any compared bit equals 1, the result of the
ORprocess for that bit number is also 1. -
If all compared bits equal 0, the result of the
ORprocess for that bit number is 0.
|
Arguments |
Representation |
|---|---|
|
1 |
|
|
Input arguments |
Type |
Range |
Description |
|---|---|---|---|
|
|
|
0–299 |
The temporary register number |
No output arguments.
OR_NV_REG
The OR_NV_REG command makes a logical OR link
between the non-volatile register value and the 16-bit accumulator
content in logic memory. The result is saved in the 16-bit accumulator.
The OR process compares each bit
in the 16-bit accumulator with the corresponding bit in the linked
non-volatile register:
-
If any compared bit equals 1, the result of the
ORprocess for that bit number is also 1. -
If all compared bits equal 0, the result of the
ORprocess for that bit number is 0.
|
Arguments |
Representation |
|---|---|
|
1 |
|
|
Input arguments |
Type |
Range |
Description |
|---|---|---|---|
|
|
|
0–63 |
The non-volatile register number |
No output arguments.
XOR_K
The XOR_K command makes a logical exclusive OR link between a 16-bit constant value and the 16-bit accumulator
content in logic memory. The result is saved in the 16-bit accumulator.
The XOR process compares each
bit in the 16-bit accumulator with the corresponding bit in the linked
16-bit constant value and yields these results:
-
If one bit equals 1 and the other equals 0, the result of the
XORprocess is 1. -
In all other cases, the result of the
XORprocess is 0.
|
Arguments |
Representation |
|---|---|
|
1 |
|
|
Input arguments |
Type |
Range |
Description |
|---|---|---|---|
|
|
|
0–65,535 |
A constant value |
No output arguments.
XOR_REG
The XOR_REG command makes a logical exclusive OR link between the register value and the 16-bit accumulator content
in logic memory. The result is saved in the 16-bit accumulator.
The XOR process compares each
bit in the 16-bit accumulator with the corresponding bit in the linked
register and yields these results:
-
If one bit equals 1 and the other equals 0, the result of the
XORprocess is 1. -
In all other cases, the result of the
XORprocess is 0.
|
Arguments |
Representation |
|---|---|
|
1 |
|
|
Input arguments |
Type |
Range |
Description |
|---|---|---|---|
|
|
|
0–9249 |
The register address |
No output arguments.
XOR_TMP_REG
The XOR_TMP_REG command makes a logical exclusive OR link between the temporary register value and the 16-bit accumulator
content in logic memory. The result is saved in the 16-bit accumulator.
The XOR process compares each
bit in the 16-bit accumulator with the corresponding bit in the linked
temporary register and yields these results:
-
If one bit equals 1 and the other equals 0, the result of the
XORprocess is 1. -
In all other cases, the result of the
XORprocess is 0.
|
Arguments |
Representation |
|---|---|
|
1 |
|
|
Input arguments |
Type |
Range |
Description |
|---|---|---|---|
|
|
|
0–299 |
The temporary register number |
No output arguments.
XOR_NV_REG
The XOR_NV_REG command makes a logical exclusive OR link between the non-volatile register value and the 16-bit accumulator
content in logic memory. The result is saved in the 16-bit accumulator.
The XOR process compares each
bit in the 16-bit accumulator with the corresponding bit in the linked
non-volatile register and yields these results:
-
If one bit equals 1 and the other equals 0, the result of the
XORprocess is 1. -
In all other cases, the result of the
XORprocess is 0.
|
Arguments |
Representation |
|---|---|
|
1 |
|
|
Input arguments |
Type |
Range |
Description |
|---|---|---|---|
|
|
|
0–63 |
The non-volatile register number |
No output arguments.
ON_SET_REG
The ON_SET_REG command copies the value of the 16-bit accumulator to a specified
register on a rising edge of the 1-bit accumulator.
|
Arguments |
Representation |
|---|---|
|
2 |
|
No input argument.
|
Output arguments |
Type |
Range/Bit |
Description |
|---|---|---|---|
|
|
|
0–9249 |
The register address |
|
|
|
Bit3 |
1-bit accumulator history bit |
ON_SET_TMP_REG
The ON_SET_TMP_REG command copies the value of the 16-bit accumulator
to a specified temporary register on a rising edge of the 1-bit accumulator.
|
Arguments |
Representation |
|---|---|
|
2 |
|
No input argument.
|
Output arguments |
Type |
Range/Bit |
Description |
|---|---|---|---|
|
|
|
0–299 |
The temporary register number |
|
|
|
Bit3 |
1-bit accumulator history bit |
ON_SET_NV_REG
The ON_SET_NV_REG command copies the value of the 16-bit accumulator
to a specified non-volatile register on a rising edge of the 1-bit
accumulator.
|
Arguments |
Representation |
|---|---|
|
1 |
|
No input argument.
|
Output arguments |
Type |
Range/Bit |
Description |
|---|---|---|---|
|
|
|
0–63 |
The non-volatile register number |
|
|
|
Bit3 |
1-bit accumulator history bit |