Post Reply 
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

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

REGX = 11.02203 first register is R11 , last is R22 and there are 3 rows.

Sample code to query column:
W001 LBL W
W002 SF 0
W003 STO I
W004 1.001
W005 STO* I
W007 FP
W008 STO J
W009 1E3
W010 STO* J
W011 RDN
W012 X<> J
W014 STO A
W015 RDN
W017 R^
W018 R^
W019 (A*[1,0])*(A*[0,1])
W020 X<>0?
W021 GTO W049
W022 X<> A
W023 STO(I)
W024 CLX
W025 1E-5
W026 FS? 0
W027 GTO W029
W028 CLX
W029 STO+ I
W030 SGN
W031 STO+ I
W032 +
W033 FS? 0
W034 GTO W006
W035 RCL I

It's not complete, I need to add the logic to cycle through each column and then put the control number in the stack.
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
Detect number entry on HP-35s? - mbrethen - 02-25-2015, 03:37 AM
RE: Detect number entry on HP-35s? - d b - 02-26-2015, 06:31 AM
RE: Detect number entry on HP-35s? - mbrethen - 03-02-2015 02:26 AM

User(s) browsing this thread: 1 Guest(s)