12.07.2015 Views

IBM System/7 Functional Characteristics - All about the IBM 1130 ...

IBM System/7 Functional Characteristics - All about the IBM 1130 ...

IBM System/7 Functional Characteristics - All about the IBM 1130 ...

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Shift Right Arithmetic (PSRA)0 5 8 11 15Op code R Mod Count0 00 1 0 X XX 0 11 XXXXX1111 II 11 1111S•••••••\,•■•••■■■••••,,,■•■",■•■••■■,...■"■•■••■,,■••■•1 0-7 6 or 7 X<strong>All</strong> 16 bits in <strong>the</strong> index register (R), or <strong>the</strong> accumulator if R=000, are shifted rightby <strong>the</strong> number of bits specified in <strong>the</strong> count field.Vacated high-order bits are set to <strong>the</strong> value of <strong>the</strong> sign bit (bit 0). <strong>All</strong> bits shiftedout of <strong>the</strong> low-order bit (bit 15) are lost.The shift count field can specify any decimal value from 0 to 16. Shift countsgreater than 16 are invalid and cause a program check interruption. A shift count of 15or 16 sets <strong>the</strong> entire contents of <strong>the</strong> R register to <strong>the</strong> value of <strong>the</strong> sign bit. A shift countof 0 is valid and serves a useful purpose. Although no shifting takes place, this is a simplemethod of setting <strong>the</strong> result indicators to reflect <strong>the</strong> current contents of <strong>the</strong> R register.The carry and overflow indicators are not changed. The result indicators are changedto reflect <strong>the</strong> final contents of <strong>the</strong> R register.Example:Assume a right arithmetic shift of eight bits in <strong>the</strong> accumulator0 5 8 15PSRA instructionOp code R Mod Count0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 01111 II 11 11111 0 6 8AccumulatorOriginal value1 shifted inBits shifted out are lostAfter first shift1 shifted inAfter second shift• •• •• •After eighth shift 1111 1111 1000 0000

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!