HP 3000 III Series Manual page 42

Table of Contents

Advertisement

System/CPU Overview
DB
----r-----------"
GLOBAL VARIABLES
DB·
plus dIrect relatIve
addressing (up to
DB+255)
LOCAL ARRAYS
GLOBAL ARRAYS
LOCAL VARIABLES
TEMPORARY VARIABLES &
INTERMEDIATE RESULTS
}
DB .
plus IIldlrect relative
addressing
~=============~
I
PARAMETERS
I)
0
mlllus relative
addressing (up to
0 . 63)
Q
----:==============~
}
plus direct relative
addressing (up to
0+127)
~==============~
}
plus Indirect relatIve
addresslllg
~==================~
}
minus relative
addressing (up to
S . 63)
~::;:::;=;::::::;::;:::::;::::;::::=;::;:::;~
Figure 2-3.
Typical Data Stack
The data in
the
DB
location is the oldest element on
the stack.
The data in the S-pointer location is the most current element on
the stack.
(The S-pointer location is referred to as the
Top of
the Stack
(TOS).
Conventionally,
TOS
is represented
downward
fram DB to
correspond to the normal progression of writing soft-
ware programs
where the most recently written statement
is fur-
ther down the page than previously written statements.
The area
fram
S+l to
Z is
available for
adding elements to
the stack.
When a data word is added to the stack,
it is stored in the next
available
location and and the S-pointer is automatically incre-
mented by one to reflect the new TOS.
(This process
is said
to
"push"
a word
onto the
stack.)
When data is
deleted from the
stack,
the S-pointer is decremented which puts the deleted
word
in
an undefined
area.
S-minus relative
addressing is used to
refer to
recently stacked
elements of data
and is
one of
the
standard
addressing conventions.
Under this convention,
S-l is
the second element on the stack,
8-2 is the third element on the
stack,
etc.
The
other
standard
addressing
conventions
are
DB-plus
relative addressing,
Q-rninus
relative addressing,
and
2-10

Advertisement

Table of Contents
loading

Table of Contents