Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data manipulation Instructions

Similar presentations


Presentation on theme: "Data manipulation Instructions"— Presentation transcript:

1 Data manipulation Instructions
EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ

2 Equal (EQU): Use the EQU instruction to test whether two values are equal. If source A and Source B are equal, the instruction is logically true. If these values are not equal, the instruction is logically false. Source A must be an address. Source B can either be a program constant of a address. Negative integers are stored in two’s complementary form.

3 Not Equal (NEQ): Use the NEQ instruction to test whether two values are not equal. If source A and Source B are not equal, the instruction is logically true. If the two values are equal, the instruction is logically false. Source A must be an address. Source B can be either a program constant or an address. Negative integers are stored in two’s complementary form.

4 Equal to (EQU) Description: Use the EQU instruction to test whether two values are equal. Source A and Source B can either be values or addresses that contain values.

5 Greater than or Equal to (GEQ)
Description: Use the GEQ instruction to test whether one value (Source A) is greater than or equal to another value (Source B). Source A and Source B can be values or addresses that contain values.

6 Greater Than or Equal (GEQ):
Use the GEQ instruction to test whether one value (source A) is greater than or equal to another (source B). If the value at source A is greater than or equal to the value at source B, the instruction is logically true. If the value at source A is less than the value at source B, the instruction is logically false. Source A must be an address. Source B can either be a program constant or an address. Negative integers are stored in two’s complementary form.

7 Greater than (GRT) Description: Use the GRT instruction to test whether one value (Source A) is greater than another value (Source B). Source A and Source B can either be values or addresses that contain values.

8 Greater Than (GRT): Use the GRT instruction to test whether one value (source A) is greater than another (source B). If the value at source A is greater than the value at source B, the instruction is logically true. If the value at source A is less than or equal to the value at source B, the instruction is logically false. Source A must be an address. Source B can either be a program constant or an address. Negative integers are stored in two’s complementary form.

9 Less than or Equal to (LEQ)
Description: Use the LEQ instruction to test whether one value (Source A) is less than or equal to another value (Source B). Source A and Source B can either be values or addresses that contain values.

10 Less Than or Equal (LEQ):
Use the LEQ instruction to test whether one value (source A) is less than or equal to another (source B). If the value at source A is less than or equal to the value at source B, the instruction is logically true. If the value at source A is greater than the value at source B, the instruction is logically false. Source A must be an address. Source B can either be a program constant or an address. Negative integers are stored in two’s complementary form.

11 Less than (LES) Description: Use the LES instruction to test whether one value (Source A) is less than another value (Source B). Source A and Source B can be values or addresses that contain values.

12 Less Than (LES): Use the LES instruction to test whether one value (source A) is less than another (source B). If source A is less than the value at source B the instruction is logically true. If the value at source A is greater than or equal to the value at source B, the instruction is logically false. Source A must be an address. Source B can either be a program constant or an address. Negative integers are stored in two’s complementary.

13 Limit Test (LIM) Description: The LIM instruction is an input instruction that tests for values inside of or outside of a specified range. The instruction is false until it detects that the test value is within certain limits. Then the instruction goes true. When the instruction detects that the test value goes outside certain limits, it goes false. You can use the LIM instruction to test if an analog input value is within specified limits.

14 Entering Parameters: The low limit, test, and high limit values can be word addresses or constants, restricted to the following combinations: If the test parameter is a program constant, both the Low Limit and High Limit parameters must be word addresses. If the test parameter is a word address, the Low Limit and High Limit parameters can be either a program constant or a word address. Limit Test (LIM): Use the LIM instruction to test for values within or outside a specified range, depending on how you set the limits.

15 Entering Parameters: To program the LIM instruction, you must provide the processor with the following:

16

17 Mask Compare Equal to (MEQ)
Description: The MEQ instruction is an output instruction that compares a value from a source address with data at a compare address, and allows portions of the data to be masked. If the data at the source address matches the data at the compare address bit-by-bit (less masked bits), the instruction is true. The instruction goes false as soon as it detects a mismatch. You can use the MEQ instruction to extract (for comparison) bit data such as status or control bits from an element that contains bit and word data.

18 Entering Parameters: To program this instruction, you must provide the processor with the following:

19

20 Masked Comparison for Equal (MEQ):
Use the MEQ instruction to compare data at a source address with data at a compare address. Use of this instruction allows portions of the data to be masked by a separate word.

21 Not Equal to (NEQ): Description: Use the NEQ instruction to test whether two values are not equal. Source A and Source B can be values or addresses.


Download ppt "Data manipulation Instructions"

Similar presentations


Ads by Google