|Re: HP12C Prestige/ Platinum: # of registers|
Message #5 Posted by Marcus von Cube, Germany on 16 May 2006, 11:00 a.m.,
in response to message #4 by Vieira, Luiz C. (Brazil)
I did some experiements with my 12C platinum and I found out that the highest cashflow that can be entered while the program area is full (just 399 R/S) is CF57. The boundary where the stealing of registers for program steps starts is beyond 239 steps. (I figured that out by trial and error and only later I found the info on the very last page of the fine manual.) Now let me do the math:
Internal registers (Stack, LastX): 5
Financial registers (n .. FV): 5
Cashflow and general registers: 81 (including CF0)
Fixed program steps: 1+ (8 steps)
Variable program steps: 33 ((239 - 8)/7)
Number of registers (total): 125
Each of the cashflow registers occupies 7+1 bytes because the count Nj needs to be taken care of, too. Now let's do the same calculation as above with bytes instead of registers:
Internal registers (Stack, LastX): 35 (5 x 7)
Financial registers (n .. FV): 35 (5 x 7)
Cashflow and general registers: 567 (81 x 7)
Cashflow counts: 81 (81 x 1)
Program steps: 239
Number of bytes (total): 957
It looks like the machine has access to 1 KB RAM and some working memory is set aside for running calculations (the IRR solver solver certainly needs them).
The original 12C has less memory to work with and the MEM output is of more help then on the 12Cp because it shows quickly, how program memory steals from the general (and cashflow) registers. With full program memory (100 steps) only 7 registers remain. Let's do the same as above with all memory devoted to registers:
Internal registers (Stack, LastX): 5 35 (5 x 7)
Financial registers (n .. FV): 5 35 (5 x 7)
Cashflow and general registers: 20 140 (20 x 7)
Cashflow counts: 3(?) 20 (20 x 1)
Program steps: 1+ 8
Total number of registers/bytes: 34 238
I don't know the total amount because I don't know how may registers are needed for the solver functions to work.
The funny thing is, that both machines convert program steps in chunks of 7 per register but the count must still be stored somewhere. My assumption is that, on a classic 12C, these counts are stored in 3 extra registers, giving a total of 21 bytes. The 21st byte is probably used for the first byte of program memory. Eric knows certainly more.
Editied to redo the calculations on the base of 7 bytes/register.
Edited to correct the number of cashflows on the 12Cp.
Edited: 16 May 2006, 12:50 p.m.