Detect number entry on HP-35s?
|
03-08-2015, 01:28 PM
(This post was last modified: 03-08-2015 01:43 PM by Dieter.)
Post: #29
|
|||
|
|||
RE: Detect number entry on HP-35s?
(03-06-2015 04:27 PM)mbrethen Wrote: This performs most of the computations using just the stack. The A, I and T named variables are used for input, indirect register access and temporary storage, respectively. It is based on a program for the HP-41 by Jean-Marc Baillard. I have translated it for the HP-35s. In addition to the HP-41 Flag 22 issue, there were other parts of the code I had to work around: More or less direkt translations of programs for other platforms are not always the best idea. On the HP41 saving registers makes sense, because every unused data register can be used to store the matrix and/or is available for additional program memory. That's why using the stack is a good idea. On the 35s however, the direct variables A–Z are always allocated and completely independent from program memory. They also do not store the matrix which resides in the indirect variables. BTW: you should change your step W023 to RCL A. Otherwise always the absolute value of the input is stored. (03-06-2015 04:27 PM)mbrethen Wrote: As Dieter pointed out, the program isn't fail safe but I like the fact that it does all the bookkeeping for you. The following code is an optimized version of my previous code. It also realizes if the user tries to cancel input before a complete row has been entered. It even detects if there is no input at all. Code: W001 LBL W This version even requires less memory than the previous ones. The 35s reports LN=243. Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 9 Guest(s)