Miscellaneous > 16 bit DOS Programming

Easter Formula

(1/7) > >>

Gunther:
Calendar questions are not simple, as they are closely entangled with both astronomical phenomena and religious circumstances. The EASTER.EXE program calculates the correct Easter date for a given
year after 1582. It is written with PB 3.5; the Easter calculation is done in assembly language with JWASM for DOS.

The EASTER.PDF file contains some background information. Hopefully, these are comprehensible. I've made every effort to be factually correct. But the subject is really difficult and I didn't want to go into
too much detail. Did I succeed in doing that? I don't know. Some feedback on this would be nice.

The output of the program looks like that:

--- Code: ---Application EASTER:
===================

This program performs astronomical  and calendar calculations. First,
the date of Easter for an arbitrary year after 1582. The year must be
entered as an integer, otherwise the result will be nonsense.

Easter Sunday for the chosen year: April 17, 2022

Please, press any key to end the application...

--- End code ---
In the text EASTER.PDF are mentioned boundary cases; these are of course calculated correctly. Here are the results for the lower limit:

* Easter Sunday for the chosen year: March 22, 1818
* Easter Sunday for the chosen year: March 22, 2285For the upper limit applies:

* Easter Sunday for the chosen year: April 25, 1943
* Easter Sunday for the chosen year: April 25, 2038The application only needs an 80386 and should therefore run under many DOS configurations. This, of course, must be tested. Any help for this I'm grateful.

learn64bit:
Win3.1 + MS-DOS5.0 works ok.

Gunther:

--- Quote from: learn64bit on October 29, 2022, 06:21:19 PM ---Win3.1 + MS-DOS5.0 works ok.

--- End quote ---

Thank you for the answer and your help.  :thumbsup: Did you also read the background information in EASTER.PDF? Was that helpful?

But allow me to ask you one more question: On which machine are you still running Windows 3.1 -- obviously not 3.11 -- and DOS 5.0? That' s something you really
don't find very often these days.

HSE:
Hi Gunther!

 :thumbsup: Very interesting.

Perhaps "However, in that formula" could be better than "However, in this formula", because I was thinking in this program. :biggrin:

I think something is missing in: "avoiding the need for an exception." ( the need ... to prevent known exception ocurrences, exception catch, ¿?)

Regards, HSE.

Gunther:
HSE,

thank you for your response.   :cool:


--- Quote from: HSE on October 30, 2022, 05:38:27 AM ---Perhaps "However, in that formula" could be better than "However, in this formula", because I was thinking in this program. :biggrin:

--- End quote ---

Is that in EASTER.PDF or in the source code?


--- Quote from: HSE on October 30, 2022, 05:38:27 AM ---I think something is missing in: "avoiding the need for an exception." ( the need ... to prevent known exception ocurrences, exception catch, ¿?)

--- End quote ---

That's probably correct. The Gaussian Easter formula mentioned in EASTER.PDF can be used in both the Julian and the Gregorian calendar. But there's a price to pay for that.
Although the Gaussian Easter formula elegantly summarizes the Easter algorithm, the specification of the latest Easter Sunday as April 25, contained in two exception rules,
is not captured by the formula itself. In other words: The Gaussian formula needs exceptional rules.

This is not the case with the Easter formula I've been using. However, this formula works only for the Gregorian calendar. Therefore, the program rejects any year before 1583.
Was that your point of critique?

Navigation

[0] Message Index

[#] Next page

Go to full version