home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.hp48
- Path: sparky!uunet!think.com!sdd.hp.com!apollo.hp.com!hpwin052!hpqmoea!jdg
- From: jdg@hpqtdla.sqf.hp.com (James Gentles)
- Subject: Re: HP48 + RPL + stereo system = super duper alarm clock
- Sender: news@hpqmoea.sqf.hp.com (SQF News Admin)
- Message-ID: <BznM6K.Ks6@hpqmoea.sqf.hp.com>
- Date: Tue, 22 Dec 1992 09:25:32 GMT
- References: <1h6e7iINN2cn@iskut.ucs.ubc.ca>
- Organization: Hewlett-Packard LTD, South Queensferry, Scotland
- Lines: 82
-
- From HP-28%VM1.NoDak.EDU@hplb.hpl.hp.com Tue Feb 26 11:45 GMT 1991
- Received: from vm1.NoDak.edu by hplb.hpl.hp.com; Tue, 26 Feb 91 11:43:54 GMT
- From: Pat Corbo <E00159%ICNUCEVM.CNUCE.CNR.IT%VM1.NoDak.EDU@hplb.hpl.hp.com>
- Subject: Easter
- To: Multiple recipients of list HP-28 <HP-28@NDSUVM1>
-
- The following programme calculateEaster by using Gauss's alghoritme.
- The checksum is BB5D.
- Input:
- 1: Year
-
- EASTER
- _______________________________________
- :
- << CLLCD -> YEAR << YEAR 19 MOD YEAR :
- 4 MOD YEAR 7 MOD 0 0 -> a b c d m :
- << '19*a +24' EVAL 30 MOD 'd' STO :
- '5+2*b+4*c+6*d' EVAL 7 MOD d + :
- 'm' STO "EASTER " YEAR ->STR + :
- 1 DISP IF m 9 <= THEN 22 m + ->STR :
- " MARCH" + 2 DISP ELSE m 9 - 'm' :
- STO IF m 26 == THEN "19 APRIL" :
- 2 DISP ELSE IF m 25 == d 28 == AND :
- THEN "18 APRIL" 2 DISP ELSE m :
- ->STR " APRIL" + 2 DISP END END :
- END >> >> :
- ______________________________________:
-
- Based on this HP28 Posting...
- There follows a HP48 routine to compute Easter It accepts either the year
- or the date in current format. Internally the routine uses European format,
- dd.mmyyyy, and then at the end checks current format with flag -42, and
- changes accordingly using a small routine to swap day and month D<-->M
- (Sorry, I haven't included this small routine, its not a big deal) For your
- application, you will be changing the IO anyway I guess.
- The output is a date in current date format on the stack.
- Happy Christmas!
- James
- ------------------cut here estr ------------------------------------------
- %%HP: T(3)A(D)F(.);
- \<<
- IF DUP 100 >
- THEN 1000000 /
- END .01 MOD DUP
- 1000000 * DUP 19
- MOD 19 * 24 + 30
- MOD DUP 6 * ROT DUP
- 4 MOD 2 * SWAP 7
- MOD 4 * + + 5 + 7
- MOD OVER + \-> d m
- \<<
- IF m 9 \<=
- THEN 22 m + .03 +
- ELSE m 9 - 'm' STO
- IF m 26 ==
- THEN 19.04
- ELSE
- IF m 25 == d 28 == AND
- THEN 18.04
- ELSE m .04 +
- END
- END
- END +
- IF -42 FC?
- THEN D\<-\->M
- END
- \>>
- \>>
- ------------------cut here estr ------------------------------------------
- I have no professional connection with Hewlett-Packard's
- calculator operations other than as a user of their products.
- ------------------------------------------------------------------------
- Opinions expressed are my own, and are not intended to be an official
- statement by Hewlett-Packard Company/Limited
- ------------------------------------------------------------------------
- "To strive, to seek, to find, and not to yield." Ulysses, Tennyson.
- ------------------------------------------------------------------------
- James Gentles Hewlett Packard, Amateur: GM4WZP
- Queensferry Telecoms Division QTD, Email: jdg@hpsqf.sqf.hp.com
- Station Road, South Queensferry, HPDESK: James Gentles / HP1400
- West Lothian, Scotland, EH30 9XR. Phone: +44 31 331 7663, FAX: ~7488
- ------------------------------------------------------------------------
-