The purpose of each shift instruction is to shift an operand, bit by bit, to the right or to the left. Direction of shift (left or right) is dependent upon the specific instruction. The operand to be shifted must first be loaded into the accumulator (or accumulator and accumulator extension, depending upon which shift instruction is to be executed). All shift instructions are in the short format only; there are no long-format shift instructions.
The manner of shifting is dependent upon the specific shift instruction. In shift-left operations, zeros are shifted into low-order vacated positions. For example:
In shift right operations, bits that are shifted in can be:
Depending upon the instruction being executed, shift operations can be ended in one or both of two ways:
Refer to the individual descriptions for information about how a particular shift operation is ended.
But wait, there's MORE...