Discussion:
Calendar program
(too old to reply)
Kerr-Mudd,John
2020-10-08 11:19:09 UTC
Permalink
I found an old cal.com (900 bytes)
cal /? gives
CAL 1.07 Freeware
Copyright 1998, Charles Dye

CAL
CAL mm/yyyy
CAL yyyy

; I have another 856 byte one
cal /? gives
Unknown month or year. Example usage: "cal march 83"

which shows how long ago it was written!

I have rewritten it to the same spec:
cal (uses current mth&year)
cal mthname (uses current year and mthname)
cal mthname year (uses year and mthname)

current byte count is down to 465
cal fEb
February 2020

Sun Mon Tue Wed Thu Fri Sat

1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29


DOS dependencies:
Int 21 fn 2A for curr yr/mth (if full yr/mth not specced)
Int 21 fn 09 to print.
--
Bah, and indeed, Humbug.
wolfgang kern
2020-10-08 12:11:05 UTC
Permalink
Post by Kerr-Mudd,John
I found an old cal.com (900 bytes)
cal /? gives
CAL 1.07 Freeware
Copyright 1998, Charles Dye
CAL
CAL mm/yyyy
CAL yyyy
; I have another 856 byte one
cal /? gives
Unknown month or year. Example usage: "cal march 83"
which shows how long ago it was written!
cal (uses current mth&year)
cal mthname (uses current year and mthname)
cal mthname year (uses year and mthname)
current byte count is down to 465
cal fEb
February 2020
Sun Mon Tue Wed Thu Fri Sat
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
Int 21 fn 2A for curr yr/mth (if full yr/mth not specced)
Int 21 fn 09 to print.
In my OS there is a running wall clock which can be set to various
output forms, the default is a two liner:
[Fr Oct.09.20]
[23:59:59.999]
It initially reads direct from RTCL, it calculates DayOfWeek and the
Milli-Seconds join in from the PIT (which is synchronized by RTCL).
Together with the few bytes in the IRQ-routines it's about 512 byte.

And it can be (ab)used to display DOW of any date (based anno 1800).
__
wolfgang
Terje Mathisen
2020-10-08 15:10:49 UTC
Permalink
Post by Kerr-Mudd,John
I found an old cal.com (900 bytes)
cal /? gives
CAL 1.07 Freeware
Copyright 1998, Charles Dye
CAL
CAL mm/yyyy
CAL yyyy
; I have another 856 byte one
cal /? gives
Unknown month or year. Example usage: "cal march 83"
which shows how long ago it was written!
cal (uses current mth&year)
cal mthname (uses current year and mthname)
cal mthname year (uses year and mthname)
current byte count is down to 465
cal fEb
February 2020
Sun Mon Tue Wed Thu Fri Sat
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
Int 21 fn 2A for curr yr/mth (if full yr/mth not specced)
Int 21 fn 09 to print.
You do realize that weeks are supposed to start on Monday, right? :-)

