Xerox Sigma 6 Reference Manual page 51

Table of Contents

Advertisement

Condition code seHings:
2
3
4
o
o
Result in Rul
positive quotient, no overflow
fixed-point overflow
If CC2 is set to 1 and the fixed-point arithmetic trap mask
(AM) is a 1, the computer traps to location X ' 43
1
with the
original contents of register R, register Ru1, CCl, CC3, and
CC4 unchanged; otherwise, the computer executes the next
instruction in sequence.
AWM
ADD WORD TO MEMORY
(Word index al ignment)
ADD WORD TO MEMORY adds the contents of register R to
the effective word and stores the sum in the effective word
location.
The sum is stored regardless of whether or not
overflow occurs.
Affected: (EWL), CC
EW + (R)-- EWL
Trap: Fixed-point overflow
Condition code settings:
o
2 3 4
o
o
0
o
1
1
0
Result in EWL
zero
negative
positive
no fixed-point overflow
fixed-point overflow
no carry from bit position 0
carry from bit position 0
If CC2 is set to 1 and the fixed-point arithmetic trap mask
(AM) is a 1, the computer traps to location X ' 43
1
after the
result is stored in the effective word location; otherwise,
the computer executes the next instruction in sequence.
MTB
MODIFY AND TEST BYTE
(Byte index alignment)
If the value of R field is nonzero, the high-order bit of the
R field (bit position 8 of the instruction word) is extended
4 bit positions to the left, to form a byte with bit posi-
tions 0-4 of that byte equal to the high-order bit of the
R field.
This byte is added to the effective byte and then
(if no memory protection violation occurs) the sum is stored
in the effective byte location and the condition code is set
according to the value of the resultant byte.
This process
al lows modification of a byte by any number in the range
-8 through +7, fol lowed by a test.
If the value of the R field is zero, the effective byte is
tested for being a zero or nonzero value.
The condition
code is set according to the result of the test, but the
effective byte is not affected. A memory write-protection
violation cannot occur in this case; however, a memory
read-protection violation can occur.
Affected: CC if (1)8-11
OJ
(EBL) and CC if (1)8-11
I
0
If (1)8-11
f
0, EB + (1)8-11 SE-- EBL and set CC
If (1)8-11
=
0, test byte and set CC
Condition code settings:
2
3
4
Result in EBL
0
0
0
zero
0
1
0
nonzero
0
no carry from byte
1
corry from byte
If MTB is executed in an interrupt location, the condition
code is not affected (see Chapter 2, "Single-Instruction
Interrupts") .
MTH
MODIFY AND TEST HALFWORD
(Halfword index alignment)
If
the value of the R field is nonzero, the high-order bit of
the R field (bit position 8 of the instruction word) is extended
12 bit positions to the left, to form a halfword with bit posi-
tions 0-11 of that halfword equal to the high-order bit of the
R field.
This halfword is added to the effective halfword and
then
(if
no memory protectior violation occurs) the sum is
stored in the effective halfword location and the condition
code is set according to the value of the resultant halfword.
The sum is stored regardless of whether or not overflow oc-
curs.
This process allows modification of a halfword by any
number in the range -8 through +7, foil owed by a test.
If tile value of the R field is zero, the effective halfword is
tested for being a zero, negative, or positive value.
The
condition code is set, according to the result of the test,
but the effective halfword is not affected. A memory writ€:-
protection violation cannot occur in this case; however, a
memory read-protection violation can occur.
Affected: CC if (1)8-11
=
0;
Trap: Fixed-poi nt overflow
(EHL) and CC if (1)8-11
f
0
If
(1)8-11
=
0, test halfword and set CC
If
(1)8-11
f
0, EH
+
(1)8-11 SE-- EHL and set CC
Condition code settings:
o
1
2
o
1
3
4
o
0
o
1
1
0
Result in EHL
zero
negative
positive
no fixed-point overflow
fixed-point overflow
no carry from hal fword
carry from hal fword
Fixed-Point Arithmetic Instructions
43

Advertisement

Table of Contents
loading

Table of Contents