Try to learn something about everything, and everything about somethingThomas Huxley “Darwin's bulldog” (1824-1895)

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
public:calculator:progs:dm41x_progs [14/01/26 17:09 GMT] – [DM41x RAW] johnpublic:calculator:progs:dm41x_progs [14/02/26 11:19 GMT] (current) – [Using Solve and Integrate together] john
Line 4: Line 4:
 ====== DM41X Progs ====== ====== DM41X Progs ======
  
-==== Useful Memo prog ==== 
- 
-{{ :public:calculator:progs:03319.pdf | MEMO }} 
- 
-By Gary Goodman from HP document collection. Dated 24/3/85 
  
 ===== DM41x RAW ===== ===== DM41x RAW =====
- 
-  * Benchmark progs 
  
 |HP Maths Benchmark |{{ :public:calculator:progs:bm.raw |}}| |HP Maths Benchmark |{{ :public:calculator:progs:bm.raw |}}|
Line 18: Line 11:
 |8-Queens Benchmark |{{ :public:calculator:progs:nqu.raw |}}| |8-Queens Benchmark |{{ :public:calculator:progs:nqu.raw |}}|
 |Savage Benchmark |{{ :public:calculator:progs:svg.raw |}}| |Savage Benchmark |{{ :public:calculator:progs:svg.raw |}}|
-===== TI calculate 65c22 Timer values for tone generation =====+|Memo - as below - uses ascii file name "SITES" instead of "MEMO" | {{ :public:calculator:progs:memo.raw |}}| 
 +|TR - from HP41cx User guide vol. 2| {{ :public:calculator:progs:tr.raw |}} | 
 +|Sigma - from HP41cx User guide vol.2| {{ :public:calculator:progs:sigma.raw |}}| 
 + 
 + 
 +===== Using Solve and Integrate together ===== 
 + 
 +  * from HP343C handbook 
 +  * DM41X version uses ''SOLVE'' and ''INTEG'' from [[..:guides:advantage_pac| Advantage Pac]] 
 + 
 +  - Create a ''MYSOLVE'' wrapper that handles putting the correct ''SOLVE'' program name in ''ALPHA'' etc 
 +  - Create the program that is to be solved and which has as it's function an integral 
 +  - Create the program that defines the integral 
 + 
 +=== MYSOLVE === 
 + 
 +<code> 
 +LBL ¬MYSOLVE 
 +¬MOD                    // the label of the program to be solved is put in ALPHA 
 +SOLVE                   // we XEQ SOLVE (the Advantage Pac solver) 
 +RTN 
 +</code> 
 + 
 +=== Solve : MOD === 
 + 
 +The program to be solved 
 + 
 +<code> 
 +LBL ¬MOD 
 +¬BESSEL           // We put the name of the program with the integral in ALPHA 
 +STO 00            // We store our current guess for X in R 00 to be accessible by the integral finction 
 +0                 // put upper and lower limits for the integration in Y and X 
 +PI 
 +INTEG             // xeq INTEG from Advantage Pac 
 +ABS               // our current guess, make it positive 
 +X<=Y?             // Y has the Integration's estimate of accuracy - we use this to limit our search 
 +ClX               // if our guess has returned a value from the integral that's less than the inherent accuracy then that's GOOD ENOUGH, we set X to zero and SOLVE completes      
 +X≠0?              // if we still don't have zero we put back the last guess and SOLVE continues 
 +LastX 
 +RTN 
 + 
 +</code> 
 + 
 +=== Integral : BESSEL === 
 + 
 +<code> 
 +LBL ¬BESSEL 
 +SIN 
 +RCL 00 
 +
 +COS 
 +PI 
 +
 +RTN 
 + 
 +</code> 
 + 
 + 
 +=== Running it === 
 + 
 +  * ''MYSOLVE'' sets up the ''ALPHA'' register with the name of the prog to be solved, so nothing needed in ''ALPHA'' at this time 
 +  * put initial guesses in ''X'' and ''Y'' 
 +    * <key>'1'</key> <key>ENTER</key> <key>'2'</key> 
 +  * try ''FIX 4'' 
 +  * Run ''MYSOLVE'' - via XEQ or set up a ''CST'' menu item for it  
 + 
 +After a few minutes of Goose-flying we get the answer ''2.4048'' 
 + 
 + 
 + 
 + 
 + 
 +===== Useful Memo prog ===== 
 + 
 +{{ :public:calculator:progs:03319.pdf | MEMO }} 
 + 
 +By Gary Goodman from HP document collection. Dated 24/3/85 
 + 
 + 
 +===== 65c22 Timer values ===== 
 + 
 +** for VIA Tone generator ** 
 + 
 + 
 +** Needs [[..:guides:dm41x_ladybug_module|Ladybug]] module ** 
  
-==== Counter calculation ==== 
  
 The required count is calculated from ''Φ<sub>2</sub>'' and the audio frequency required. The required count is calculated from ''Φ<sub>2</sub>'' and the audio frequency required.
Line 81: Line 157:
 RTN RTN
 </code> </code>
 +
 +
 ===== BFil ===== ===== BFil =====
  
Line 298: Line 376:
  
 Page last updated: ~~LASTMOD~~ Page last updated: ~~LASTMOD~~
- 
-{{tag>dm41x calculator}} 
- 
- 
  
  
Line 310: Line 384:
  
  
-{{tag>}}+{{tag>calculator dm41x}}
  
  

Navigation