From Intellivision Wiki
Jump to: navigation, search
Instruction NameShift Logical Right
CP1610 Clock Cycles6 or 8
Opcode Range$0060-$0067
Input FlagsNone
Output FlagsSign Flag, Zero Flag

The Shift Logical Right (SLR) instruction shifts the bits in the specified register either one (1) or two (2) bits to the right, stores the result back to the specified register, and sets or clears the Sign Flag and Zero Flag according to the new value in the register. The rightmost one or two bits are discarded and the leftmost one or two bits are set to zero(0). The number of clock cycles used depends on the number of shifts specified. One shift will use 6 clock cycles and two shifts will use 8 clock cycles.

Slr diagram.png

The opcode format is as follows.

where: s indicates the number of places to shift such that: s == 0 indicates to shift once s == 1 indicates to shift twice
rr indicates the target register such that: rr == 00 indicates register R0 rr == 01 indicates register R1 rr == 10 indicates register R2 rr == 11 indicates register R3