103
Copy bigger value
The function verifies which value, X or Y is higher and copies the higher one.
If get X > get Y than
store result = get X
If get X <= get Y than
store result = get Y
Copy lower value
The function verifies which value, X or Y is lower and copies the lower one.
If get X < get Y than
store result = get X
If get X >= get Y than
store result = get Y
Search for max value in table
The function scans the table beginning with register (get X) for length defined by register
(get Y). The highest value found in search is written to (store result) register.
Both 16 and 32 bit registers can be searched. If the value found exceeds the range of
(store result) register, the error flag is set.
Example 1:
Table from XREG1 = 1, 5, 0, 100, 23, 340, 1, 25, 340, 5, 560, 23
get X (register) = XREG1
get Y (register) = 10
store result (register) = REG1
The result is REG1 = 340
Example 2:
Table from DREG1 = 1, 5, 0, -12000, 23, 340, 1, 25, 340, 5, 65000, 23, 100000, -65000
get X (register) = DREG1
get Y (register) = 12
store result (register) = REG1
The result is REG1 = 65000.
If register had the value of 13 for (get Y), the function would have returned REG1 value
equal to 100000.
Search for min. value in table
The function scans the table beginning with register (get X) for length defined by register
(get Y). The lowest value found in the search is written to (store result) register.
Both 16 and 32 bit registers can be searched. If the value found exceeds the range of
(store result) register, the error flag is set.
Example 1:
Table from XREG1 = 1, 5, 6, 100, 23, 340, 1, 25, 340, 5, 560, 0
get X (register) = XREG1
get Y (register) = 10
store result (register) = REG1
The result is REG1 = 1
Example 2:
Table from DREG1 = 1, 5, 0, -12000, 23, 340
get X (register) = DREG1
get Y (register) = 4
store result (register) = REG1
The result is since REG1 cannot hold the value of -12000.
Содержание MT-101
Страница 1: ......
Страница 129: ...126 11 7 Drawings and dimensions ...