Making Room For Your Needs - HP RPN SCIENTIFIC WP 34S Owner's Manual

Table of Contents

Advertisement

Calling LOCR again in the same subroutine will adjust the number of local registers. This
requires data copying since these registers are allocated from low to high addresses and
the SRS grows in the opposite direction. LOCR? will return the number of local registers
currently allocated in the routine you are in.
See
overleaf
for addressing local data, and for an example of recursive programming. The
SRS must be large enough to hold these data, however, so you may have to make room
first – see next paragraph.
Below the SRS, program memory holds the stored program steps. A typical program step
takes just one word. Multi-byte labels and multi-character alpha strings take two
each. The total size of program memory depends on the number of global and local
registers allocated, as explained in the following.

Making Room for Your Needs

The 12 special (lettered) registers are always allocated. The SRS has a minimum size of
six
words
or levels. Everything else is user distributable within the 982
sections 2 to 4, so:
982 = r + s + p with
r = number of
register. There are at least 12 and at most 112 of them. So r varies
between 48 and 896 (this maximum is explained
default is 448.
s = number of
startup default is 0).
p = number of
already taken by the inevitable final END statement; 6
minimum size of the SRS. So STATUS will show you a maximum of 933
free
is 533 steps. Subroutine nesting and local registers expand the SRS, thus
reducing the program space available.
If, for instance, you need to do statistics and also use 20 global numbered registers,
there will be space for 777 program steps maximum.
You have several options for increasing the free space where you need it (see the picture
on p. 154):
1. Reduce the number of global numbered registers allocated. One register less
typically allows for four additional program steps.
2. Move programs to FM and clear the respective steps in RAM. Four cleared program
steps typically allow for one additional register.
3. Release the summation registers when you do not need them anymore. This space
may be distributed to up to 70 additional program steps, up to 17 additional
registers, or a mix.
WP 34S Owner's Manual
words
allocated for global registers. These are 4 per standard
words
allocated for summation registers (70 if they are used;
words
available for program steps and SRS. One step is
words
in RAM, meaning up to 927 free program steps. Startup default
Edition 3.1
words
words
left for
in Appendix
H); startup
words
is the
Page 157 of 211

Advertisement

Table of Contents
loading

Table of Contents