HP 3000 III Series Manual page 142

Table of Contents

Advertisement

Machine Instructions and Stack Operations
For P relative mode, control is transferred unconditionally to
P
+/- displacement,
plus (if specified) the value in X; may be in-
direct.
For DB, Q, and S relative modes,
control is transferred
indirectly (only)
via the
location specified by DB, Q, or S +/-
this displacement; the content of the location
so
specified
is
added to
PB (plus post-indexing if X is specified) to obtain the
effective address for P.
Instruction Commentary 3.
Memory opcode: 14, bits 5,6
=
00, 10, or 11
Indicators: Unaffected
Addressing modes: P relative (+/-), direct or indirect
DB+ relative, indirect
Q+ relative, indirect
Q-
relative, indirect
S- relative, indirect
Indexing available
Traps: BNDV, BNDV on P and P relative if user or privileged
4-9. Move Instructions
Note
All Move instructions are interruptable
af-
ter
each
word
(or byte) transfer and will
continue from the point
of
interrupt
when
control is returned to the instruction.
CMPB
Compare By tes
PB/DB
'--v--'
SDEC
This instruction scans two byte strings simultaneously until
the
compared bytes are unequal or until a specified number of compar-
isons have been made.
CMPB expects a signed byte count in A,
a
DB
or
PB
relative displacement for a source byte address in B,
and a DB relative displacement for a target byte
address
in
C.
As
long as the word count in A has not been counted to zero, the
comparison proceeds as follows: The content of the
byte
address
loca tion
specified by DB + B or PB + B is compared wi th the con-
tent of the byte address location specified by DB +
C.
If
the
byte
count
in A is positive, the source and target displacement
values in Band C are incremented by one after
each
comparison,
and the byte count is decremented by one.
If the byte count in A
is negative, the source and target displacement values in Band C
are decremented by one after each comparison, and the byte
count
is incremented by one.
Note that the byte count is always chang-
ed by one toward zero.
The instruction terminates when either
a
compar ison
fa ils or the byte count in the TOS reaches ze ro.
The
Condition Code is set to a
s~ecial
pattern to indicate the
term-
inating
condition.
On termlnation, the instruction deletes from
the stack the number of words (0, 1, 2, or 3)
specified
by
the
4-12

Advertisement

Table of Contents
loading

Table of Contents