Detect number entry on HP-35s?
|
03-02-2015, 02:26 AM
(This post was last modified: 03-02-2015 02:51 AM by mbrethen.)
Post: #26
|
|||
|
|||
RE: Detect number entry on HP-35s?
(03-01-2015 08:59 PM)Dieter Wrote: OK, so the user enters, say, 12 values, and then simlpy presses R/S to indicate all elements have been entered (and stored). How does the program know if these 12 values define a 3x4 or 4x3 or 2x6 or 6x2 matrix? The user puts the starting register on the stack. Executing the "matrix writer" program, it queries each element, column by column. When the user presses R/S the first time, that signals the end of first column and there are "m" rows. It then queries additional columns. When the user presses R/S a second time, that signals the end of the nth column and the program "learns" "m" rows and "n" columns. It finishes by placing a "control number" on the stack: bbb.eeerr where bbb = beginning register eee = end register rr = number of rows This control number will be used by other programs that operate on the matrix. Quote:Please forgive me if I once again have to ask for an example. What does the user enter, which keys are pressed, and what is the program supposed to do with this input. Please give a complete example with every single key pressed. In the example posted earlier: 11 XEQ "W" the HP-35 displays A? [1,1] 3 R/S A? [2,1] 5 R/S A? [3,1] 5 R/S A? [4,1] first column is stored R/S A? [1,2] now, the HP-35 knows the matrix has 3 rows (continues until) 1 R/S A? [2,4] 6 R/S A? [3,4] 8 R/S A? [1,5] all the elements are stored R/S REGX = 11.02203 first register is R11 , last is R22 and there are 3 rows. Sample code to query column: Code: W001 LBL W It's not complete, I need to add the logic to cycle through each column and then put the control number in the stack. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 17 Guest(s)