Mtw; Comparison Instructions - Xerox 550 Reference Manual

Computer
Hide thumbs Also See for 550:
Table of Contents

Advertisement

If the 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
write-protection violation cannot occur in this case; how-
ever, a memory read-protection violation can occur.
Affected: CC if (1)8-11
=
0;
Trap: Fixed-pointoverflow
(EHL) and CC if (1)8-11/0
If (1)8-11
=
0, test ha Ifword and set CC
If
(1)8-11/0, EH
+
(I)8-11SE -EHL and set CC
Condition code settings:
2
3
4
Result in EH L
-
0
0
Zero
-
0
Negative
0
Positive
-
0
No fixed-point overflow
Fixed-point overflow
o
No carry from halfword
-
Carry from halfword
If
CC2 is set to 1 and the fixed-point arithmetic trap mask
(AM) is a 1, the BP traps to location
X'43'
after the re-
sult is stored in the effective halfword location; otherwise,
the BP executes the next instruction in sequence.
If
MTH is executed in an interrupt or trap location, the
condition code is not affected and a 20-bit reference ad-
dress is used, as described under "Interrupt and Trap Entry
Addressi ng", Chapter 2.
MTW
MODIFY AND TEST WORD
t
(Word index alignment)
If
the value of the R field is nonzero, the high-order bit
of the R fie Id (bit position 8 of the instruction word) is
extended 28 bit positions to the left, to form a word with
bit positions 0-27 of that word equal to the high-order bit
tThis instruction requires two memory references to the same
location for its execution.
To preclude other processors
from accessing the effective location during this time, the
memory unit containing the effecti ve location is reserved
{not accessible to other processors} unti I the instruction is
completed.
of the R field.
This word is added to the effective word
and then
(if
no memory protection violation occurs) the
sum is stored in the effective word location and condition
code is set according to the value of the resultant word.
The sum is stored regardless of whether or not overflow
occurs.
This process allows modification of a word by
any number in the range -8 through
+7,
followed by
a test.
If
the value of the R field is zero, the effective word 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 word 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
=
0;
Trap: Fixed-pointoverflow
(EWL) and CC if (1)8-11
10
If (1)8-11
=
0, test word and set CC
If (1)8-11
10,
EW + 18-11 SE -
EWL and set CC
Condition code settings:
2
3 4
Result in EWL
-
0
0
Zero
-
0
Negative
0
Positive
- 0
No fixed-point overflow
Fixed-point overflow
o
No carry from word
Carry from word
If CC2 is set to 1 and the fixed-point arithmetic trap mask
(AM) is a 1, the BP traps to location
X'43'
after the re-
sult is stored in the effective word location; otherwise, the
BP executes the next instruction in sequence.
If MTW is executed in an interrupt or trap location, the
condition code is not affected and a 20-bit reference ad-
dress is used, as described under "Interrupt and Trap Entry
Addressing", Chapter 2.
COMPARISON INSTRUCTIONS
The comparison instructions are:
Instruction Name
Mnemonic
Compare Immedi ate
CI
Compare Byte
CB
Comparison Instructions
65

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents