# HP Forums

Full Version: Memory Reallocation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Recently I program the Matrix of 3x3 to solve for
Three Equation in Three Unknowns on
HP-12C Platinum that took 13 Store Registers with
155 program steps. Test it and program run flawlessly.
So I try this exact same program in HP-15C but
Not work as expected the register used R1 to R.4
Same as on the 12C Platinum.
When input each element it struck at STO 8 and
Shown error 3

I'm wondering why it doesn't work on 15C that
The program capacity is 400+
Is this have to do with the Memory Reallocation might work different than the 12C Platinum.

Here is the link to 12C Platinum program.

Gamo
(12-08-2018 02:24 PM)Gamo Wrote: [ -> ]I'm wondering why it doesn't work on 15C that
The program capacity is 400+

The capacily is 67 registers (!) of 7 bytes each. A program instruction may consume more than one byte. So there is no fixed number of available program steps.

But the memory management is quite flexible. Gamo, take a look at Appendix C of the 15C manual. The DIM command can be used for manual memory allocation. Also take a look at its descrption in the manual. Your 12C program requires registers up to R,4 (not ,3 as you said). So if you need R0...R,4 something like 14 DIM (i) may help. This should leave 51 registers or 357 bytes for the program – which should be sufficient.

But I didn't try it. And maybe I'm completely on the wrong track here. So let's hear what the 15C users have to say. ;-)

Dieter
(12-08-2018 05:00 PM)Dieter Wrote: [ -> ]So let's hear what the 15C users have to say.

Here's a program that allows to enter the elements of matrix A and calculates the determinant:
Code:
001-42,21,11    LBL A 002-      36    ENTER 003-42,23,11    DIM A 004-42,16, 1    MATRIX 1 ; 1 → R₀, 1 → R₁ 005-42,21, 0    LBL 0 006-      31    R/S 007-u  44 11    STO A ; enter in USER mode 008-   22  0    GTO 0 009-45,16,11    RCL MATRIX A 010-42,16, 9    MATRIX 9 ; |A| 011-   43 32    RTN

Example:

$$\begin{vmatrix} 6 & 2 & -4 \\ 5 & 6 & -2 \\ 5 & 2 & -3 \end{vmatrix}=6$$

3 A
6 R/S
2 R/S
-4 R/S
5 R/S
6 R/S
-2 R/S
5 R/S
2 R/S
-3 R/S
6

It can also be used for matrices of dimensions other than $$3\times3$$.
Don't forget to enter line 007 in USER mode!

Cheers
Thomas
Thanks
Thomas Klemm

I understand that 15C already got Build-In Matrix solver functions.
I'm curious that for the 12C Platinum it is possible to use 13 registers
with 155 program line to run Three Equations of Three Unknown program.
But with this same program is not work on 15C the problem is while input
each elements it struck at R8 and shown Error 3

Dieter explain about memory management and I still confuse about how to
set memory reallocation. So I'll look over to HP-15C Owner's Handbook.

Gamo
(12-08-2018 05:00 PM)Dieter Wrote: [ -> ]The capacily is 67 registers (!) of 7 bytes each.
Hello Dieter,
Yeah, I agree that 67 registers might seem strange at first but it may not be upon close examination.
I have not validated what I am about to say, but bear with me.
HP used 16 registers chips at the time and lets assumed that the HP-15C had five of those chips inside the SOC. (system on chip)
If that is the case then we have 80 registers total, minus the stack (5 registers), the PC & 7 levels return stack (3 registers), the flags, scratch & other usages (5 registers) for a total 67 registers left.
This is just an intuition and not at all proven, but still it could make sense.
Sylvain
After finish reading 15C Owner's Handbook under section Memory Reallocation.
I make some change to Memory Reallocation as shown on page 216

To change Memory Reallocation as needed by entering

13 f [DIM] [(i)] and put the program again.

Check Memory Usage
13 14 24-4

This time all work really good !!

I make some refinement to this program by assign all to Labels.

[E] To Initialize and Input all elements.
[D] To Store and display the Determinant