MIT PDP-10 'Info' file converted to Hypertext 'html' format by Henry Baker

Previous Up Next

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.

The principle use for the Test instructions is in testing and modifying single bit flags that are kept in an accumulator.

Example:

        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.