Test

The Test microinstruction allows jumping to other microinstructions within the current fetch or execute sequence. The test microinstruction compares the value in a part of a register with a specific value. If the comparison succeeds, then a specified number of successive microinstructions in the current fetch or execute sequence are skipped over.

Parameters:

Comparison: the type of comparison be done: LT means "less than"
LE means "less than or equal to"
EQ means "equal to"
NE means "not equal to"
GE means "greater than or equal to"
GT means "greater than"

Comparison value: the integer to be compared with the part of the register. The Comparison value must be given in base-10 notation.

Omission: an integer (positive, negative or zero) indicating the size of the relative jump. For example, if omission = 0, then no jump is performed. That is, the microinstruction following the test microinstruction is the next microinstruction to be executed, as normally happens with other microinstructions. If omission = 1, then the microinstruction immediately following the test microinstruction is skipped over if the comparison succeeds. If omission = -1 and the comparison succeeds, then the test microinstruction is repeatedly executed in an infinite loop.

Register: the register whose value is to be tested.

Start: an integer indicating the leftmost bit to be tested in the register. The value must be an integer between 0 and one less than the width of the register.

Number of bits: a non-negative integer indicating the number of bits to be tested. The sum of the start and the number of bits must be at most the width of the register.

N.B. When you test a register or part of a register against a value, you can consider the part of the register to designate a two's-complement integer value or an unsigned integer value. For example, if you are testing to see whether two bits are "11", you can either test whether the value stored in the two bits is -1 or test whether the value is 3. Similarly, to test whether one bit of a register is a "1", you can test to see whether that part of the register contains the value 1 or -1.