On Wed, 11 Nov 2020 11:11:24 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,JohnOn Wed, 11 Nov 2020 11:08:16 GMT, wolfgang kern
Post by wolfgang kernPost by Kerr-Mudd,JohnOn Sun, 01 Nov 2020 16:21:58 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,JohnPost by Kerr-Mudd,John512 bytes ; OK to y31k (I think). (oh, I also managed to keep the
'accepts "monthname"' code).
Am I talking to myself?
Yes you are; it's a 9999 limit actually, mostly because the year
print is limited to 4 chars (but to print 5 would blow my
self=imposed 512 limit).
Ah well; if Wolfgang (or anyone else) is bored, here's my best to
date; I had hoped to squeeze it down enough to allow e.g." Monday" as
a start of week; sadly only "+1" style is allowed.
Sorry since "retired" I have much lesser time for such games, there
are so many unsolved lines on my ToDo which I wanted to do after
active era. Much more than a single oldie could do within 2..3 decades
:)
Post by Kerr-Mudd,JohnFull calendar if just year input otherwise just the month for the
year specified or current month of current year if no parameters.
Relies in DOS fn 2A for default date and fn 9 for print.
31EDBE8100AC3C20726077F94EAC3C20725874F93C40773A3C2B7503B780464E
BF0A0031C931C09199F7E701C1AC3C3A7730982C3073F0E3299108FF79083C07
732088C7EBC683F80C770488C3EBBD95EBBAAD0D2020BF9902B10C4347AFE0FB
74A3BABD02B409CD21C3BF24095757B228B020B94C00F3AAB80D0AAB4E75F25F
B42ACD2108DB750609ED751E88F309ED750289CD83C706E8E000E8BD0083C740
E839005A89D0AACD21C383C725E8AA0083C775B3004380FB0C77E8535783C709
E8B70083C74155E812005D5F83C71A5B88D8D403750481C77002EBD988F89893
8DB78B0201DEB10738E17503BE8B02A547E2F583C739F7DB982C0277034D040C
BE6A1D91D1EE83D302E2F9954301C3D1F8D1F801C352B11999F7F129C3D1F8D1
F801D8B10799F7F128D101D701D701D75A95D1EE750580D60228F480D41E4038
C4724750D40A08E47502B410E824004758E2EBB10783C739EBE489E8B9640099
F7F15208D2750288C280E2034AE8010058D40A86E0353030ABC3BE990288D898
4801C601C601C6A5A447C353754D6F547557655468467253614A616E4665624D
61724170724D61794A756E4A756C4175675365704F63744E6F76446563557361
6765206973202263616C207B6D74686E756D7C6D74686E616D657D207B796561
727D207B2B317374646F777D2224
SuMoTuWeThFrSa
JanFebMarAprMayJunJulAugSepOctNovDec
Usage is "cal {mthnum|mthname} {year} {+1stdow}"$
Yeah, with an extreme magnification I can read it. perhaps later.
__
wolfgang
Well, there's no obligation to play. Glad you're keeping busy in your
retirement!
IIRC you have to manually enter the hex into your system; if it helps
here's (a later) debug dump; it's 518 with the day code added. (just 6 to
save!)
162F:0100 31 ED xor bp,bp
162F:0102 BE 81 00 mov si,0081
162F:0105 AC lodsb
162F:0106 3C 20 cmp al,20
162F:0108 72 78 jb 0182
162F:010A 77 F9 ja 0105
162F:010C 4E dec si
162F:010D AC lodsb
162F:010E 3C 20 cmp al,20
162F:0110 72 70 jb 0182
162F:0112 74 F9 jz 010D
162F:0114 3C 40 cmp al,40
162F:0116 77 3A ja 0152
162F:0118 3C 2B cmp al,2B
162F:011A 75 03 jnz 011F
162F:011C B7 80 mov bh,80
162F:011E 46 inc si
162F:011F 4E dec si
162F:0120 BF 0A 00 mov di,000A
162F:0123 31 C9 xor cx,cx
162F:0125 31 C0 xor ax,ax
162F:0127 91 xchg ax,cx
162F:0128 99 cwd
162F:0129 F7 E7 mul di
162F:012B 01 C1 add cx,ax
162F:012D AC lodsb
162F:012E 3C 3A cmp al,3A
162F:0130 77 48 ja 017A
162F:0132 98 cbw
162F:0133 2C 30 sub al,30
162F:0135 73 F0 jnb 0127
162F:0137 E3 41 jcxzw 017A
162F:0139 91 xchg ax,cx
162F:013A 08 FF or bh,bh
162F:013C 79 08 jns 0146
162F:013E 3C 07 cmp al,07
162F:0140 73 38 jnb 017A
162F:0142 88 C7 mov bh,al
162F:0144 EB C6 jmp 010C
162F:0146 83 F8 0C cmp ax,000C
162F:0149 77 04 ja 014F
162F:014B 88 C3 mov bl,al
162F:014D EB BD jmp 010C
162F:014F 95 xchg ax,bp
162F:0150 EB BA jmp 010C
162F:0152 BF A3 02 mov di,02A3
162F:0155 B1 0C mov cl,0C
162F:0157 8B 04 mov ax,[si]
162F:0159 0D 20 20 or ax,2020
162F:015C 99 cwd
162F:015D 42 inc dx
162F:015E 47 inc di
162F:015F AF scasw
162F:0160 E0 FB loopnzw 015D
162F:0162 75 04 jnz 0168
162F:0164 88 D3 mov bl,dl
162F:0166 EB 9D jmp 0105
162F:0168 B1 07 mov cl,07
162F:016A 4E dec si
162F:016B AD lodsw
162F:016C 24 DF and al,DF
162F:016E 99 cwd
162F:016F 4A dec dx
162F:0170 42 inc dx
162F:0171 AF scasw
162F:0172 E0 FC loopnzw 0170
162F:0174 75 04 jnz 017A
162F:0176 88 D7 mov bh,dl
162F:0178 EB 8B jmp 0105
162F:017A BA D5 02 mov dx,02D5
162F:017D B4 09 mov ah,09
162F:017F CD 21 int 21
162F:0181 C3 ret
162F:0182 BF 24 09 mov di,0924
162F:0185 57 push di
162F:0186 57 push di
162F:0187 B2 28 mov dl,28
162F:0189 B0 20 mov al,20
162F:018B B9 4C 00 mov cx,004C
162F:018E F3 AA repz stosb
162F:0190 B8 0D 0A mov ax,0A0D
162F:0193 AB stosw
162F:0194 4E dec si
162F:0195 75 F2 jnz 0189
162F:0197 5F pop di
162F:0198 B4 2A mov ah,2A
162F:019A CD 21 int 21
162F:019C 08 DB or bl,bl
162F:019E 75 06 jnz 01A6
162F:01A0 09 ED or bp,bp
162F:01A2 75 1E jnz 01C2
162F:01A4 88 F3 mov bl,dh
162F:01A6 09 ED or bp,bp
162F:01A8 75 02 jnz 01AC
162F:01AA 89 CD mov bp,cx
162F:01AC 83 C7 06 add di,0006
162F:01AF E8 E0 00 call 0292
162F:01B2 E8 BD 00 call 0272
162F:01B5 83 C7 40 add di,0040
162F:01B8 E8 39 00 call 01F4
162F:01BB 5A pop dx
162F:01BC 89 D0 mov ax,dx
162F:01BE AA stosb
162F:01BF CD 21 int 21
162F:01C1 C3 ret
162F:01C2 83 C7 25 add di,0025
162F:01C5 E8 AA 00 call 0272
162F:01C8 83 C7 75 add di,0075
162F:01CB B3 00 mov bl,00
162F:01CD 43 inc bx
162F:01CE 80 FB 0C cmp bl,0C
162F:01D1 77 E8 ja 01BB
162F:01D3 53 push bx
162F:01D4 57 push di
162F:01D5 83 C7 09 add di,0009
162F:01D8 E8 B7 00 call 0292
162F:01DB 83 C7 41 add di,0041
162F:01DE 55 push bp
162F:01DF E8 12 00 call 01F4
162F:01E2 5D pop bp
162F:01E3 5F pop di
162F:01E4 83 C7 1A add di,001A
162F:01E7 5B pop bx
162F:01E8 88 D8 mov al,bl
162F:01EA D4 03 aam 03
162F:01EC 75 04 jnz 01F2
162F:01EE 81 C7 70 02 add di,0270
162F:01F2 EB D9 jmp 01CD
162F:01F4 88 F8 mov al,bh
162F:01F6 98 cbw
162F:01F7 93 xchg ax,bx
162F:01F8 8D B7 C7 02 lea si,[bx+02C7]
162F:01FC 01 DE add si,bx
162F:01FE B1 07 mov cl,07
162F:0200 38 E1 cmp cl,ah
162F:0202 75 03 jnz 0207
162F:0204 BE C7 02 mov si,02C7
162F:0207 A5 movsw
162F:0208 47 inc di
162F:0209 E2 F5 loopw 0200
162F:020B 83 C7 39 add di,0039
162F:020E F7 DB neg bx
162F:0210 98 cbw
162F:0211 2C 02 sub al,02
162F:0213 77 03 ja 0218
162F:0215 4D dec bp
162F:0216 04 0C add al,0C
162F:0218 BE 6A 1D mov si,1D6A
162F:021B 91 xchg ax,cx
162F:021C D1 EE shr si,1
162F:021E 83 D3 02 adc bx,0002
162F:0221 E2 F9 loopw 021C
162F:0223 95 xchg ax,bp
162F:0224 43 inc bx
162F:0225 01 C3 add bx,ax
162F:0227 D1 F8 sar ax,1
162F:0229 D1 F8 sar ax,1
162F:022B 01 C3 add bx,ax
162F:022D 52 push dx
162F:022E B1 19 mov cl,19
162F:0230 99 cwd
162F:0231 F7 F1 div cx
162F:0233 29 C3 sub bx,ax
162F:0235 D1 F8 sar ax,1
162F:0237 D1 F8 sar ax,1
162F:0239 01 D8 add ax,bx
162F:023B B1 07 mov cl,07
162F:023D 99 cwd
162F:023E F7 F1 div cx
162F:0240 28 D1 sub cl,dl
162F:0242 01 D7 add di,dx
162F:0244 01 D7 add di,dx
162F:0246 01 D7 add di,dx
162F:0248 5A pop dx
162F:0249 95 xchg ax,bp
162F:024A D1 EE shr si,1
162F:024C 75 05 jnz 0253
162F:024E 80 D6 02 adc dh,02
162F:0251 28 F4 sub ah,dh
162F:0253 80 D4 1E adc ah,1E
162F:0256 40 inc ax
162F:0257 38 C4 cmp ah,al
162F:0259 72 47 jb 02A2
162F:025B 50 push ax
162F:025C D4 0A aam 0A
162F:025E 08 E4 or ah,ah
162F:0260 75 02 jnz 0264
162F:0262 B4 10 mov ah,10
162F:0264 E8 24 00 call 028B
162F:0267 47 inc di
162F:0268 58 pop ax
162F:0269 E2 EB loopw 0256
162F:026B B1 07 mov cl,07
162F:026D 83 C7 39 add di,0039
162F:0270 EB E4 jmp 0256
162F:0272 89 E8 mov ax,bp
162F:0274 B9 64 00 mov cx,0064
162F:0277 99 cwd
162F:0278 F7 F1 div cx
162F:027A 52 push dx
162F:027B 08 D2 or dl,dl
162F:027D 75 02 jnz 0281
162F:027F 88 C2 mov dl,al
162F:0281 80 E2 03 and dl,03
162F:0284 4A dec dx
162F:0285 E8 01 00 call 0289
162F:0288 58 pop ax
162F:0289 D4 0A aam 0A
162F:028B 86 E0 xchg ah,al
162F:028D 35 30 30 xor ax,3030
162F:0290 AB stosw
162F:0291 C3 ret
162F:0292 BE A3 02 mov si,02A3
162F:0295 88 D8 mov al,bl
162F:0297 98 cbw
162F:0298 48 dec ax
162F:0299 01 C6 add si,ax
162F:029B 01 C6 add si,ax
162F:029D 01 C6 add si,ax
162F:029F A5 movsw
162F:02A0 A4 movsb
162F:02A1 47 inc di
162F:02A2 C3 ret
--
Bah, and indeed, Humbug.