The Museum of HP Calculators


Date of Easter for the HP-41

This program is Copyright © 2004 by Jean-Marc Baillard and is used here by permission.

This program is supplied without representation or warranty of any kind. Jean-Marc Baillard 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.

Overview

-3 programs are listed hereafter:

 1°) "EASTER1" calculates the date of the Christian Easter Sunday in the Gregorian calendar.
 2°) "EASTER2" ----------------------------------------------------- Julian calendar.
 3°) "EASTER"   ----------------------------------------------------- in both calendars.

-Dates are given in YMD format.
-Synthetic registers M N may be replaced by any data registers ( like R00  R01 )
 

1°) Gregorian Calendar  ( from 1583 )
 

Data Registers: /
Flags: /
Subroutines: /
 

01  LBL "EASTER1"
02  INT
03  STO M
04  1
05  %
06  INT
07  ENTER^
08  STO Z
09  8
10  +
11  25
12  /
13  INT
14  -
15  1
16  +
17  3
18  /
19  INT
20  -
21  X<>Y
22  4
23  /
24  INT
25  -
26  RCL M
27  19
28  MOD
29  STO N
30  LASTX
31  *
32  +
33  15
34  +
35  30
36  MOD
37  X<>Y
38  4
39  MOD
40  RCL M
41   E2
42  MOD
43  4
44  /
45  INT
46  +
47  ST+ X
48  X<>Y
49  -
50  RCL M
51  4
52  ST+ Z
53  MOD
54  -
55  7
56  MOD
57  +
58  ST+ L
59  LASTX
60  11
61  *
62  RCL N
63  +
64  451
65  /
66  INT
67  7
68  *
69  -
70  9
71  -
72  69
73  X<>Y
74  X>0?
75  +
76  331
77  +
78   E4
79  /
80  RCL M
81  +
82  CLA
83  END

( 118 bytes / SIZE 000 )
 
 
      STACK        INPUTS      OUTPUTS
           X         YYYY   YYYY.MNDD
           L             /        YYYY

Example:     2005  XEQ "EASTER1"  >>>>  2005.0327    ( March 27th )
 

2°) Julian Calendar
 

Data Registers: /
Flags: /
Subroutines: /
 

01  LBL "EASTER2"
02  INT
03  ENTER^
04  ENTER^
05  STO M
06  4
07  MOD
08  X<>Y
09  7
10  MOD
11  ST+ X
12  +
13  ST+ X
14  X<>Y
15  19
16  MOD
17  LASTX
18  *
19  15
20  +
21  30
22  MOD
23  ST- Y
24  X<>Y
25  1
26  -
27  7
28  MOD
29  +
30  9
31  -
32  69
33  X<>Y
34  X>0?
35  +
36  331
37  +
38   E4
39  /
40  0
41  X<> M
42  +
43  END

( 67 bytes / SIZE 000 )
 
 
      STACK        INPUTS      OUTPUTS
           X         YYYY   YYYY.MNDD
           L             /        YYYY

Example:     1243  XEQ "EASTER2"  >>>>   1243.0412     ( April 12th )

Notes:   -This program works for positive years only.
         -However, the rules for finding the date of Easter Sunday were fixed in the 4th century, and only gradually adopted,
  therefore, applying this program to years of the first centuries may be hazardous...
 

3°) Gregorian & Julian Calendars

-These 2 programs may be reduced to a single routine.
-A flag is used to distinguish between the 2 calendars.

Data Registers: /
Flag:    F01               CF 01 = Gregorian calendar
                                   SF 01 = Julian calendar
Subroutines: /
 

  01  LBL "EASTER"
  02  INT
  03  STO M
  04  1
  05  %
  06  INT
  07  ENTER^
  08  STO Z
  09  8
  10  +
  11  25
  12  /
  13  INT
  14  -
  15  1
  16  +
  17  3
  18  /
  19  INT
  20  -
  21  X<>Y
  22  4
  23  /
  24  INT
  25  -
  26  RCL M
  27  19
  28  MOD
  29  STO N
  30  LASTX
  31  *
  32  FC? 01
  33  +
  34  15
  35  +
  36  30
  37  MOD
  38  X<>Y
  39  4
  40  MOD
  41  RCL M
  42   E2
  43  MOD
  44  4
  45  /
  46  INT
  47  +
  48  FS? 01
  49  SIGN
  50  ST+ X
  51  X<>Y
  52  -
  53  RCL M
  54  4
  55  ST+ Z
  56  MOD
  57  FS? 01
  58  ST+ X
  59  FS? 01
  60  CHS
  61  -
  62  RCL M
  63  7
  64  MOD
  65  4
  66  *
  67  FC? 01
  68  CLX
  69  +
  70  7
  71  MOD
  72  +
  73  ST+ L
  74  LASTX
  75  11
  76  *
  77  RCL N
  78  +
  79  451
  80  /
  81  INT
  82  7
  83  *
  84  FS? 01
  85  CLX
  86  -
  87  9
  88  -
  89  69
  90  X<>Y
  91  X>0?
  92  +
  93  331
  94  +
  95   E4
  96  /
  97  RCL M
  98  +
  99  CLA
100  END

( 142 bytes / SIZE 000 )
 
 
      STACK        INPUTS      OUTPUTS
           X         YYYY   YYYY.MNDD
           L             /        YYYY

     ( execution time = 4 seconds )

Examples:        CF 01      2005  XEQ "EASTER"  >>>>    2005.0327
                          SF 01      1243          R/S               >>>>   1243.0412
 
 

References:      Jean Meeus , "Astronomical Algorithms" - Willmann-Bell  -  ISBN 0-943396-35-2
                         Jean Meeus , "Mathematical Astronomy Morsels" - Willmann-Bell  -  ISBN 0-943396-51-4
 
 

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