• minimal Easter 'calculator' for DOS

    From Kerr-Mudd, John@21:1/5 to All on Sun Mar 23 07:16:05 2025
    XPost: alt.lang.asm

    Easter in 120 bytes

    minEast.com:

    debug format:
    d 100 l78
    1639:0100 B9 04 00 BE-82 00 BF 65-01 31 ED B3-0A AC 2C 30 .......e.1....,0 1639:0110 98 72 07 95-F7 E3 01 C5-E2 F3 89 E8-B1 13 99 F7 .r.............. 1639:0120 F1 88 D3 8A-19 8D 86 94-F8 89 C2 D1-E8 D1 E8 01 ................ 1639:0130 D0 83 C0 03-01 D8 99 B1-07 F7 F1 89-C8 28 D0 75 .............(.u 1639:0140 01 91 00 D8-B2 33 3C 1F-76 03 2C 1F-42 57 D4 0A .....3<.v.,.BW.. 1639:0150 35 30 30 86-E0 AB B0 20-AA 92 AA B8-20 24 AB 5A 500.... .... $.Z 1639:0160 B4 09 CD 21-C3 2D 22 17-2A 1F 31 27-1C 2F 24 19 ...!.-".*.1'./$. 1639:0170-2C 21 16 29-1E 30 26 1B ,!.).0&.
    q

    Hexdump format: B90400BE8200BF650131EDB30AAC2C3098720795F7E301C5E2F389E8B11399F7 F188D38A198D8694F889C2D1E8D1E801D083C00301D899B107F7F189C828D075 019100D8B2333C1F76032C1F4257D40A35303086E0ABB020AA92AAB82024AB5A B409CD21C32D22172A1F31271C2F24192C2116291E30261B

    valid only for 1900-2099 (tested)

    Uses a fixed GN table taken from https://boyet.com/blog/calculating-the-date-of-easter-for-a-particular-year/


    Due to cutbacks there's no easter egg inside, sorry.

    The program deliberately doesn't add a crlf (just a space), so one can
    append the year by running in batch i.e.


    @echo off
    @rem showeast.bat
    if @%1 == @ goto Usage
    rem put 'day mth'
    minEast %1
    rem add 'year'
    echo %1
    goto :Exit
    :Usage
    echo Usage is: %0 yyyy
    echo where yyyy is in range 1900-2099
    echo Output is Day Month Year
    :Exit


    Example:

    showeast 2025
    20 4 2025



    For those of you with the strange date format 'm d yyyy'
    that'd be April 20th this year.



    --
    Bah, and indeed Humbug.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kerr-Mudd, John@21:1/5 to John" on Thu Apr 3 21:07:08 2025
    XPost: alt.lang.asm, alt.msdos.batch

    On Sun, 23 Mar 2025 07:16:05 +0000
    "Kerr-Mudd, John" <admin@127.0.0.1> wrote:

    Bigger range Easter program [111] bytes

    minEast2.com:

    debug format:
    d 100 l6f
    1639:0100 99 89 C5 BF-0A 00 BE 82-00 98 01 E8-88 FB 88 CF ................ 1639:0110 89 C1 F7 E7-95 AC 2C 30-73 EF 91 B2-13 F6 F2 92 ......,0s....... 1639:0120 F6 E6 96 88-D8 89 C3 89-C2 B1 02 D3-EA 29 D3 53 .............).S 1639:0130 41 D3 ED F6-F1 28 C3 8D-40 0F B9 1E-00 F6 F1 3D A....(..@......= 1639:0140 06 1C 10 E1-58 29 E8 83-C0 07 39 C8-7C F9 BB 20 ....X)....9.|.. 1639:0150 34 2C 28 77-04 FE CF 04-1F B2 F9 89-D7 D4 0A 35 4,(w...........5 1639:0160 30 30 86-E0 AB 93 AB-B0 24 AB B4-09 CD 21 C3 00......$....!.
    q


    Hexdump format:
    99 89 C5 BF 0A 00 BE 82 00 98 01 E8 88 FB 88 CF
    89 C1 F7 E7 95 AC 2C 30 73 EF 91 B2 13 F6 F2 92
    F6 E6 96 88 D8 89 C3 89 C2 B1 02 D3 EA 29 D3 53
    41 D3 ED F6 F1 28 C3 8D 40 0F B9 1E 00 F6 F1 3D
    06 1C 10 E1 58 29 E8 83 C0 07 39 C8 7C F9 BB 20
    34 2C 28 77 04 FE CF 04 1F B2 F9 89 D7 D4 0A 35
    30 30 86 E0 AB 93 AB B0 24 AB B4 09 CD 21 C3


    valid for 1753-4000 (tested 1753 - 2099)

    Uses Oudin's Algorithm, with code taken from Hugo Size Coding Compo #20
    runner up Sergo Polsky


    The program deliberately doesn't add a crlf (just a space), so one can
    append the year by running in batch i.e.


    showeast.bat

    @echo off
    @rem showeast.bat
    if @%1 == @ goto Usage
    rem put 'day mth'
    minEast %1
    rem add 'year'
    echo %1
    goto :EOF
    :Usage
    echo Usage is: %0 yyyy
    echo where yyyy is in range 1900-2099
    echo Output is Day Month Year



    Example:

    showeast 2025
    20 4 2025



    For those of you with the strange date format 'm d yyyy'
    that'd be April 20th this year.



    --
    Bah, and indeed Humbug.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kerr-Mudd, John@21:1/5 to John" on Fri Apr 4 09:46:43 2025
    XPost: alt.lang.asm, alt.msdos.batch

    Updated to correct batch file:

    On Thu, 3 Apr 2025 21:07:08 +0100
    "Kerr-Mudd, John" <admin@127.0.0.1> wrote:

    On Sun, 23 Mar 2025 07:16:05 +0000
    "Kerr-Mudd, John" <admin@127.0.0.1> wrote:

    Bigger range Easter program [111] bytes

    minEast2.com:

    debug format:
    d 100 l6f
    1639:0100 99 89 C5 BF-0A 00 BE 82-00 98 01 E8-88 FB 88 CF ................ 1639:0110 89 C1 F7 E7-95 AC 2C 30-73 EF 91 B2-13 F6 F2 92 ......,0s....... 1639:0120 F6 E6 96 88-D8 89 C3 89-C2 B1 02 D3-EA 29 D3 53 .............).S 1639:0130 41 D3 ED F6-F1 28 C3 8D-40 0F B9 1E-00 F6 F1 3D A....(..@......= 1639:0140 06 1C 10 E1-58 29 E8 83-C0 07 39 C8-7C F9 BB 20 ....X)....9.|.. 1639:0150 34 2C 28 77-04 FE CF 04-1F B2 F9 89-D7 D4 0A 35 4,(w...........5 1639:0160 30 30 86-E0 AB 93 AB-B0 24 AB B4-09 CD 21 C3 00......$....!.
    q


    Hexdump format:
    99 89 C5 BF 0A 00 BE 82 00 98 01 E8 88 FB 88 CF
    89 C1 F7 E7 95 AC 2C 30 73 EF 91 B2 13 F6 F2 92
    F6 E6 96 88 D8 89 C3 89 C2 B1 02 D3 EA 29 D3 53
    41 D3 ED F6 F1 28 C3 8D 40 0F B9 1E 00 F6 F1 3D
    06 1C 10 E1 58 29 E8 83 C0 07 39 C8 7C F9 BB 20
    34 2C 28 77 04 FE CF 04 1F B2 F9 89 D7 D4 0A 35
    30 30 86 E0 AB 93 AB B0 24 AB B4 09 CD 21 C3


    valid for 1753-4000 (tested 1753 - 2099)

    Uses Oudin's Algorithm, with code taken from Hugo Size Coding Compo #20 runner up Sergo Polsky


    The program deliberately doesn't add a crlf (just a space), so one can append the year by running in batch i.e.


    showeast.bat

    @echo off
    @rem showeast.bat
    if @%1 == @ goto Usage
    rem put 'day mth'
    minEast %1
    minEast2 %1
    rem add 'year'
    echo %1
    goto :EOF
    :Usage
    echo Usage is: %0 yyyy
    echo where yyyy is in range 1900-2099
    echo where yyyy is in range 1753-4000
    echo Output is Day Month Year



    Example:

    showeast 2025
    20 4 2025



    For those of you with the strange date format 'm d yyyy'
    that'd be April 20th this year.





    --
    Bah, and indeed Humbug.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kerr-Mudd, John@21:1/5 to John" on Fri Apr 4 19:35:59 2025
    XPost: alt.lang.asm, alt.msdos.batch

    On Fri, 4 Apr 2025 09:46:43 +0100
    "Kerr-Mudd, John" <admin@127.0.0.1> wrote:

    Cheaper again!

    On Sun, 23 Mar 2025 07:16:05 +0000
    "Kerr-Mudd, John" <admin@127.0.0.1> wrote:

    Bigger range Easter program [111] bytes

    minEast2.com:

    feh: I put up code I've been poring over for days, then next day
    find a shorter way:

    (my ref: minease7, anyone following this should name it mineast2 if
    using the batch below)

    [106 bytes]

    d 100 l6A
    1639:0100 99 BF 0A 00-BE 82 00 01-D0 89 EB 89-CD 89 C1 F7 ................ 1639:0110 E7 92 AC 2C-30 73 F0 91-B1 13 F6 F1-91 F6 E5 96 ...,0s.......... 1639:0120 B9 02 00 89-D8 89 C5 D3-ED 29 EB 53-41 D3 EA F6 .........).SA... 1639:0130 F1 28 C3 8D-40 0F B1 1E-F6 F1 3D 06-1C 10 E1 58 .(..@.....=....X 1639:0140 29 D0 83 C0-07 39 C8 7C-F9 BB 20 34-2C 28 77 04 )....9.|.. 4,(w. 1639:0150 FE CF 04 1F-B2 F9 89 D7-D4 0A 35 30-30 86 E0 AB ..........500... 1639:0160 93 AB-B4 24 AB B4-09 CD 21 C3 ...$....!.
    q

    99BF 0A00 BE82 0001 D089 EB89 CD89 C1F7 E792 AC2C 3073 F091 B113 F6F1 91F6
    E596 B902 0089 D889 C5D3 ED29 EB53 41D3 EAF6 F128 C38D 400F B11E F6F1 3D06
    1C10 E158 29D0 83C0 0739 C87C F9BB 2034 2C28 7704 FECF 041F B2F9 89D7 D40A
    3530 3086 E0AB 93AB B424 ABB4 09CD 21C3


    valid for 1753-4000 (tested 1753 - 2099)

    Uses Oudin's Algorithm, with code taken from Hugo Size Coding Compo #20 runner up Sergo Polsky


    The program deliberately doesn't add a crlf (just a space), so one can append the year by running in batch i.e.


    showeast.bat

    @echo off
    @rem showeast.bat
    if @%1 == @ goto Usage
    rem put 'day mth'
    minEast2 %1
    rem add 'year'
    echo %1
    goto :EOF
    :Usage
    echo Usage is: %0 yyyy
    echo where yyyy is in range 1753-4000
    echo Output is Day Month Year



    Example:

    showeast 2025
    20 4 2025



    For those of you with the strange date format 'm d yyyy'
    that'd be April 20th this year.



    --
    Bah, and indeed Humbug.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kerr-Mudd, John@21:1/5 to John" on Thu Apr 24 10:34:36 2025
    XPost: alt.lang.asm

    On Wed, 23 Apr 2025 11:39:19 +0100
    "Kerr-Mudd, John" <admin@127.0.0.1> wrote:

    On Sun, 20 Apr 2025 17:49:53 +0100
    "Kerr-Mudd, John" <admin@127.0.0.1> wrote:

    On Wed, 16 Apr 2025 21:18:52 +0100
    "Kerr-Mudd, John" <admin@127.0.0.1> wrote:

    On Wed, 16 Apr 2025 11:40:07 +0200
    Rosario19 <Ros@invalid.invalid> wrote:

    On Tue, 15 Apr 2025 10:46:03 +0100, "Kerr-Mudd, John" wrote:

    []

    On Sun, 23 Mar 2025 07:16:05 +0000, "Kerr-Mudd, John" wrote:



    I've incorporated the Easter algo into my Csr Cal prog:

    It now shows Today's date on a cyan background, Easter Sunday on a purple
    one.

    []
    04A240374014A83D21E31C05D5B4038F8750380CE3E3A06DF02750380CE5EFE
    Oops! Missing digit. I must look into my hexdump code!

    Sorted, was using cl as a non-zero, but it /is/ zero at one point!
    []
    Now using dl (a constant) as the nz toggle value

    Hex (En/Decoder)

    hex -d 2 <hex.com
    A083 003C 6874 7731 EDB4 3FB5 3CBA DF01 CD21 91E3 0389 D6BF C33F 57A0 8300
    3C64 753C 8A36 8500 80EE 3175 02B2 EFAC 43D4 1086 E027 04F0 1440 AA30 D775
    F420 D375 06B8 0D0A ABEB 0784 F375 03B0 20AA E2DD 5AB3 0189 F929 D1B4 40CD
    214B EBAB AC3C 3072 1709 ED74 1288 C695 244F D437 30CF 75F5 88F4 D510 AA31
    C095 E2E2 EBD2 B409 BA89 01CD 21C3 0D0A 0A55 7361 6765 2069 733A 0D0A 6865
    7820 2D64 205B 7370 5D3C 666E 2E63 6F6D 0D0A 2073 703D 7B30 2C31 2C32 2C34
    2C38 2C40 7D0D 0A6F 720D 0A68 6578 202D 723C 666E 2E68 6578 3E66 6E2E 636F
    6D0D 0A24 4750 4C20 4D4A 3230 3234




    (Cursor driven Calendar)

    Csr L/R for Month up/dn
    Csr U/D for Year up/dn
    Pgup/PgDn for a Century change
    Home to return to current Year/Month
    Esc to Exit

    (my ref: cale2b7)

    Corrected:

    B7B88EC3B42ACD21 88F389CDB42ACD21 39CD750438DE7401 9988D753B80006B7 1EB93100BA4F0ACD 10BE9702BF4602B1 07A447A447A447AF E35FE2F5B7004B01 DE01DE01DE43BF1A 01EBE64380FB0C76 0DB30145B80F2739 C57603B30C95EBAC 83C564EBEF83ED64 EB1B2C4674964874 E24874EC2C0474D3 2C03740879E7FECB 75DCB30C4DB82E06 39C573D2B301EBCD CD1686C4984875D2 C3E88700BFD1023A 1D75038A6DFF886D 01932C029192770D 80C10C4EBAFDFF24 0375024E42B86A1D D1E883D602E2F9B1 07965299F7F128D1 01D201D201D2BFE6 0201D75A31C0D1EE 74019983D21E5B40 38F8750380CE3E3A 06D202750380CE5E FECA789450D40A08 E47502B410E88200 AFAFB60058E2D8B1 0783C768EBD12863 29204D2E4A2E2032 303235555789E8B1 64F6F150989789EE 95B113F6F191F6E5 95B9020089F889FA D3EA29D789F2D3EA 01D641F6F19829C5 8D430FB11EF6F13D 061C10E129FE89F0 F7D883C00739C87C F9B4042C287704FE CC041FA3D002585F 5D88E208E4750288 E250E803005888E0 D40AE8000086E034 30AA26083547C34D 6F6E547565576564 5468724672695361 7453756E4A616E46 65624D6172417072 4D61794A756E4A75 6C4175675365704F 63744E6F76446563




    --
    Bah, and indeed Humbug.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)