MIL-STD-1750A: Military Standard Sixteen-Bit Computer Instruction Set Architecture | ||
---|---|---|
Prev | Chapter 5. Detailed Requirements | Next |
Addr Mode Mnemonic Format/Opcode 8 4 4 ----------------------- R SRA RB,N | 62 | N-1 | RB | 1 <= N <= 16 -----------------------
Description. The contents of the Derived Address, DA (i.e., the contents of register RB), are shifted right arithmetically N positions. The shifted result is stored in RB. The arithmetic right shift operation is as follows: the sign bit, which is not changed, is copied into the next position for each position shifted and bits shifted out of the least significant bit position (bit 15) are lost. The condition status, CS, is set based on the result in register RB.
Note: N-1 = 0 represents a shift of one position.
Note: N-1 = 15 represents a shift of sixteen positions.
0 15 ----------------------------- RB Before Shift | sabc | defg | hijk | lmnp | ----------------------------- ----------------------------- RB After Shift (N=4) | ssss | sabc | defg | hijk | -----------------------------
Register Transfer Description.
(RB) <-- (RB) Shifted right arithmetically by N positions;
(CS) <-- 0010 if (RB) = 0;
(CS) <-- 0001 if (RB) < 0;
(CS) <-- 0100 if (RB) >= 0;
Registers Affected. RB,CS