HP 3000 III Series Manual page 156

Table of Contents

Advertisement

~~chine
Instructions and Stack Operations
ASCENDING/DESCENDING ADDRESSES.
The MOVE MVB,
and CMPB instr uc-
tions have
the capability of generating
ascending or descending
addresses for source and target locations.
The direction is es-
tablished
by the sign of the count word, which is bit 0 of A, as
shown in figure 4-9.
If this bit is a "0", the sign is "+",
and
successive
addresses
are
ascending
(B and C incremented).
If
this bit is a "1" the sign is "_",
and successive
addresses are
descending
(B and
C decremented) .
Note the +Count
and -Count
arrows in figure 4-9.
The MVBW instruction uses
only
ascending
addresses;
this instruction
does not use a count word,
and the
source and
target pointers are
in A and B instead
of Band C.
SCU
and SCW also only use ascending addresses; terminal and test
characters are in A, the source pointer is in B.
METHOD OF TERMINATION.
The MOVE and MVB instructions are termin-
ated only
when the word
or byte count
becomes zero.
The MVBW
instruction is
terminated only
when a character
of a specified
type,
either alphabetic
or numeric,
is encountered.
The CMPB
instr uction has
two methods of te rm ination;
when the byte count
becomes zero,
or when any two bytes being compared are
unequal.
SCU
scans until
the term inal
or test character
is found;
SCW
scans while the str ing equals the test character.
SPECIAL FEATURES.
The MVBW instruction includes an "upshift" bit
(bit 13). This bit, when set ("1"), will transpose any lower case
sour ce char acte r s to upper ca se dur ing the tr ansfe r.
I f not se t
("0"), the source characters are unaltered by the instruction.
MOVES BEYOND TOS.
In the event that the source or target of
any
move
instruction advances into the instruction parameters on the
TOS or beyond,
the paramters
(top four if more than four)
will
not
be affected since these values are contained in the TOS reg-
isters.
The memory locations
directly
corresponding to
these
registers
will be
used for the move
(or comparison).
However,
this situation is normally a software error.
INTERRUPTS.
All Move
instr uctions are
interruptable
and
will
continue
their operation after return from the interrupt.
To do
this, the count,
source,
and target addresses are
kept updated
and deleted from the stack (if specified) only upon completion of
the instr uction.
5.
SCAL, SXIT.
Figure 4-10 illustrates the operations for call-
ing and exiting from a subroutine.
Since only local
labels
may
be
used,
operation is entirely within the current code segment.
Assume that the system is executing instructions in the code seg-
ment shown in figure 4-10.
At some point, P will
encounter
the
"SCAL
N"
instruction,
where N is some value 0 through 255.
If
the value of N is not 0, e.g., 8, this value will
be
subtracted
from
PL
(i.e., PL-8),
thus pointing at the ninth cell counting
backward from PL.
This must be within the Segment
Transfer
Ta-
ble,
whose
first entry is PL-l.
The eight entry, in this case,
contains a local program label (bit 0
=
0) , which is a
PB
rela-
tive
address
pointing
to
the
start
of the subroutirie.
This
address is converted to absolute (add to PB) and is
loaded
into
4·-26

Advertisement

Table of Contents
loading

Table of Contents