Shift Left Accumulator/No-Operation
Organizational graphic tag to help group instructions

Mnemonic

 SLA
 NOP

Short and Long format of instruction



Description

Contents of the accumulator are shifted left, a bit at a time. Each bit value shifted out (from accumulator position 0) is shifted into the carry indicator. Low-order bits shifted into accumulator-position 15 (and then to the left) are always zeros. An example of a left shift of two positions is:

Shift Left Accumulator/No Operation operation

The number of positions shifted is specified by a shift count. Location of the shift count is determined by the T bits in the instruction:

T Bits (6 and 7)   Shift Count Location
00   Low-order six bits of displacement (in the shift instruction)
01   Low-order six bits in index-register 1
10   Low-order six bits in index-register 2
11   Low-order six bits in index-register 3

A value must be put into the shift-count location before the operation is started. The operation is ended when the specified number of shifts have been performed. The shift count, however, need be set up only once. After the operation is ended, the original shift count (for example, a count in index-register 1) is the same as its initial value. (Decrementing of the count is performed in separate circuits.)

The maximum shift count that can be specified is 63 (111111 in binary). A left-shift of sixteen, however, puts zeros in all positions of the accumulator. In this case, the carry indicator, at the end of the operation, is at the value that accumulator-bit 15 had at the start of the operation.

A shift count of zero (000000 in binary) causes this instruction to perform as a no-operation (NOP): contents of the accumulator remain unchanged.

Core storage is not addressed during execution of the shift-left-accumulator instruction.


Indicators: Each bit value that is shifted out of accumulator-bit-position 0 is placed in the carry indicator. The carry indicator holds only one bit. Consequently, the carry indicator, at the end of the operation, is at the value of the last bit shifted out. If any shifting is to be performed, the carry indicator need not be program-reset before the shift operation because the first left-shift sets or resets the carry indicator to the first bit value shifted out. The carry indicator is not changed if the initial shift count is zero.

The overflow indicator is not affected by a shift-left-accumulator operation.


Examples

Shift Left Accumulator/No Operation

Assembler Language Coding Hexadecimal Value Description of Instruction
Label   Operation   F T    
21 25
 
27 30
  32 33   35..40..
    SLA         DISP 10*X Contents of A shift left the number of shift counts in DISP
    SLA     1     1100 Contents of A shift left the number of shift counts in XR1
    SLA     2     1200 Contents of A shift left the number of shift counts in XR2
    SLA     3     1300 Contents of A shift left the number of shift counts in XR3
    NOP         00 1000 Perform no operation
* This hexadecimal digit can be 0, 1, 2, or 3 depending upon the desired shift count.

But wait, there's MORE...

Valid HTML 4.01 Transitional