Next: TM Test under Up: Insert Character Previous: Subtract Logical

Test Under Mask

The state of the first-operand bits selected by a mask is used to set the condition code.

The byte of immediate data, I3, is used as an eight-bit mask. The bits of the mask are made to correspond one for one with the bits of the character in storage specified by the first-operand address.

A mask bit of one indicates that the storage bit is to be tested. When the mask bit is zero, the storage bit is ignored. When all storage bits thus selected are zero, the condition code is made 0. The code is also made 0 when the mask is all zeros. When the selected bits are all ones, the code is made 3 ; otherwise , the code is made 1. The character in storage is not changed.

Access Exceptions associated with the storage operand are recognized f or one byte , even when the mask is all zeros.

Resulting Condition Code:
0 ~ Selected bits all zeros ; or the mask is all zeros
1 ~ Selected bits mixed zeros and ones
2 ~ -
3 ~ Selected bits all ones

Program Exceptions:
Access (fetch, operand 1 )



Next: TM Test under Up: Insert Character Previous: Subtract Logical


A.Daviel,TRIUMF