My favorite start-of-week bug happens about every 7 years, when week
numbers differ by one depending upon which country you are in. :-(

Terje
--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"
Kerr-Mudd,John
2020-10-09 16:08:31 UTC
Permalink
On Thu, 08 Oct 2020 11:19:09 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
I found an old cal.com (900 bytes)
cal /? gives
CAL 1.07 Freeware
Copyright 1998, Charles Dye
CAL
CAL mm/yyyy
CAL yyyy
uses 2 char days:

C:\>cal 2 2012

Feb 2012
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29

[newcal]
Post by Kerr-Mudd,John
cal (uses current mth&year)
cal mthname (uses current year and mthname)
cal mthname year (uses year and mthname)
current byte count is down to 465
459 - no jmps


C:\>d:newcal7 feb 2012

February 2012

Sun Mon Tue Wed Thu Fri Sat

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29


I could probably^w undoubtedly save more by reducing the 'day' size, and
dropping the code to centralise the mth/year title, and text matching on
mthname.

Might be nice to have param of 'year' print a full year calendar.
--
Bah, and indeed, Humbug.
Terje Mathisen
2020-10-09 16:51:42 UTC
Permalink
Post by Kerr-Mudd,John
On Thu, 08 Oct 2020 11:19:09 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
I found an old cal.com (900 bytes)
cal /? gives
CAL 1.07 Freeware
Copyright 1998, Charles Dye
CAL
CAL mm/yyyy
CAL yyyy
C:\>cal 2 2012
Feb 2012
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29
[newcal]
Post by Kerr-Mudd,John
cal (uses current mth&year)
cal mthname (uses current year and mthname)
cal mthname year (uses year and mthname)
current byte count is down to 465
459 - no jmps
C:\>d:newcal7 feb 2012
February 2012
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29
I could probably^w undoubtedly save more by reducing the 'day' size, and
dropping the code to centralise the mth/year title, and text matching on
mthname.
Might be nice to have param of 'year' print a full year calendar.
Make start-of-week configurable, and add week numbers.

In my own CAL.PAS Turbo Pascal program I did this, with a single 1-12
number indicating that month in the current year, year-month to specify
one spcific month and just year to print out all 12 months, with color
coding for weekends and national holidays.

Terje
--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"
Kerr-Mudd,John
2020-10-09 19:24:14 UTC
Permalink
On Fri, 09 Oct 2020 16:51:42 GMT, Terje Mathisen
Post by Terje Mathisen
Post by Kerr-Mudd,John
On Thu, 08 Oct 2020 11:19:09 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
I found an old cal.com (900 bytes)
cal /? gives
CAL 1.07 Freeware
Copyright 1998, Charles Dye
CAL
CAL mm/yyyy
CAL yyyy
C:\>cal 2 2012
Feb 2012
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29
[newcal]
Post by Kerr-Mudd,John
cal (uses current mth&year)
cal mthname (uses current year and mthname)
cal mthname year (uses year and mthname)
current byte count is down to 465
459 - no jmps
C:\>d:newcal7 feb 2012
February 2012
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29
Oh no! how come the lhs is wrong after 11?
Post by Terje Mathisen
Post by Kerr-Mudd,John
I could probably^w undoubtedly save more by reducing the 'day' size, and
dropping the code to centralise the mth/year title, and text matching on
mthname.
Might be nice to have param of 'year' print a full year calendar.
Make start-of-week configurable, and add week numbers.
In my own CAL.PAS Turbo Pascal program I did this, with a single 1-12
number indicating that month in the current year, year-month to specify
one spcific month and just year to print out all 12 months, with color
coding for weekends and national holidays.
Terje
Might be tricky to get under 512 bytes.

Still, if I cut some of the other stuff, it might give me headroom.
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2020-10-10 10:24:58 UTC
Permalink
On Fri, 09 Oct 2020 19:24:14 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Fri, 09 Oct 2020 16:51:42 GMT, Terje Mathisen
[]
Oh no! I've omitted the century test. size goes up!
Post by Kerr-Mudd,John
Post by Terje Mathisen
Make start-of-week configurable, and add week numbers.
In my own CAL.PAS Turbo Pascal program I did this, with a single 1-12
number indicating that month in the current year, year-month to specify
one spcific month and just year to print out all 12 months, with color
coding for weekends and national holidays.
Terje
Might be tricky to get under 512 bytes.
Still, if I cut some of the other stuff, it might give me headroom.
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2020-10-24 11:45:22 UTC
Permalink
On Sat, 10 Oct 2020 10:24:58 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Fri, 09 Oct 2020 19:24:14 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Fri, 09 Oct 2020 16:51:42 GMT, Terje Mathisen
[]
Oh no! I've omitted the century test. size goes up!
Post by Kerr-Mudd,John
Post by Terje Mathisen
Make start-of-week configurable, and add week numbers.
In my own CAL.PAS Turbo Pascal program I did this, with a single 1-12
number indicating that month in the current year, year-month to
specify
Post by Kerr-Mudd,John
Post by Terje Mathisen
one spcific month and just year to print out all 12 months, with color
coding for weekends and national holidays.
Terje
Might be tricky to get under 512 bytes.
Still, if I cut some of the other stuff, it might give me headroom.
OK 494

No week numbers or any holidays or colouring. or century test; valid
1980-2099
But finally! will output a year's calendar. (bug was small & hard to find
- hidden in an ass-umption in dec dx that dh was 0)
Start of week +n OK.
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2020-11-01 11:51:25 UTC
Permalink
On Sat, 24 Oct 2020 11:45:22 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Sat, 10 Oct 2020 10:24:58 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Fri, 09 Oct 2020 19:24:14 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Fri, 09 Oct 2020 16:51:42 GMT, Terje Mathisen
[]
Oh no! I've omitted the century test. size goes up!
Post by Kerr-Mudd,John
Post by Terje Mathisen
Make start-of-week configurable, and add week numbers.
In my own CAL.PAS Turbo Pascal program I did this, with a single
1-12 number indicating that month in the current year, year-month
to
specify
Post by Kerr-Mudd,John
Post by Terje Mathisen
one spcific month and just year to print out all 12 months, with
color
Post by Kerr-Mudd,John
Post by Kerr-Mudd,John
Post by Terje Mathisen
coding for weekends and national holidays.
Terje
Might be tricky to get under 512 bytes.
Still, if I cut some of the other stuff, it might give me headroom.
OK 494
No week numbers or any holidays or colouring. or century test; valid
1980-2099
But finally! will output a year's calendar. (bug was small & hard to
find - hidden in an ass-umption in dec dx that dh was 0)
Start of week +n OK.
512 bytes ; OK to y31k (I think). (oh, I also managed to keep the
'accepts "monthname"' code).

