Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| public:calculator:guides:dm41_save_stats [08/02/26 21:51 GMT] – [Background] john | public:calculator:guides:dm41_save_stats [10/02/26 18:01 GMT] (current) – [Multiple Saved Files] john | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| - | ====== | + | ====== |
| ** Using Extended Memory to save Statistics Registers ** | ** Using Extended Memory to save Statistics Registers ** | ||
| Line 14: | Line 14: | ||
| It is possible to save the 6 registers in a data file in Extended Memory and then use the statistics for other things, and restore the saved Statistics back to Main Memory when required. | It is possible to save the 6 registers in a data file in Extended Memory and then use the statistics for other things, and restore the saved Statistics back to Main Memory when required. | ||
| - | By Default the Statistics registers start at R11 but this can be changed with the command '' | + | By Default the Statistics registers start at **R11** but this can be changed with the command '' |
| This is the default list of Statistics Registers and contents | This is the default list of Statistics Registers and contents | ||
| Line 24: | Line 24: | ||
| |R15|∑xy|Summation of products of x- and y-values.| | |R15|∑xy|Summation of products of x- and y-values.| | ||
| |R16|n|Number of data points accumulated.| | |R16|n|Number of data points accumulated.| | ||
| + | |||
| + | **Advantage Pac : CFIT application ** seems to reset '' | ||
| + | |||
| ===== Extended Memory Data File ===== | ===== Extended Memory Data File ===== | ||
| Line 34: | Line 37: | ||
| * excecute '' | * excecute '' | ||
| - | Once it's created it can be used to hold the contents of the 6 Main Memory | + | Once it's created it can be used to hold the contents of the 6 Statistics Registers |
| ===== Save Registers to Extended Memory ===== | ===== Save Registers to Extended Memory ===== | ||
| Line 44: | Line 47: | ||
| * Now we need to copy the 6 Registers R11 -> R16 to the Data File '' | * Now we need to copy the 6 Registers R11 -> R16 to the Data File '' | ||
| * ensure '' | * ensure '' | ||
| - | * put a number in '' | + | * put a number in '' |
| * put '' | * put '' | ||
| * execute '' | * execute '' | ||
| - | ===== Restore | + | ===== Restore Registers from Extended Memory to Main Memory ==== |
| * We need to make sure our Data File is the current file and that the pointer is at the beginning of the file | * We need to make sure our Data File is the current file and that the pointer is at the beginning of the file | ||
| Line 68: | Line 71: | ||
| This uses the query '' | This uses the query '' | ||
| - | When used in '' | + | When used in '' |
| - | When used in '' | + | When used in '' |
| < | < | ||
| - | LBL ¬SAVES | + | LBL ¬SAVER |
| ¬REGS | ¬REGS | ||
| 0 | 0 | ||
| Line 84: | Line 87: | ||
| + | + | ||
| SAVERX | SAVERX | ||
| - | ¬STATS | + | ¬REGS |
| AVIEW | AVIEW | ||
| PSE | PSE | ||
| CLD | CLD | ||
| RTN | RTN | ||
| - | LBL ¬GETS | + | LBL ¬GETR |
| ¬REGS | ¬REGS | ||
| 0 | 0 | ||
| Line 99: | Line 102: | ||
| + | + | ||
| GETRX | GETRX | ||
| - | ¬STATS | + | ¬REGS |
| AVIEW | AVIEW | ||
| PSE | PSE | ||
| Line 108: | Line 111: | ||
| + | ===== Multiple Saved Files ===== | ||
| + | It's possible to have more than one Extended Memory file with Stats registers. | ||
| + | This could keep track of different sets of statistics and allow restore, update, save for many sets of statistical data. | ||
| + | |||
| + | I've set up **two** data files : '' | ||
| + | |||
| + | |||
| + | Then I thought of adding a 7th Register holding the '' | ||
| + | |||
| + | Delete the original '' | ||
| + | |||
| + | * '' | ||
| + | * execute '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * execute '' | ||
| + | |||
| + | |||
| + | The date is automatically stored in the register just //after// the '' | ||
| + | |||
| + | |||
| + | Here is '' | ||
| + | |||
| + | |||
| + | < | ||
| + | |||
| + | LBL ¬SAVEC | ||
| + | ¬CHESS | ||
| + | 0 | ||
| + | SEEKPTA | ||
| + | ∑REG? | ||
| + | STO 01 | ||
| + | 6 | ||
| + | + | ||
| + | STO 00 | ||
| + | DATE | ||
| + | STO IND 00 | ||
| + | RCL 01 | ||
| + | 1.001 | ||
| + | * | ||
| + | .006 | ||
| + | + | ||
| + | SAVERX | ||
| + | ¬CHESS SAVED | ||
| + | AVIEW | ||
| + | PSE | ||
| + | CLD | ||
| + | RTN | ||
| + | END | ||
| + | |||
| + | </ | ||
| + | |||
| + | < | ||
| + | LBL ¬GETC | ||
| + | ¬CHESS | ||
| + | 0 | ||
| + | SEEKPTA | ||
| + | ∑REG? | ||
| + | STO 01 | ||
| + | 6 | ||
| + | + | ||
| + | STO 00 | ||
| + | RCL 01 | ||
| + | 1.001 | ||
| + | * | ||
| + | .006 | ||
| + | + | ||
| + | GETRX | ||
| + | CLA | ||
| + | RCL IND 00 | ||
| + | ¬LAST | ||
| + | ADATE | ||
| + | AVIEW | ||
| + | PSE | ||
| + | CLD | ||
| + | RTN | ||
| + | END | ||
| + | |||
| + | </ | ||
| + | ===== Further Ideas ===== | ||
| - | ===== Further Information ===== | + | I might make a better version which prompts for a Data File name rather than having one separate program for each scenario |
| - | {{tag>}} | + | {{tag>calculator dm41x dm41l}} |