1. List minimum value MIN/MIND/MINF

1. List minimum value MIN/MIND/MINF

1.1. Instruction Description

The minimum value of a single word list (MIN) is searched for in the list, the minimum value is returned in the MIN register, the first matching position and the total number of matches are returned in the RES register. The double character list lookup (MIND) is for double characters, and the floating-point list lookup (MINF) is for floating points. The index and quantity returned are always two single characters.

For example, MIN D10 D20 D120 K6, search for the minimum value from D10 to D15, store the search results in D20, and store the hit position and number of hits in D120 and D121.

List minimum

图1 List minimum

1.2. The valid operands of the instruction

1.2.1. Minimum value of single word list(MIN)

Input/Output Data Type operand Description
T 16 bit integer D List
MIN 16 bit integer D/CV/TV/AO/V/Z, bit composite word (Y/M/C/T/S), local variable (LW) minimum
RES 16 bit integer D/CV/TV/AO/V/Z, bit composite word (Y/M/C/T/S), local variable (LW) result
N 16 bit integer D/CV/TV/AI/AO/K/H/V/Z/FD, bit composite word (X/Y/M/C/T/S), local variable (LW) length

1.2.2. Minimum value of two word list(MIND)

Input/Output Data Type operand Description
T 32-bit integer D List
MIN 32-bit integer D/CV, bit composite word (Y/M/C/T/S), local variable (LD) minimum
RES 16 bit integer D/CV/TV/AO/V/Z, bit composite word (Y/M/C/T/S), local variable (LW) result
N 16 bit integer D/CV/TV/AI/AO/K/H/V/Z/FD, bit composite word (X/Y/M/C/T/S), local variable (LW) length

1.2.3. Minimum Floating List(MINF)

Input/Output Data Type operand Description
T 32-bit Real Number D List
MIN 32-bit real number D, local variable (LF) minimum
RES 16 bit integer D/CV/TV/AO/V/Z, bit composite word (Y/M/C/T/S), local variable (LW) result
N 16 bit integer D/CV/TV/AI/AO/K/H/V/Z/FD, bit composite word (X/Y/M/C/T/S), local variable (LW) length

1.3. Example

command table:

NETWORK 000

LDP X000

MIN D10 D20 D120 K6 // Find the minimum value between D10 and D15, return the minimum value to D20, hit position to D120, and hit count to D121.

MIN

图2 MIN