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
(EH
L)
and
CC
if
(1)8-11
10
If
(1)8-11 =
0,
test
halfword
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
1
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
Addressing",
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
field
(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
effective
location
is reserved
(not accessi
bl
e to
other
processors) unti I the i nstructi on is
completed.
66 Compari
son
Instructi ons
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 1 0
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
o 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
(f1to.A\
:c:
n 1
+ho
RP
+rnnc:
+1"'1
Il"'Irn+:l"'ln )(1A.11
nf+or
+ho
rQ-
\'
..
,,'/
'v
-
II
•••
- _
•.•
-.-.-
'
___
"_"
....
- _
..
_
•...
_._
suit
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
ll
,
Chapter
2.
COMPARISON
INSTRUCTIONS
The
compuri:>on
in:)ilu~iiulI:)
ure:
Instruction Name Mnemonic
Compare Immedi
ate
CI
Compare Byte
CB