The storage area where the contents of the gener
al registers are placed starts at the location designat
ed by the second-operand address and continues
through as many locations as needed. The general
registers are stored in the ascending order of their
addresses, starting with the register specified by Rl
and continuing up to and including the register speci
fied by R3, with register0 following register 15.
Condition Code:
The code remains unchanged.
Program Exceptions:
Access (store, operand 2)
Subtract
SR [RR]
o 8 12 15
S [RX]
58
o 8 12 1620 31
The second operand is subtracted from the first oper
and, and the difference is placed in the first-
operand location.
Subtraction is considered to be performed by
adding the one's complement of the second operand
and a low-order one to the first operand. All 32 bits
of both operands participate, as in ADD. If the carry
out of the sign-bit position and the carry out of the
high-order numeric bit position agree, the difference
is if they disagree, an overflow occurs.
The overflow causes a program interruption when
the fixed-point overflow mask bit is one.
Resulting Condition Code:
o Difference is zero
1 Difference is less than zero
2 Difference is greater thanzero 3 Overflow
Program Exceptions:
Access (fetch, operand 2 of S only)
Fixed-Point Overflow
Programming Note
The use of the one's complement and the low-order
one instead of the two's complement of the second
operand is necessary for proper recognition of over
flow when subtracting the maximum negative num
ber.
When, in the RR format, the Rl and R2 fields
designate the same register, subtracting is equivalent
to clearing the register.
Subtracting a maximum negative number from
another maximum negative number gives a zero re
sult and no overflow.
Subtract Hal/word
SH [RX]
48
l
o 8 12 1620 31
The second operand is subtracted from the first oper
and, and the difference is placed in the first-operand
location. The second operand is two bytes in length
and is considered to be a 16-bit signed integer.
The second operand is expanded to 32 bits before
the subtraction by propagating the sign-bit value
through the 16 high-order bit positions.
Subtraction is considered to be performed by
adding the one's complement of the expanded sec
ond operand and a low-order one to the first oper
and. All 32 bits of both operands participate, as in
ADD. If the carry out of the sign-bit position and
the carry out of the high-order numeric bit position
agree, the difference is if they disagree,
an overflow occurs. The overflow causes a program
interruption when the fixed-point overflow mask bit
is one.
Resulting Condition Code:
o Difference is zero
1 Difference is less than zero
2 Difference is greater than zero
3 Overflow
Program Exceptions:
Access (fetch, operand 2)
Fixed-Point Overflow
Subtract Logical
SLR [RR]
1F
o 8 12 15
SL
o 8 12 1620 31
General Instructions 143
al registers are placed starts at the location designat
ed by the second-operand address and continues
through as many locations as needed. The general
registers are stored in the ascending order of their
addresses, starting with the register specified by Rl
and continuing up to and including the register speci
fied by R3, with register
Condition Code:
The code remains unchanged.
Program Exceptions:
Access (store, operand 2)
Subtract
SR [RR]
o 8 12 15
S [RX]
58
o 8 12 16
The second operand is subtracted from the first oper
and, and the difference is placed in the first-
operand location.
Subtraction is considered to be performed by
adding the one's complement of the second operand
and a low-order one to the first operand. All 32 bits
of both operands participate, as in ADD. If the carry
out of the sign-bit position and the carry out of the
high-order numeric bit position agree, the difference
is
The overflow causes a program interruption when
the fixed-point overflow mask bit is one.
Resulting Condition Code:
o Difference is zero
1 Difference is less than zero
2 Difference is greater than
Program Exceptions:
Access (fetch, operand 2 of S only)
Fixed-Point Overflow
Programming Note
The use of the one's complement and the low-order
one instead of the two's complement of the second
operand is necessary for proper recognition of over
flow when subtracting the maximum negative num
ber.
When, in the RR format, the Rl and R2 fields
designate the same register, subtracting is equivalent
to clearing the register.
Subtracting a maximum negative number from
another maximum negative number gives a zero re
sult and no overflow.
Subtract Hal/word
SH [RX]
48
l
o 8 12 16
The second operand is subtracted from the first oper
and, and the difference is placed in the first-operand
location. The second operand is two bytes in length
and is considered to be a 16-bit signed integer.
The second operand is expanded to 32 bits before
the subtraction by propagating the sign-bit value
through the 16 high-order bit positions.
Subtraction is considered to be performed by
adding the one's complement of the expanded sec
ond operand and a low-order one to the first oper
and. All 32 bits of both operands participate, as in
ADD. If the carry out of the sign-bit position and
the carry out of the high-order numeric bit position
agree, the difference is
an overflow occurs. The overflow causes a program
interruption when the fixed-point overflow mask bit
is one.
Resulting Condition Code:
o Difference is zero
1 Difference is less than zero
2 Difference is greater than zero
3 Overflow
Program Exceptions:
Access (fetch, operand 2)
Fixed-Point Overflow
Subtract Logical
SLR [RR]
1F
o 8 12 15
SL
o 8 12 16
General Instructions 143