Am I talking to myself?
--
Bah, and indeed, Humbug.
Steve
2020-11-01 13:39:27 UTC
Permalink
Post by Kerr-Mudd,John
512 bytes ; OK to y31k (I think). (oh, I also managed to keep the
'accepts "monthname"' code).
Am I talking to myself?
Hi,

Well, I am sure others are following you. Even
if we don't normally comment. Optimization is
a nice topic. One that I have tried every so often.
With generally poor results and a few successes.

One attempt that comes to mind, was a graphics
program that was too slow on a slow computer.
After a fairly large effort, I doubled its speed on
that system. On a faster computer, where it was
too fast anyway, I got a thirty-fold+ increase in
speed.

Most of my attempts at making programs smaller
are not well rewarded.

Regards,

Steve N.
Terje Mathisen
2020-11-01 14:37:33 UTC
Permalink
Post by Steve
Post by Kerr-Mudd,John
512 bytes ; OK to y31k (I think). (oh, I also managed to keep the
'accepts "monthname"' code).
Am I talking to myself?
Hi,
Well, I am sure others are following you. Even
if we don't normally comment. Optimization is
a nice topic. One that I have tried every so often.
With generally poor results and a few successes.
One attempt that comes to mind, was a graphics
program that was too slow on a slow computer.
After a fairly large effort, I doubled its speed on
that system. On a faster computer, where it was
too fast anyway, I got a thirty-fold+ increase in
speed.
Most of my attempts at making programs smaller
are not well rewarded.
In real life, many efforts to make a program smaller will also make the
ensemble faster, even if the particular transformation makes the code a
bit slower in a micro benchmark.

Terje
--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"
wolfgang kern
2020-11-02 08:10:01 UTC
Permalink
On 01.11.2020 15:37, Terje Mathisen wrote:
...
Post by Terje Mathisen
    Most of my attempts at making programs smaller
are not well rewarded.
In real life, many efforts to make a program smaller will also make the
ensemble faster, even if the particular transformation makes the code a
bit slower in a micro benchmark.
Exact, like I'd have written that :)
__
wolfgang
Kerr-Mudd,John
2020-11-01 16:21:58 UTC
Permalink
Post by Steve
Post by Kerr-Mudd,John
512 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).
Post by Steve
Hi,
Well, I am sure others are following you. Even
if we don't normally comment. Optimization is
a nice topic. One that I have tried every so often.
Well it's more of a size thing. Not really optimisation. It's a hobby.
Post by Steve
With generally poor results and a few successes.
One attempt that comes to mind, was a graphics
program that was too slow on a slow computer.
After a fairly large effort, I doubled its speed on
that system. On a faster computer, where it was
too fast anyway, I got a thirty-fold+ increase in
speed.
Most of my attempts at making programs smaller
are not well rewarded.
Regards,
Steve N.
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2020-11-08 22:21:03 UTC
Permalink
On Sun, 01 Nov 2020 16:21:58 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
Post by Kerr-Mudd,John
512 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.

Full 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

Clues in the text at the end:

SuMoTuWeThFrSa
JanFebMarAprMayJunJulAugSepOctNovDec
Usage is "cal {mthnum|mthname} {year} {+1stdow}"$
--
Bah, and indeed, Humbug.
wolfgang kern
2020-11-11 11:08:16 UTC
Permalink
Post by Kerr-Mudd,John
On Sun, 01 Nov 2020 16:21:58 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
Post by Kerr-Mudd,John
512 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,John
Full 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
Kerr-Mudd,John
2020-11-11 11:11:24 UTC
Permalink
On Wed, 11 Nov 2020 11:08:16 GMT, wolfgang kern
Post by wolfgang kern
Post by Kerr-Mudd,John
On Sun, 01 Nov 2020 16:21:58 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
Post by Kerr-Mudd,John
512 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,John
Full 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!
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2020-11-11 11:37:32 UTC
Permalink
On Wed, 11 Nov 2020 11:11:24 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Wed, 11 Nov 2020 11:08:16 GMT, wolfgang kern
Post by wolfgang kern
Post by Kerr-Mudd,John
On Sun, 01 Nov 2020 16:21:58 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
Post by Kerr-Mudd,John
512 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,John
Full 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.
Kerr-Mudd,John
2020-11-11 17:03:15 UTC
Permalink
On Wed, 11 Nov 2020 11:37:32 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Wed, 11 Nov 2020 11:11:24 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Wed, 11 Nov 2020 11:08:16 GMT, wolfgang kern
Post by Kerr-Mudd,John
On Sun, 01 Nov 2020 16:21:58 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
512 bytes ; OK to y31k (I think). (oh, I also managed to keep
the 'accepts "monthname"' code).
Ok dropped the "+n" code for start of week day, but allow as text; 512
bytes.


