MIT PDP-10 'Info' file converted to Hypertext 'html' format by Henry Baker
Logical Testing and Modification.
The Test instructions are for testing and modifying bits in an
accumulator. There are 64 test instructions. Each one's name is
T followed by three modifiers.
|R right half immediate
Test accumulator |L left half immediate
|D direct mask
|S swapped mask
|N no modification
|Z zero selected bits
|O set selected bits to One
|C complement selected bits
| never skip
|N skip unless all selected bits are zero
|E skip if all selected bits are zero
|A skip always
The test operation considers two 36 bit quantities. One of these is
the contents of the selected AC. The other quantity, called the
mask, depends on the first modifier letter. For R the mask is
<0,,E>; for L it is <E,,0>. For D the mask is C(E), and for S the
mask is CS(E), the swapped contents of E.
Note that the skip condition is determined on the basis of the
contents of the AC before it is modified.
- If the skip condition N is specified, then the test instruction will
skip if the AND of the mask and the AC operand is Not equal to zero.
- If the skip condition E is specified, then the test instruction will
skip if the AND of the mask and the AC operand is Equal to zero.
- If the modification code Z appears then bits that are one in mask are
made zero in the AC.
- If the modification code O appears then bits that are one in mask are
made one in the AC.
- If the modification code C appears then bits that are one in mask are
complemented in the AC.
The principle use for the Test instructions is in testing and
modifying single bit flags that are kept in an accumulator.
TRON 5,FOOFLG ;Where FOOGLF has the value 200
This turns on the 200 bit in the right half of accumulator 5,
and skips if the bit was already on.