Summation Registers; Subroutine Return Stack (Srs) And Program Memory - HP RPN SCIENTIFIC WP 34S Owner's Manual

Table of Contents

Advertisement

The two sectors following in lower memory (summation registers and SRS) are tied to
LBG – their contents will be copied whenever LBG moves. This makes it possible to
execute REGS in the middle of a subroutine without disrupting the program.

Summation Registers

The memory needed for cumulative statistics is allocated separately – these data are no
longer held in global general purpose registers. This allows for higher internal precision
and prevents destroying these data inadvertently. The only way to update statistical data is
via Σ+ and Σ- . The accumulated data are evaluated and recalled by dedicated commands;
they are not accessible by STO or RCL.
The first invocation of Σ+ allocates 70
inserted between LBG and SRS, pushing the latter down in memory. Depending on the
competing requirements for program and data space, it may be necessary to make room
first (see overleaf).
After CLΣ, CLALL, or RESET, the memory allocated for the summation registers is
released. All pointers are automatically adjusted, so the memory allocation or release will
not disrupt a running program. Recall commands such as e.g. Σxy or SUM will return zero
if no data are allocated; other statistical operations will throw an error if not enough data
are present.
ATTENTION: The summation data will be cleared automatically when a long
program is loaded (from FM or via the serial interface) if the registers would no longer
fit in RAM after that load. You can avoid this by reducing the amount of numbered
registers using REGS before the load attempt. This should move the summation data
out of the way.

Subroutine Return Stack (SRS) and Program Memory

Both share the remaining space at lowest memory addresses.
The SRS is used for return addresses and local data. Its upper boundary is given by LBG
or the lowest summation register if applicable. There is no command to set the size of the
SRS – it fills all the space down to the top program step currently stored. When new
program steps are entered, the SRS is reset, not only to make room but because any
stored address may become invalid by changing the program.
Local data are pushed on the SRS. Thus they cannot overwrite global data; this greatly
increases the flexibility of programs. LOCR n allocates n local registers and a fixed
amount of 16 local flags. It does so by pushing a frame on the SRS containing a marker,
a flag word, and the registers requested (0 to 144). The marker contains the frame size in
words
, depending on the precision mode set (see
memory is initialized. If the pointer is zero, no local registers exist. Newly allocated
registers are cleared.
75
Herein, 2 words are employed for Σn, 4 × 8 words for Σx
other sums. If memory allocation for these 70 words fails, an error will be thrown.
WP 34S Owner's Manual
words
for the 14 summation registers.
Appendix
2
2
, Σy
, Σxy, and Σx
Edition 3.1
75
H). A pointer to this frame in
2
y, and 9 × 4 words for the
Page 156 of 211
They are

Advertisement

Table of Contents
loading

Table of Contents