C:\>d:scala4 feb 1960 mon
Feb 1960
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29

C:\>d:scala4 MARCH 1983 Tues
Mar 1983
Tu We Th Fr Sa Su Mo
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31


C:\>d:scala4a / help or any other bad parms
"cal {mthnum|mthname} {year} {dow}"
eg: cal Feb 2020 Mon
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2020-11-20 13:30:25 UTC
Permalink
On Wed, 11 Nov 2020 17:03:15 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Wed, 11 Nov 2020 11:37:32 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Wed, 11 Nov 2020 11:11:24 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Wed, 11 Nov 2020 11:08:16 GMT, wolfgang kern
Post by Kerr-Mudd,John
On Sun, 01 Nov 2020 16:21:58 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
512 bytes ; OK to y31k (I think). (oh, I also managed
to keep
Post by Kerr-Mudd,John
Post by Kerr-Mudd,John
Post by Kerr-Mudd,John
Post by Kerr-Mudd,John
Post by Kerr-Mudd,John
the 'accepts "monthname"' code).
Ok dropped the "+n" code for start of week day, but allow as
text; 512
Post by Kerr-Mudd,John
bytes.
C:\>d:scala4 feb 1960 mon
Feb 1960
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29
C:\>d:scala4 MARCH 1983 Tues
Mar 1983
Tu We Th Fr Sa Su Mo
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
C:\>d:scala4a / help or any other bad parms
"cal {mthnum|mthname} {year} {dow}"
eg: cal Feb 2020 Mon
I've discovered an 620 byte "interactive" calendar:

'Copyright (C) Lawrence E. Boothby 1998'

which comes wrapped in a compression method of his own
devising

It starts at the current calendar month, and permits
CsrL -1 month
CsrR +1 month
CsrU -1 year
CsrD +1 year
PgUp -100 years
PgDn +100 years
(escape)
drawn at the top right of a standard colour text screen in
blue on green.

I've reverse-engineered it and inserted my own leap year code
to get a 398 byte (no compression, no copyright) program.
Still room for cutting some, I think.

So there's potential to add e.g. startday adjust code inside
the 512 limit.
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2020-11-20 13:56:42 UTC
Permalink
On Fri, 20 Nov 2020 13:30:25 GMT, "Kerr-Mudd,John"
<***@nospicedham.127.0.0.1> wrote:

[]
Post by Kerr-Mudd,John
'Copyright (C) Lawrence E. Boothby 1998'
to be clear; all I've retained is the key decoding and output
position & colours.
Post by Kerr-Mudd,John
which comes wrapped in a compression method of his own
devising
It starts at the current calendar month, and permits
CsrL -1 month
CsrR +1 month
CsrU -1 year
CsrD +1 year
PgUp -100 years
PgDn +100 years
(escape)
Home to go back to current month
Post by Kerr-Mudd,John
drawn at the top right of a standard colour text screen in
blue on green.
I've reverse-engineered it and inserted my own leap year
code
Post by Kerr-Mudd,John
to get a 398 byte (no compression, no copyright) program.
Still room for cutting some, I think.
382; using bios to clear the window, rather than putting a lot
of spaces over the previous calendar.
Post by Kerr-Mudd,John
So there's potential to add e.g. startday adjust code inside
the 512 limit.
--
Bah, and indeed, Humbug.
wolfgang kern
2020-11-21 07:53:04 UTC
Permalink
On 20.11.2020 14:56, Kerr-Mudd,John wrote:
...
Post by Kerr-Mudd,John
So there's potential to add e.g. startday adjust code inside
the 512 limit.
free space could be used to calculate DOW for any date input.
my DOW is part of the RTCL boot-up routine.
__
wolfgang
Kerr-Mudd,John
2020-11-21 20:20:49 UTC
Permalink
On Sat, 21 Nov 2020 07:53:04 GMT, wolfgang kern
Post by wolfgang kern
...
[382]
Post by wolfgang kern
Post by Kerr-Mudd,John
So there's potential to add e.g. startday adjust code inside
the 512 limit.
free space could be used to calculate DOW for any date input.
my DOW is part of the RTCL boot-up routine.
Well DoW is needed to know which day column to put the 1st of the month
under; so it's simple from there.

