Post Reply 
HHC 2019 will be in Reno, Nevada, Sept 21-22
10-03-2019, 08:24 PM
Post: #63
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
I ported my program to the 35s. Due to the lack of labels and dearth of indirect addressing registers, it was much harder than I thought. Now I understand why people view the 42s as the pinnacle of RPN models. It looks like the HP32s started the trend of few labels and single-letter variables. Is that right?

Anyway, here is the code. My apologies for the comments not lining up. It runs in 1 minute 22 seconds:
Code:
D001    LBL D    
        9            ; Precompute 03-93
        STO I
        RCL I
D005    3
        y^x
        STO(I)
        DSE I
        GTO D004
D010    CLx
        STO(I)
        -26            ; Store results in Z..W
        STO K
        1.009
D015    STO L        ; X from 1-9
        RCL L
        STO I
        RCL(I)         ; X^3
        STO A        ; S1
D020    RCL I
        IP
        100
        ×
        STO D        ; N1
D025    .009
        STO M
        RCL M
        STO I
        RCL(I)
D030    RCL+ A
        STO B        ; S2
        RCL I
        IP
        10
D035    ×
        RCL+ D
        STO E        ; N2
        .009            ; For Z=0 to 9
        STO J
D040    RCL(J)
        RCL+ B        ; S3
        RCL J
        IP
        RCL+ E        ; N3
D045    X≠Y?             ; S≠N? 
        GTO D052        ; branch
        RCL K        ; If S=N then store
        STO I
        R↓
D050    STO(I)
        ISG K
        9
        +
        x<y?             ; N+9 < S?
D055    GTO D058            ; break out of z loop
        ISJ J            ; Loop for X digit
        GTO D040
        ISG M        ; Loop for Y digit
        GTO D027
D060    ISG L                ; Loop for X digit
        GTO D014
        RCL Z
        RCL X
        RCL Y
D065    RCL W
        RTN
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22 - David Hayden - 10-03-2019 08:24 PM



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