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.

vow wow. •1•01111111111111111■1111111“1•11111111111•1111111■11 111■1111.11•11111iARITHMETIC INSTRUCTIONSSix instructions are provided to perform addition, subtraction, or complementing ofdata residing in storage and/or <strong>the</strong> index register or accumulator.Add (PA)0 5 8 15Op code1 0 0 0 0III)RXXXI IDisplacement8 0-7 X XThe contents of <strong>the</strong> accumulator are added algebraically to <strong>the</strong> contents of <strong>the</strong> storagelocation specified by <strong>the</strong> effective address. The resulting sum replaces <strong>the</strong> contents of<strong>the</strong> accumulator; <strong>the</strong> contents of <strong>the</strong> addressed storage location are not changed.If R=000, <strong>the</strong> effective address of <strong>the</strong> data in storage is formed by using <strong>the</strong> IARas <strong>the</strong> base register. If <strong>the</strong> R field is nonzero (R=001 to 111), <strong>the</strong> effective addressis formed using an index register as <strong>the</strong> base register.The carry and result indicators are set to reflect <strong>the</strong> result in <strong>the</strong> accumulator.The overflow indicator is set to reflect <strong>the</strong> result only if it has not been set bya previous operation. If <strong>the</strong> overflow indicator was previously set on, it will not bechanged by <strong>the</strong> result of an add instruction. If an overflow occurs, <strong>the</strong> accumulator willcontain <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 result of <strong>the</strong> addition is ei<strong>the</strong>r positive or negative, depending upon <strong>the</strong>magnitude of <strong>the</strong> values used and whe<strong>the</strong>r <strong>the</strong> signs of <strong>the</strong> two operands are <strong>the</strong> same,as shown below.+ added to a + = +—added to a — =+ added to a — = sign of <strong>the</strong> larger operand—added to a + = sign of <strong>the</strong> larger operandThe 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 intwos-complement form.Example:0 5 8 15PA instruction(R = 110 specifies using XR6to generate <strong>the</strong> EA)Op code1 0 0 0 0III!1 1 0IDisplacement0 1 0 10 10 08 6 5 2Contents of accumulator 0000 0000 1001 1101Contents of storage locationaddressed by PA instruction + 0000 0010 0011 0101Result in accumulator 0000 0010 1101 00104-14 GA34-0003

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

Saved successfully!

Ooh no, something went wrong!