The first one is maxed out at 512.

This second one is purely cursor driven, no other user input;
362 bytes now. I think that's as good as I'm gonig to get, but I'll
ponder it for a day or 2 more and then post a hexdump or debug listing,
if you like.
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2020-11-25 09:53:46 UTC
Permalink
On Sat, 21 Nov 2020 20:20:49 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Sat, 21 Nov 2020 07:53:04 GMT, wolfgang kern
...
[382]
[]
Post by Kerr-Mudd,John
This second one is purely cursor driven, no other user input;
362 bytes now. I think that's as good as I'm gonig to get, but I'll
ponder it for a day or 2 more and then post a hexdump or debug listing,
if you like.
350 - still with an "unnecessary" halfway jump for a "too big for a short
jump" loop.
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2020-12-09 15:24:16 UTC
Permalink
On Wed, 25 Nov 2020 09:53:46 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Sat, 21 Nov 2020 20:20:49 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Sat, 21 Nov 2020 07:53:04 GMT, wolfgang kern
...
[382]
[]
Post by Kerr-Mudd,John
This second one is purely cursor driven, no other user input;
362 bytes now. I think that's as good as I'm gonig to get, but I'll
ponder it for a day or 2 more and then post a hexdump or debug
listing, if you like.
350 - still with an "unnecessary" halfway jump for a "too big for a
short jump" loop.
If anyone wants a look:

grdb dump [minus the seg]

