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...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

11111 !III VIII I 1101 1,411111111,111111 IIII•111111.11.111111111111111,11 1111 III 1111111 1111111111111.11111111111111111 111111.1,Subtract Register (PSR)0 5 8 15Op codeModifier1 1 1 1 1 X X X 0 0 0 00 1 0 1 0III)F 8-F 0 2The contents of <strong>the</strong> register specified by R are subtracted algebraically from <strong>the</strong> contentsof <strong>the</strong> accumulator. The resulting difference replaces <strong>the</strong> contents of <strong>the</strong> accumulator. IfR specifies an index register (R01 to 111), <strong>the</strong> contents of <strong>the</strong> index register are notchanged.An R field of 000 specifies <strong>the</strong> accumulator. This means that <strong>the</strong> accumulator can besubtracted from itself, giving a simple method of setting <strong>the</strong> accumulator contents to a0 value.The carry and result indicators are set to reflect <strong>the</strong> resulting difference in <strong>the</strong>accumulator. The carry indicator is set on by a borrow from <strong>the</strong> high-order bit in <strong>the</strong>accumulator.The overflow indicator is set to reflect <strong>the</strong> result only if it has not been set by aprevious operation. If <strong>the</strong> overflow indicator was previously set on, it will not be changedby <strong>the</strong> result of a subtract register instruction. If an overflow occurs, <strong>the</strong> accumulatorwill contain <strong>the</strong> correct low-order 16 bits of <strong>the</strong> result and <strong>the</strong> carry indicator will beturned on if <strong>the</strong> result is negative.The sign of <strong>the</strong> result is dependent upon <strong>the</strong> signs and magnitudes of both operands.Possible combinations (where operand B is always numerically greater than operand A,regardless of signs) are:From Operand Subtract Operand Sign of Resultin Accumulator in Storage in Accumulator+B +A+B —A—B +A ——B —A+A +B+A —B—A +B—A —BThe value in <strong>the</strong> accumulator is positive if <strong>the</strong> leftmost bit is a 0; <strong>the</strong> value in <strong>the</strong>accumulator is negative if <strong>the</strong> leftmost bit is a 1. Negative numbers are in twos-complementform.Example:0 5 8 15PSR instruction(R = 101 specifies index registerOp code R Modifier5 is subtracted from accumulator) 1 1 1 1 1 1 0 1 0 0 0 010 0 1 0III) I I iiiiiiiF D 0 2Contents of accumulator 0000 0000 1110 1111Contents of index register 5 —0000 0000 0011 0101Result in accumulator0000 0000 1011 1010(in decimal: 239-53 = 186)

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

Saved successfully!

Ooh no, something went wrong!