bound

186 and later

Check Array Index against Bounds

bound reg16, mem | bound reg32, mem

BOUND expects its second operand to point to an area of memory containing two signed values of the same size as its first operand (i.e. two words for the 16-bit form; two doublewords for the 32-bit form). It performs two signed comparisons: if the value in the register passed as its first operand is less than the first of the in-memory values, or is greater than or equal to the second, it throws a BR exception. Otherwise, it does nothing.

No example here: this instruction either stops the program, or belongs to a mode this emulator does not run.

Forms

Every form of bound the assembler accepts, from NASM's own instruction table. The second column is the processor that introduced the form; a badge marks a form that needs an extension, that is lockable, or that long mode dropped.

FormSinceNotes
bound reg16, mem186nolong
bound reg32, mem386nolong