Post Reply 
Detect number entry on HP-35s?
02-28-2015, 09:53 PM (This post was last modified: 03-01-2015 12:15 AM by mbrethen.)
Post: #21
RE: Detect number entry on HP-35s?
This doesn't achieve the goal I started with, but following Dieter's example:

Code:
W001 LBL W
W002 INPUT R                        // starting register #
W003 INPUT M                        // # lines
W004 INPUT N                        // # columns
W005 ABS
W006 IP
W007 STO N
W008 1E3
W009 /
W010 ENTER
W011 SGN
W012 +
W013 STO T                          // temporary
W014 RCL M
W015 ABS
W016 IP
W017 STO M
W018 1E3
W019 /
W020 ENTER
W021 SGN
W022 +
W023 STO L                         // line counter
W024 RCL M
W025 RCLx N
W026 RCL R
W027 STO I                         // address pointer
W028 +
W029 STO J                         // memory curtain
W030 STO (J)                       // store non-zero value
W031 RCL T
W032 STO S                         // stack (column) counter
W033 [IP(L),IP(S)]
W034 STO E
W035 ALL
W036 INPUT E                       // display E? [line, stack]
W037 STO(I)
W038 ISG I
W039 ENTER
W040 ISG S
W041 GTO W033
W042 ISG L
W043 GTO W031
W044 EQN R+(R+(MxN)-1)/1E3+M/1E5  // control number bbb.eeell
W045 RTN

Example:
Code:
            3   1   4   1
      A =   5   9   2   6    starting with register  R11
            5   3   5   8

control number = 11.02203 the first register is R11 , the last one is R22 and there are 3 lines. Store this in A to identify matrix A.

Could alternately enter the input in the stack instead (I'm not a fan of input queries):

REGY [M,N]
REGX R

A proposed test for scalar:

Code:
W037 EQN (E*[1,0])*(E*[0,1])
W038 X=0?
W039 GTO XXX
W040 RCL E
W041 STO (I)
.
.
.

If E=scalar the equation should always be 0; if E=vector (in terms of matrix position, i.e. never [0,0]) it should be a positive number <>0.
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 - 02-28-2015 09:53 PM



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