0100 B7 B8 8E C3-B4 2A CD 21-89 CD 88 F3-B7 21 E8 36 .....*.!.....!.6
0110 00 B7 00 BE-23 02 BF 46-02 B1 07 A4-47 A4 47 A4 ....#..F....G.G.
0120 47 AF E3 6C-E2 F5 88 DC-FE CC D5 03-01 C6 BF 1A G..l............
0130 01 EB E8 43-80 FB 0C 76-4B B3 01 45-B8 0F 27 39 ...C...vK..E..'9
0140 C5 76 41 B3-0C EB 3C B8-00 06 B9 31-00 BA 4F 0A .vA...<....1..O.
0150 CD 10 C3 CD-16 86 C4 98-48 74 EC 2C-46 74 A5 48 ........Ht.,Ft.H
0160 74 D9 48 74-21 2C 04 74-CA 2C 03 74-0C 48 74 1B t.Ht!,.t.,.t.Ht.
0170 3C FA 75 DF-4B 75 0D B3-0C 4D B8 2E-06 39 C5 73 <.u.Ku...M...9.s
0180 03 B3 01 95-EB 86 83 C5-64 EB B1 83-ED 64 EB EA ........d....d..
0190 E8 72 00 BF-E6 02 53 55-31 C0 93 31-C9 98 2C 02 .r....SU1..1..,.
01A0 77 03 4D 04-0C BE 6A 1D-91 D1 EE 83-D3 02 E2 F9 w.M...j.........
01B0 95 43 01 C3-D1 F8 D1 F8-01 C3 52 B1-19 99 F7 F1 .C........R.....
01C0 29 C3 D1 F8-D1 F8 01 D8-B1 07 99 F7-F1 28 D1 01 )............(..
01D0 D2 01 D2 01-D2 01 D7 58-99 D1 EE 75-06 4A 24 03 .......X...u.J$.
01E0 74 01 4A 83-D2 1E 95 5D-5B 40 4A 78-85 50 D4 0A t.J....][@Jx.P..
01F0 08 E4 75 02-B4 10 E8 20-00 AF AF 58-E2 EB B1 07 ..u.... ...X....
0200 83 C7 68 EB-E4 89 E8 B1-64 99 F7 F1-52 08 D2 75 ..h.....d...R..u
0210 02 88 C2 E8-01 00 58 D4-0A E8 00 00-86 E0 34 30 ......X.......40
0220 AA 47 C3 53-75 6E 4D 6F-6E 54 75 65-57 65 64 54 .G.SunMonTueWedT
0230 68 72 46 72-69 53 61 74-4A 61 6E 46-65 62 4D 61 hrFriSatJanFebMa
0240 72 41 70 72-4D 61 79 4A-75 6E 4A 75-6C 41 75 67 rAprMayJunJulAug
0250 53 65 70 4F-63 74 4E 6F-76 44 65 63-7E 00 00 00 SepOctNovDec~...
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2020-12-18 11:21:33 UTC
Permalink
On Wed, 09 Dec 2020 15:24:16 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Wed, 25 Nov 2020 09:53:46 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Sat, 21 Nov 2020 20:20:49 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Sat, 21 Nov 2020 07:53:04 GMT, wolfgang kern
...
[382]
[]
Post by Kerr-Mudd,John
This second one is purely cursor driven, no other user input;
362 bytes now. I think that's as good as I'm gonig to get, but I'll
ponder it for a day or 2 more and then post a hexdump or debug
listing, if you like.
350 - still with an "unnecessary" halfway jump for a "too big for a
short jump" loop.
grdb dump [minus the seg]
345: yellow on blue, w/e at end of week:


-> d 100 l200
:0100 B7 B8 8E C3-B4 2A CD 21-88 F3 4B 91-95 B7 1E E8 .....*.!..K.....
:0110 34 00 BE 20-02 BF 46 02-B1 07 A4 47-A4 47 A4 47 4.. ..F....G.G.G
:0120 AF E3 6C E2-F5 B7 00 01-DE 01 DE 01-DE BF 1A 01 ..l.............
:0130 EB E8 43 80-FB 0B 76 D5-B3 00 45 B8-0F 27 39 C5 ..C...v...E..'9.
:0140 76 CB B3 0B-EB C6 B8 00-06 B9 31 00-BA 4F 0A CD v.........1..O..
:0150 10 C3 CD 16-86 C4 98 48-74 EC 2C 46-74 A6 48 74 .......Ht.,Ft.Ht
:0160 D9 48 74 21-2C 04 74 CA-2C 03 74 0D-48 74 1B 3C .Ht!,.t.,.t.Ht.<
:0170 FA 75 DF FE-CB 79 96 B3-0B 4D B8 2E-06 39 C5 73 .u...y...M...9.s
:0180 8C B3 00 EB-87 83 C5 64-EB B1 83 ED-64 EB EB E8 .......d....d...
:0190 70 00 BF E6-02 53 55 31-C0 93 31 C9-2C 01 77 03 p....SU1..1.,.w.
:01A0 4D 04 0C BE-6A 1D 91 D1-EE 83 D3 02-E2 F9 95 01 M...j...........
:01B0 C3 D1 F8 D1-F8 01 C3 52-B1 19 99 F7-F1 29 C3 D1 .......R.....)..
:01C0 F8 D1 F8 01-D8 B1 07 99-F7 F1 28 D1-01 D2 01 D2 ..........(.....
:01D0 01 D2 01 D7-58 99 D1 EE-75 06 4A 24-03 74 01 4A ....X...u.J$.t.J
:01E0 83 D2 1E 95-5D 5B 40 4A-78 87 50 D4-0A 08 E4 75 ....][@Jx.P....u
:01F0 02 B4 10 E8-20 00 AF AF-58 E2 EB B1-07 83 C7 68 .... ...X......h
:0200 EB E4 89 E8-B1 64 99 F7-F1 52 08 D2-75 02 88 C2 .....d...R..u...
:0210 E8 01 00 58-D4 0A E8 00-00 86 E0 34-30 AA 47 C3 ...X.......40.G.
:0220 4D 6F 6E 54-75 65 57 65-64 54 68 72-46 72 69 53 MonTueWedThrFriS
:0230 61 74 53 75-6E 4A 61 6E-46 65 62 4D-61 72 41 70 atSunJanFebMarAp
:0240 72 4D 61 79-4A 75 6E 4A-75 6C 41 75-67 53 65 70 rMayJunJulAugSep
:0250 4F 63 74 4E-6F 76 44 65-63 00 00 00-00 00 00 00 OctNovDec.......
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2021-01-11 20:15:11 UTC
Permalink
On Fri, 18 Dec 2020 11:21:33 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Wed, 09 Dec 2020 15:24:16 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Wed, 25 Nov 2020 09:53:46 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Sat, 21 Nov 2020 20:20:49 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Sat, 21 Nov 2020 07:53:04 GMT, wolfgang kern
...
[382]
[]
Post by Kerr-Mudd,John
This second one is purely cursor driven, no other user input;
362 bytes now. I think that's as good as I'm gonig to get, but I'll
ponder it for a day or 2 more and then post a hexdump or debug
listing, if you like.
350 - still with an "unnecessary" halfway jump for a "too big for a
short jump" loop.
sorted.
Post by Kerr-Mudd,John
Post by Kerr-Mudd,John
grdb dump [minus the seg]
341:

->u 100 l11c
16A2:0100 B7 B8 mov bh,B8
16A2:0102 8E C3 mov es,bx
16A2:0104 B4 2A mov ah,2A
16A2:0106 CD 21 int 21
16A2:0108 88 F3 mov bl,dh
16A2:010A 4B dec bx
16A2:010B 91 xchg ax,cx
16A2:010C 95 xchg ax,bp
16A2:010D B7 1E mov bh,1E
16A2:010F B8 00 06 mov ax,0600
16A2:0112 B9 31 00 mov cx,0031
16A2:0115 BA 4F 0A mov dx,0A4F
16A2:0118 CD 10 int 10
16A2:011A BE 1C 02 mov si,021C
16A2:011D BF 46 02 mov di,0246
16A2:0120 B1 07 mov cl,07
16A2:0122 A4 movsb
16A2:0123 47 inc di
16A2:0124 A4 movsb
16A2:0125 47 inc di
16A2:0126 A4 movsb
16A2:0127 47 inc di
16A2:0128 AF scasw
16A2:0129 E3 61 jcxzw 018C
16A2:012B E2 F5 loopw 0122
16A2:012D B7 00 mov bh,00
16A2:012F 01 DE add si,bx
16A2:0131 01 DE add si,bx
16A2:0133 01 DE add si,bx
16A2:0135 BF 1A 01 mov di,011A
16A2:0138 EB E8 jmp 0122
16A2:013A 43 inc bx
16A2:013B 80 FB 0B cmp bl,0B
16A2:013E 76 CD jbe 010D
16A2:0140 B3 00 mov bl,00
16A2:0142 45 inc bp
16A2:0143 B8 0F 27 mov ax,270F
16A2:0146 39 C5 cmp bp,ax
16A2:0148 76 C3 jbe 010D
16A2:014A B3 0B mov bl,0B
16A2:014C EB BE jmp 010C
16A2:014E CD 16 int 16
16A2:0150 86 C4 xchg al,ah
16A2:0152 98 cbw
16A2:0153 48 dec ax
16A2:0154 75 01 jnz 0157
16A2:0156 C3 ret
16A2:0157 2C 46 sub al,46
16A2:0159 74 A9 jz 0104
16A2:015B 48 dec ax
16A2:015C 74 E4 jz 0142
16A2:015E 48 dec ax
16A2:015F 74 21 jz 0182
16A2:0161 2C 04 sub al,04
16A2:0163 74 D5 jz 013A
16A2:0165 2C 03 sub al,03
16A2:0167 74 0D jz 0176
16A2:0169 48 dec ax
16A2:016A 74 1B jz 0187
16A2:016C 3C FA cmp al,FA
16A2:016E 75 DE jnz 014E
16A2:0170 FE CB dec bl
16A2:0172 79 99 jns 010D
16A2:0174 B3 0B mov bl,0B
16A2:0176 4D dec bp
16A2:0177 B8 2E 06 mov ax,062E
16A2:017A 39 C5 cmp bp,ax
16A2:017C 73 8F jnb 010D
16A2:017E B3 00 mov bl,00
16A2:0180 EB 8A jmp 010C
16A2:0182 83 C5 64 add bp,0064
16A2:0185 EB BC jmp 0143
16A2:0187 83 ED 64 sub bp,0064
16A2:018A EB EB jmp 0177
16A2:018C E8 6F 00 call 01FE
16A2:018F BF E6 02 mov di,02E6
16A2:0192 53 push bx
16A2:0193 55 push bp
16A2:0194 52 push dx
16A2:0195 31 C0 xor ax,ax
16A2:0197 93 xchg ax,bx
16A2:0198 31 C9 xor cx,cx
16A2:019A 2C 01 sub al,01
16A2:019C 77 03 ja 01A1
16A2:019E 4D dec bp
16A2:019F 04 0C add al,0C
16A2:01A1 BE 6A 1D mov si,1D6A
16A2:01A4 91 xchg ax,cx
16A2:01A5 D1 EE shr si,1
16A2:01A7 83 D3 02 adc bx,0002
16A2:01AA E2 F9 loopw 01A5
16A2:01AC 95 xchg ax,bp
16A2:01AD B1 1A mov cl,1A
16A2:01AF 01 C3 add bx,ax
16A2:01B1 D1 F8 sar ax,1
16A2:01B3 D1 F8 sar ax,1
16A2:01B5 99 cwd
16A2:01B6 01 C3 add bx,ax
16A2:01B8 49 dec cx
16A2:01B9 7A 06 jp 01C1
16A2:01BB F7 F1 div cx
16A2:01BD 29 C3 sub bx,ax
16A2:01BF EB F0 jmp 01B1
16A2:01C1 B1 07 mov cl,07
16A2:01C3 93 xchg ax,bx
16A2:01C4 F7 F1 div cx
16A2:01C6 28 D1 sub cl,dl
16A2:01C8 01 D2 add dx,dx
16A2:01CA 01 D2 add dx,dx
16A2:01CC 01 D2 add dx,dx
16A2:01CE 01 D7 add di,dx
16A2:01D0 58 pop ax
16A2:01D1 99 cwd
16A2:01D2 D1 EE shr si,1
16A2:01D4 75 06 jnz 01DC
16A2:01D6 4A dec dx
16A2:01D7 24 03 and al,03
16A2:01D9 74 01 jz 01DC
16A2:01DB 4A dec dx
16A2:01DC 83 D2 1E adc dx,001E
16A2:01DF 95 xchg ax,bp
16A2:01E0 5D pop bp
16A2:01E1 5B pop bx
16A2:01E2 40 inc ax
16A2:01E3 4A dec dx
16A2:01E4 78 88 js 016E
16A2:01E6 50 push ax
16A2:01E7 D4 0A aam 0A
16A2:01E9 08 E4 or ah,ah
16A2:01EB 75 02 jnz 01EF
16A2:01ED B4 10 mov ah,10
16A2:01EF E8 20 00 call 0212
16A2:01F2 AF scasw
16A2:01F3 AF scasw
16A2:01F4 58 pop ax
16A2:01F5 E2 EB loopw 01E2
16A2:01F7 B1 07 mov cl,07
16A2:01F9 83 C7 68 add di,0068
16A2:01FC EB E4 jmp 01E2
16A2:01FE 89 E8 mov ax,bp
16A2:0200 B1 64 mov cl,64
16A2:0202 99 cwd
16A2:0203 F7 F1 div cx
16A2:0205 52 push dx
16A2:0206 08 D2 or dl,dl
16A2:0208 75 02 jnz 020C
16A2:020A 88 C2 mov dl,al
16A2:020C E8 01 00 call 0210
16A2:020F 58 pop ax
16A2:0210 D4 0A aam 0A
16A2:0212 E8 00 00 call 0215
16A2:0215 86 E0 xchg ah,al
16A2:0217 34 30 xor al,30
16A2:0219 AA stosb
16A2:021A 47 inc di
16A2:021B C3 ret
->d 21c
16A2:021C 4D 6F 6E 54-75 65 57 65-64 54 68 72-46 72 69 53 MonTueWedThrFriS
16A2:022C 61 74 53 75-6E 4A 61 6E-46 65 62 4D-61 72 41 70 atSunJanFebMarAp
16A2:023C 72 4D 61 79-4A 75 6E 4A-75 6C 41 75-67 53 65 70 rMayJunJulAugSep
16A2:024C 4F 63 74 4E-6F 76 44 65-63 00 00 00-00 00 00 00 OctNovDec.......
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2020-10-09 19:24:25 UTC
Permalink
On Fri, 09 Oct 2020 16:51:42 GMT, Terje Mathisen
Post by Terje Mathisen
Post by Kerr-Mudd,John
On Thu, 08 Oct 2020 11:19:09 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
I found an old cal.com (900 bytes)
cal /? gives
CAL 1.07 Freeware
Copyright 1998, Charles Dye
CAL
CAL mm/yyyy
CAL yyyy
C:\>cal 2 2012
Feb 2012
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29
[newcal]
Post by Kerr-Mudd,John
cal (uses current mth&year)
cal mthname (uses current year and mthname)
cal mthname year (uses year and mthname)
current byte count is down to 465
459 - no jmps
C:\>d:newcal7 feb 2012
February 2012
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29
Oh no! how come the lhs is wrong after 11?
Post by Terje Mathisen
Post by Kerr-Mudd,John
I could probably^w undoubtedly save more by reducing the 'day' size, and
dropping the code to centralise the mth/year title, and text matching on
mthname.
Might be nice to have param of 'year' print a full year calendar.
Make start-of-week configurable, and add week numbers.
In my own CAL.PAS Turbo Pascal program I did this, with a single 1-12
number indicating that month in the current year, year-month to specify
one spcific month and just year to print out all 12 months, with color
coding for weekends and national holidays.
Terje
Might be tricky to get under 512 bytes.

Still, if I cut some of the other stuff, it might give me headroom.
--
Bah, and indeed, Humbug.
Loading...