The Museum of HP Calculators

Calendar Functions for the HP-95C

This program is Copyright © 1977 by Hewlett-Packard Company and is used here by permission. It was originally printed in the HP-95C Applications book. This program was entered by André Wilhelmus and the curator added comments from the HP manual.

This program is supplied without representation or warranty of any kind. André Wilhelmus, Hewlett-Packard and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

Program Listing

CODE KEYS
A-000    lbl A f LBL A
A-001       21 ENTER ↑ Break date input
A-002    61  1 f INT into the individual
A-003    35  7 STO 7 components of
A-004       49 mm, dd, yyyy
A-005       23 EEX
A-006        2 2
A-007       39 ×
A-008       21 ENTER ↑
A-009    61  1 f INT
A-010    35  8 STO 8
A-011       49
A-012       23 EEX
A-013        4 4
A-014       39 ×
A-015    35  9 STO 9
A-016    45  7 RCL 7 - - - - - - - - - - - - - - - - - - - -
A-017        1 1
A-018       59 + m + 1
A-019       21 ENTER ↑ - - - - - - - - - - - - - - - - - - - -
A-020       44 1/x
A-021       66 m + 1 → m'
A-022        7 7 y → y'
A-023       59 +
A-024       22 CHS
A-025    61  1 f INT - - - - - - - - - - - - - - - - - - - -
A-026 35 59  9 STO + 9 If input to this rountine
A-027        1 1 has abs value ≥ 1:
A-028        2 2 y = y ± 1
A-029       39 ×             (+ for plus input)
A-030       49 m = m ± 12
A-031        3 3 - - - - - - - - - - - - - - - - - - - -
A-032        0 0
A-033       66
A-034        6 6
A-035        0 0
A-036        0 0
A-037        1 1
A-038    35  6 STO 6
A-039       39 ×
A-040    61  1 f INT
A-041    45  9 RCL 9
A-042        3 3
A-043        6 6 Compute day number.
A-044        5 5
A-045       66
A-046        2 2
A-047        5 5
A-048    35  5 STO 5
A-049       39 ×
A-050    61  1 f INT
A-051       59 +
A-052    45  8 RCL 8
A-053       59 +
A-054 61 21  0 f FIX 0
A-055    61 53 f RTN - - - - - - - - - - - - - - - - - - - -
b-000    lbl b f LBL B
b-001    35  4 STO 4
b-002        1 1
b-003        2 2
b-004        2 2
b-005       66
b-006        1 1
b-007       49 Calculate y'
b-008        3 3
b-009        6 6
b-010        5 5
b-011       66
b-012        2 2
b-013        5 5
b-014    35  5 STO 5
b-015       24 ÷
b-016    61  1 f INT - - - - - - - - - - - - - - - - - - - -
b-017    35  9 STO 9
b-018    45  5 RCL 5
b-019       39 ×
b-020    61  1 f INT
b-021    45  4 RCL 4
b-022       49
b-023       22 CHS
b-024    35  4 STO 4
b-025        3 3
b-026        0 0 Calculate m'
b-027       66
b-028        6 6
b-029        0 0
b-030        0 0
b-031        1 1
b-032    35  6 STO 6
b-033       24 ÷
b-034    61  1 f INT - - - - - - - - - - - - - - - - - - - -
b-035    35  7 STO 7
b-036    45  4 RCL 4
b-037       11 x⇔y
b-038    45  6 RCL 6 Calculate day of
b-039       39 × the month.
b-040    61  1 f INT
b-041       49
b-042    35  8 STO 8 - - - - - - - - - - - - - - - - - - - -
b-043    45  7 RCL 7
b-044        1 1
b-045    45  8 RCL 8
b-046       51 % Build (m' - 1) .dd
b-047       49 part of display.
b-048       49 - - - - - - - - - - - - - - - - - - - -
b-049    45  7 RCL 7
b-050        1 1
b-051        4 4
b-052       24 ÷
b-053    61  1 f INT Correct m' - 1 and y'
b-054 35 59  9 STO + 9 to m and y
b-055        1 1
b-056        2 2
b-057       39 ×
b-058       49
b-059    45  9 RCL 9 - - - - - - - - - - - - - - - - - - - -
b-060       23 EEX
b-061        6 6 Finish building
b-062       24 ÷ mm.dd.yyy result
b-063       59 + and display answer.
b-064 61 21  6 f FIX 6
b-065    61 53 f RTN - - - - - - - - - - - - - - - - - - - -
C-000    lbl C f LBL C
C-001        5 5
C-002       59 +
C-003        7 7 Calculate
C-004       24 ÷ day of the week
C-005    62  1 g FRAC from day number
C-006        7 7
C-007       39 ×
C-008    61 53 f RTN

Go back to the HP-95C software library
Go back to the general software library
Go back to the main exhibit hall