• Re: minimal Easter 'calculator' for DOS

    From Kerr-Mudd, John@admin@127.0.0.1 to alt.lang.asm,comp.os.msdos.programmer,alt.msdos.batch on Thu Jul 10 22:11:38 2025
    From Newsgroup: alt.lang.asm

    On Fri, 4 Apr 2025 19:35:59 +0100, "Kerr-Mudd, John" <admin@127.0.0.1>
    wrote:

    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)

    Apologies. I'm an asshole. I just wanted to spam the ng.
    I love spamming. Here is more batch code to spam the newsgroup by.
    It's what I do as a troll.

    @echo off
    :: CleverShowEast.bat - a twist on your original
    :: Usage: CleverShowEast yyyy

    :: Check argument by jumping to label with dynamic name
    CALL :CHECKARG %1
    GOTO :EOF

    :CHECKARG
    :: If %1 is empty, jump to usage
    IF "%~1"=="" GOTO USAGE
    :: Get day and month via external tool
    FOR /F "tokens=*" %%i IN ('minEast %~1') DO SET DM=%%i
    :: Compose full date output
    ECHO %DM% %~1
    GOTO :EOF

    :USAGE
    ECHO Usage: %~nx0 yyyy
    ECHO where yyyy is in range 1900-2099
    ECHO Output is Day Month Year
    GOTO :EOF
    --
    Bah, and indeed Humbug.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Kerr-Mudd, John@admin@127.0.0.1 to alt.lang.asm,comp.os.msdos.programmer,alt.msdos.batch on Fri Jul 11 10:38:20 2025
    From Newsgroup: alt.lang.asm

    On Thu, 10 Jul 2025 22:11:38 +0100
    "Kerr-Mudd, John" <admin@127.0.0.1> wrote:

    No, I didn't: I don't have an account at paganini. All my genuine posts
    come from E-S.

    Path: news.eternal-september.org!eternal-september.org! feeder3.eternal-september.org!newsfeed.bofh.team!paganini.bofh.team! not-for-mail From: "Kerr-Mudd, John" <admin@127.0.0.1> Newsgroups: alt.lang.asm,comp.os.msdos.programmer,alt.msdos.batch Subject: Re: minimal Easter 'calculator' for DOS Date: Thu, 10 Jul 2025 22:11:38 +0100
    Organization: To protect and to server
    Message-ID: <104paaa$29865$1@paganini.bofh.team>
    References: <20250323071605.83c8b2b6b1ceb9f0e1e5a89f@127.0.0.1> <20250403210708.e5a73771187a78115466c12e@127.0.0.1> <20250404094643.398f2f1006fc73afe0dbd783@127.0.0.1> <20250404193559.ff0c9854391d776a78103c85@127.0.0.1> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Date: Thu, 10 Jul 2025 21:11:39 -0000 (UTC) Injection-Info: paganini.bofh.team; logging-data="2400453"; posting-host="AbEjU5tLmy6wcFpXuJkJ9A.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA +yjdR4A"; SigSep: is ALWAYS dash dash space newline X-Notice: Filtered by postfilter v. 0.9.3 ;X-no-Archive: Maybe X-Clacks-Overhead: 4GH GNU Terry Pratchett X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
    Xref: news.eternal-september.org alt.lang.asm:8830 comp.os.msdos.programmer:5360 alt.msdos.batch:6185
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Kerr-Mudd, John@admin@127.0.0.1 to alt.lang.asm,comp.os.msdos.programmer on Sun Mar 23 07:16:05 2025
    From Newsgroup: 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.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Kerr-Mudd, John@admin@127.0.0.1 to alt.lang.asm,comp.os.msdos.programmer,alt.msdos.batch on Thu Apr 3 21:07:08 2025
    From Newsgroup: alt.lang.asm

    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.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Kerr-Mudd, John@admin@127.0.0.1 to alt.lang.asm,comp.os.msdos.programmer,alt.msdos.batch on Fri Apr 4 09:46:43 2025
    From Newsgroup: alt.lang.asm

    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.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Kerr-Mudd, John@admin@127.0.0.1 to alt.lang.asm,comp.os.msdos.programmer,alt.msdos.batch on Fri Apr 4 19:35:59 2025
    From Newsgroup: alt.lang.asm

    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.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Rosario19@Ros@invalid.invalid to alt.lang.asm on Tue Apr 15 06:47:13 2025
    From Newsgroup: alt.lang.asm

    On Sun, 23 Mar 2025 07:16:05 +0000, "Kerr-Mudd, John" wrote:
    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.
    Here it is the program for calculate the date of Easter, it is the
    traslation in asm of algorithm find in this site: https://web.archive.org/web/20150227133210/http://www.merlyn.demon.co.uk/estralgs.txt
    algo would be:
    ----------------------------------------
    Al Petrofsky, San Mateo County, California, U.S.A., E-mail 2009-05-22
    function Easter20ops(YR) {
    var a = ~~(YR / 100) * 1483 - ~~(YR / 400) * 2225 + 2613;
    var b = ~~((YR % 19 * 3510 + ~~(a / 25) * 319) / 330) % 29;
    return 56 - b - (~~(YR * 5 / 4) + a - b) % 7;
    // To get Month & Day in 23 total arithmetic operations, use:
    // c = 148 - b - (~~(YR * 5 / 4) + a - b) % 7;
    // Month = ~~(c / 31);
    // Day = c % 31 + 1;
    }
    ------------------------------------------
    so this:
    function Easter20ops(YR) {
    var a = ~~(YR / 100) * 1483 - ~~(YR / 400) * 2225 + 2613;
    var b = ~~((YR % 19 * 3510 + ~~(a / 25) * 319) / 330) % 29;
    c = 148 - b - (~~(YR * 5 / 4) + a - b) % 7;
    // Month = ~~(c / 31);
    // Day = c % 31 + 1;
    }
    I not have done many tests on it, I only be sure on Easter of years
    2024 and 2025... It use only integer instructions, no float
    instruction.
    section _DATA use32 public class=DATA
    global _main
    extern _printf
    II02dII02dIIuIn db "%02d-%02d-%u" , 13, 10, 0
    section _BSS use32 public class=BSS
    section _TEXT use32 public class=CODE
    ;0i,4ra,8Par
    ; vi * il valore risultato r a
    ;0k,4j,8i,12b,16ra,20Ival
    align 4
    Easter:
    push ebx
    push esi
    push edi
    push ebp
    mov esi, dword[esp+ 20]
    xor ebp, ebp
    xor ecx, ecx
    xor ebx, ebx
    mov bp, 2613
    mov eax, esi
    mov cl, 100
    mov bx, 1483
    xor edx, edx
    div ecx
    xor edx, edx
    mul ebx
    add ebp, eax
    mov eax, esi
    mov cx, 400
    mov bx, 2225
    xor edx, edx
    div ecx
    xor edx, edx
    mul ebx
    sub ebp, eax
    mov edi, ebp
    xor ecx, ecx
    mov eax, ebp
    mov cl, 25
    mov bx, 319
    xor edx, edx
    div ecx
    xor edx, edx
    mul ebx
    mov ebp, eax
    mov eax, esi
    mov cl, 19
    xor edx, edx
    div ecx
    mov eax, edx
    xor edx, edx
    mov dx, 3510
    mul edx
    add ebp, eax
    mov eax, ebp
    mov bx, 330
    xor edx, edx
    div ebx
    mov cl, 29
    xor edx, edx
    div ecx
    mov ebp, edx
    sub edi, ebp
    mov eax, esi
    mov cl, 5
    mul ecx
    mov cl, 4
    xor edx, edx
    div ecx
    add eax, edi
    mov cl, 7
    xor edx, edx
    div ecx
    xor eax, eax
    mov al, 148
    sub eax, edx
    sub eax, ebp
    mov cl, 31
    xor edx, edx
    div ecx
    inc edx
    mov ah, dl
    pop ebp
    pop edi
    pop esi
    pop ebx
    ret
    align 4
    _main:
    pushad
    mov esi, 2023
    .1: inc esi
    push esi
    call Easter
    add esp, 4
    xor edx, edx
    mov dl, ah
    mov ah, 0
    push esi
    push eax
    push edx
    push II02dII02dIIuIn
    call _printf
    add esp, 16
    .2: cmp esi, 2030
    jbe .1
    popad
    xor eax, eax
    ret
    If the origin file is in easter.asm, it would be compiled used the
    lines
    Nasmw -fobj easter.asm
    bcc32 easter.obj
    where bcc32 is the Borland C compiler, all the program, in .exe, that
    would contain printf function here it would be 54 kb.
    The routine at the start, would have input integer in esp+0x4, and
    return address in esp,
    output in eax, al is the number of the month, ah is the number of the
    day.
    This is the disasm of that:
    00000800 53 push ebx
    00000801 56 push esi
    00000802 57 push edi
    00000803 55 push ebp
    00000804 8B742414 mov esi,[esp+0x14]
    00000808 31ED xor ebp,ebp
    0000080A 31C9 xor ecx,ecx
    0000080C 31DB xor ebx,ebx
    0000080E 66BD350A mov bp,0xa35
    00000812 89F0 mov eax,esi
    00000814 B164 mov cl,0x64
    00000816 66BBCB05 mov bx,0x5cb
    0000081A 31D2 xor edx,edx
    0000081C F7F1 div ecx
    0000081E 31D2 xor edx,edx
    00000820 F7E3 mul ebx
    00000822 01C5 add ebp,eax
    00000824 89F0 mov eax,esi
    00000826 66B99001 mov cx,0x190
    0000082A 66BBB108 mov bx,0x8b1
    0000082E 31D2 xor edx,edx
    00000830 F7F1 div ecx
    00000832 31D2 xor edx,edx
    00000834 F7E3 mul ebx
    00000836 29C5 sub ebp,eax
    00000838 89EF mov edi,ebp
    0000083A 31C9 xor ecx,ecx
    0000083C 89E8 mov eax,ebp
    0000083E B119 mov cl,0x19
    00000840 66BB3F01 mov bx,0x13f
    00000844 31D2 xor edx,edx
    00000846 F7F1 div ecx
    00000848 31D2 xor edx,edx
    0000084A F7E3 mul ebx
    0000084C 89C5 mov ebp,eax
    0000084E 89F0 mov eax,esi
    00000850 B113 mov cl,0x13
    00000852 31D2 xor edx,edx
    00000854 F7F1 div ecx
    00000856 89D0 mov eax,edx
    00000858 31D2 xor edx,edx
    0000085A 66BAB60D mov dx,0xdb6
    0000085E F7E2 mul edx
    00000860 01C5 add ebp,eax
    00000862 89E8 mov eax,ebp
    00000864 66BB4A01 mov bx,0x14a
    00000868 31D2 xor edx,edx
    0000086A F7F3 div ebx
    0000086C B11D mov cl,0x1d
    0000086E 31D2 xor edx,edx
    00000870 F7F1 div ecx
    00000872 89D5 mov ebp,edx
    00000874 29EF sub edi,ebp
    00000876 89F0 mov eax,esi
    00000878 B105 mov cl,0x5
    0000087A F7E1 mul ecx
    0000087C B104 mov cl,0x4
    0000087E 31D2 xor edx,edx
    00000880 F7F1 div ecx
    00000882 01F8 add eax,edi
    00000884 B107 mov cl,0x7
    00000886 31D2 xor edx,edx
    00000888 F7F1 div ecx
    0000088A 31C0 xor eax,eax
    0000088C B094 mov al,0x94
    0000088E 29D0 sub eax,edx
    00000890 29E8 sub eax,ebp
    00000892 B11F mov cl,0x1f
    00000894 31D2 xor edx,edx
    00000896 F7F1 div ecx
    00000898 42 inc edx
    00000899 88D4 mov ah,dl
    0000089B 5D pop ebp
    0000089C 5F pop edi
    0000089D 5E pop esi
    0000089E 5B pop ebx
    0000089F C3 ret
    000008A0
    9F+1 is 160 bytes
    the result for input date from 2024 to 2031
    31-03-2024
    20-04-2025
    05-04-2026
    28-03-2027
    16-04-2028
    01-04-2029
    21-04-2030
    13-04-2031
    I don't know if the algo is precise enought for calculate Easter date
    for what range of years,but in range 1800..3000 it would be ok.
    It is easy some date could return wrong, because for me, moon phases
    are difficult to find 100% precise with a little algo.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Kerr-Mudd, John@admin@127.0.0.1 to alt.lang.asm on Tue Apr 15 10:46:03 2025
    From Newsgroup: alt.lang.asm

    On Tue, 15 Apr 2025 06:47:13 +0200
    Rosario19 <Ros@invalid.invalid> wrote:

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

    Easter in 120 bytes

    [snip my hexdump of 8086 code]

    [snip your 386 code]

    9F+1 is 160 bytes


    []

    Thanks for giving this a go.

    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.
    (my ref: cale1a)

    B7B88EC3B42ACD2188F34B89CDB42ACD2139CD7508FECE38DE750288D753B800 06B71EB93100BA4F0ACD10BEA402BF4602B107A447A447A447AFE360E2F5B700 01DE01DE01DEBF1A01EBE8FEC380FB0B760DB30045B80F2739C57603B30B95B7 00EBAA83C564EBED83ED64EB1B2C4674934874E04874EC2C0474D02C03740879 E7FECB79DAB30B4DB82E0639C573D0B300EBCBCD1686C4984875D2C3E88B00BF E60255529398B3003A06DD0275048A1EDE02881EDF022C0177034D040C88C1B8 6A1DD1E883D602E2F9B107509699F7F15828D101D201D201D201D7D1E8589975 04A240374014A83D21E31C05D5B4038F8750380CE3E3A06DF02750380CE5EFE CA789050D40A08E47502B410E88800AFAFB60058E2D8B10783C768EBD1286329 204D2E4A2E2032303235555789E8B164F6F15098999789EE95B113F6F191F6E5 95B9020089F889FAD3EA29D75789F2D3EA01D641F6F19829C78D430FB11EF6F1 3D061C10E15829C689F0F7D883C00739C87CF9B1032C28770349041F880EDD02 A2DE02585F5D88E208E4750288E250E803005888E0D40AE8000086E03430AA26 083547C34D6F6E54756557656454687246726953617453756E4A616E4665624D 61724170724D61794A756E4A756C4175675365704F63744E6F76446563000000


    Csr L/R for Month up/dn
    Csr U/D for Year up/dn
    Pgup/Pgn for a Century change
    Home to return to current Year/Month
    Esc to Exit
    --
    Bah, and indeed Humbug.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Rosario19@Ros@invalid.invalid to alt.lang.asm on Wed Apr 16 11:40:07 2025
    From Newsgroup: alt.lang.asm

    On Tue, 15 Apr 2025 10:46:03 +0100, "Kerr-Mudd, John" wrote:
    On Tue, 15 Apr 2025 06:47:13 +0200
    Rosario19 <Ros@invalid.invalid> wrote:

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

    Easter in 120 bytes

    [snip my hexdump of 8086 code]

    [snip your 386 code]

    9F+1 is 160 bytes


    []

    Thanks for giving this a go.

    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.
    (my ref: cale1a)

    B7B88EC3B42ACD2188F34B89CDB42ACD2139CD7508FECE38DE750288D753B800 >06B71EB93100BA4F0ACD10BEA402BF4602B107A447A447A447AFE360E2F5B700 >01DE01DE01DEBF1A01EBE8FEC380FB0B760DB30045B80F2739C57603B30B95B7 >00EBAA83C564EBED83ED64EB1B2C4674934874E04874EC2C0474D02C03740879 >E7FECB79DAB30B4DB82E0639C573D0B300EBCBCD1686C4984875D2C3E88B00BF >E60255529398B3003A06DD0275048A1EDE02881EDF022C0177034D040C88C1B8 >6A1DD1E883D602E2F9B107509699F7F15828D101D201D201D201D7D1E8589975 >04A240374014A83D21E31C05D5B4038F8750380CE3E3A06DF02750380CE5EFE >CA789050D40A08E47502B410E88800AFAFB60058E2D8B10783C768EBD1286329 >204D2E4A2E2032303235555789E8B164F6F15098999789EE95B113F6F191F6E5 >95B9020089F889FAD3EA29D75789F2D3EA01D641F6F19829C78D430FB11EF6F1 >3D061C10E15829C689F0F7D883C00739C87CF9B1032C28770349041F880EDD02 >A2DE02585F5D88E208E4750288E250E803005888E0D40AE8000086E03430AA26 >083547C34D6F6E54756557656454687246726953617453756E4A616E4665624D >61724170724D61794A756E4A756C4175675365704F63744E6F76446563000000


    Csr L/R for Month up/dn
    Csr U/D for Year up/dn
    Pgup/Pgn for a Century change
    Home to return to current Year/Month
    Esc to Exit
    it could be some bugs... for example for date 3029 in my opinion see
    some site of moon phases, the date of Easter of the "386 function" can
    be wrong. could be not 22/3/3029
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Kerr-Mudd, John@admin@127.0.0.1 to alt.lang.asm on Wed Apr 16 21:18:52 2025
    From Newsgroup: alt.lang.asm

    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 Tue, 15 Apr 2025 06:47:13 +0200
    Rosario19 <Ros@invalid.invalid> wrote:

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

    Easter in 120 bytes

    [snip my hexdump of 8086 code]

    [snip your 386 code]

    9F+1 is 160 bytes


    []

    Thanks for giving this a go.

    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.
    (my ref: cale1a)

    B7B88EC3B42ACD2188F34B89CDB42ACD2139CD7508FECE38DE750288D753B800 >06B71EB93100BA4F0ACD10BEA402BF4602B107A447A447A447AFE360E2F5B700 >01DE01DE01DEBF1A01EBE8FEC380FB0B760DB30045B80F2739C57603B30B95B7 >00EBAA83C564EBED83ED64EB1B2C4674934874E04874EC2C0474D02C03740879 >E7FECB79DAB30B4DB82E0639C573D0B300EBCBCD1686C4984875D2C3E88B00BF >E60255529398B3003A06DD0275048A1EDE02881EDF022C0177034D040C88C1B8 >6A1DD1E883D602E2F9B107509699F7F15828D101D201D201D201D7D1E8589975 >04A240374014A83D21E31C05D5B4038F8750380CE3E3A06DF02750380CE5EFE >CA789050D40A08E47502B410E88800AFAFB60058E2D8B10783C768EBD1286329 >204D2E4A2E2032303235555789E8B164F6F15098999789EE95B113F6F191F6E5 >95B9020089F889FAD3EA29D75789F2D3EA01D641F6F19829C78D430FB11EF6F1 >3D061C10E15829C689F0F7D883C00739C87CF9B1032C28770349041F880EDD02 >A2DE02585F5D88E208E4750288E250E803005888E0D40AE8000086E03430AA26 >083547C34D6F6E54756557656454687246726953617453756E4A616E4665624D >61724170724D61794A756E4A756C4175675365704F63744E6F76446563000000


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

    it could be some bugs... for example for date 3029 in my opinion see
    some site of moon phases, the date of Easter of the "386 function" can
    be wrong. could be not 22/3/3029

    Thanks, my original prog (OK, using another programmer's algorithm) also
    shows Easter 3029 as that.

    Hmm. Seems some other competition entries give the same.

    https://www.hugi.scene.org/compo/compoold.htm#compo20


    from hc20.txt

    <quote>
    dddd has a value between 1582 and 4100 (but not including). If
    </quote>

    so it should have passed the test.

    And

    https://www.had2know.org/society/easter-date-calculator-tables.html
    (online calculator)
    also gives 22 March.



    Not that I'll be around for that.
    --
    Bah, and indeed Humbug.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Kerr-Mudd, John@admin@127.0.0.1 to alt.lang.asm on Sun Apr 20 17:49:53 2025
    From Newsgroup: alt.lang.asm

    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.
    (my ref: cale1a)

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

    Anyhow, Now more compact (and dropped the (c))

    B7B88EC3B42ACD2188F389CDB42ACD2139CD750438DE74019988D753B80006B7 1EB93100BA4F0ACD10BE8402BF4602B107A447A447A447AFE35FE2F5B7004B01 DE01DE01DE43BF1A01EBE64380FB0C760DB30145B80F2739C57603B30C95EBAC 83C564EBEF83ED64EB1B2C4674964874E24874EC2C0474D32C03740879E7FECB 75DCB30C4DB82E0639C573D2B301EBCDCD1686C4984875D2C3E8740052BFBE02 3A1D75038A6DFF47882D932C027702040C91B86A1DD1E883D602E2F9B1079699 F7F128D101D201D201D2BFE60201D7D1EE589975064A240374014A83D21E5B31 C04038F8750380CE3E3A06BF02750380CE5EFECA789A50D40A08E47502B410E8 7500AFAFB60058E2D8B10783C768EBD1555789E8B164F6F150989789EE95B113 F6F191F6E595B9020089F889FAD3EA29D789F2D3EA01D641F6F19829C58D430F B11EF6F13D061C10E129FE89F0F7D883C00739C87CF9B4042C287704FECC041F A3BD02585F5D88E208E4750288E250E803005888E0D40AE8000086E03430AA26 083547C34D6F6E54756557656454687246726953617453756E4A616E4665624D 61724170724D61794A756E4A756C4175675365704F63744E6F76446563

    Today is also Easter Sunday, the hilite combines so it's shown as yellow on white.


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

    --
    Bah, and indeed Humbug.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Kerr-Mudd, John@admin@127.0.0.1 to alt.lang.asm,comp.msdos.programmer on Wed Apr 23 11:39:19 2025
    From Newsgroup: alt.lang.asm

    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!
    []
    []

    Anyhow, Now more compact (and dropped the (c))

    []
    Embarrassingly wrong for Jan Feb; code deleted




    Csr L/R for Month up/dn
    Csr U/D for Year up/dn
    Pgup/Pgn 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.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Kerr-Mudd, John@admin@127.0.0.1 to alt.lang.asm,comp.os.msdos.programmer on Thu Apr 24 10:34:36 2025
    From Newsgroup: 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.
    --- Synchronet 3.21d-Linux NewsLink 1.2