HP Forums

Full Version: (35s) Double Deck Descriptor: A 2-level Description of Input
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Double Deck Descriptor

I now present the DDD for the HP 35s.

For input

0
22367899

the programme returns

211112
987632

to be read as

291817161322

to be read as

two 9s one 8 one 7 one 6 one 3 two 2s.

Limitations: No particular digit may appear more than 9 times in the combination of the two levels - results become incoherent.

The initial zero on stack level Y is needed as a starter - indeed, it could be replaced by any number, but the result would be questionable.

If the programme is now again activated, you get a description of

291817161322

& so on.

You may notice the awkwardness I have in dealing with indirect addressing of variables - I would be grateful for improvements.

I have used (I) to represent indirect I as the sign occurs where ordinary brackets are not allowed.

Code:
1.    LBL J
2.    STO K
3.    x<>y 
4.    STO L
5.    +
6.    12
7.    STO I
8.    STO(I)
9.    CLx
10.    10
11.    STO I
12.    CLx
13.    STO(I)
14.    DSE I
15.    GTO J013
16.    +
17.    x≠0?
18.    GTO J022
19.    1
20.    x<>y
21.    RTN
22.    CLx
23.    RMDR(K:10)+1
24.    STO I
25.    SGN
26.    STO+(I)
27.    CLx
28.    RCL L
29.    x=0?
30.    GTO J039
31.    CLx
32.    RMDR(L:10)+1
33.    STO I
34.    SGN
35.    STO+(I)
36.    CLx
37.    IDIV(L:10)
38.    STO L
39.    CLx
40.    IDIV(K:10)
41.    STO K
42.    x≠0?
43.    GTO J022
44.    CLx
45.    10
46.    STO I
47.    CLx
48.    STO T
49.    STO U
50.    CLx
51.    RCL (I)
52.    x=0?
53.    GTO J060
54.    CLx
55.    10*U+(I)
56.    STO U
57.    CLx
58.    10* T+I-1
59.    STO T
60.    DSE I
61.    GTO J050
62.    CLx
63.    RCL U
64.    RCL T
65.    RTN
Reference URL's