03-31-2017, 08:16 PM
The HP-65 only supports one layer of subroutines. You can call one from a main program but you shouldn't call another from there.
The HP-65 Owners Manual says, if you do call lower level subroutines, the first RTN will take you back to the main program.
That suggests that starting with 0.00 in X and pressing [D] in the following:
will produce (6 + 4 + 2 + 1 + 7 +) 20.
Does anyone have a physical HP-65 that can confirm that for me?
The HP-65 Owners Manual says, if you do call lower level subroutines, the first RTN will take you back to the main program.
That suggests that starting with 0.00 in X and pressing [D] in the following:
PHP Code:
001: 23 : LBL
002: 11 : A
003: 01 : 1
004: 61 : +
005: 24 : RTN
006: 23 : LBL
007: 12 : B
008: 02 : 2
009: 61 : +
010: 11 : A
011: 03 : 3
012: 61 : +
013: 24 : RTN
014: 23 : LBL
015: 13 : C
016: 04 : 4
017: 61 : +
018: 12 : B
019: 05 : 5
020: 61 : +
021: 24 : RTN
022: 23 : LBL
023: 14 : D
024: 06 : 6
025: 61 : +
026: 13 : C
027: 07 : 7
028: 61 : +
029: 24 : RTN
will produce (6 + 4 + 2 + 1 + 7 +) 20.
Does anyone have a physical HP-65 that can confirm that for me?