Discussion:
Calendar program (revisited)
(too old to reply)
Kerr-Mudd, John
2023-08-01 15:45:23 UTC
Permalink
Just print current Month in <256 bytes, start of week as parm.

eg. 'Showmth Tu' (must be exact case to match display letter pairs!).
default with no or invalid parm is 'Su'(nday).

251 bytes (233 without parm code)- possibly add code to prt '*' for
current day?

Should be OK to year 9999; it's bit hard to test without changing the
system clock.

-> d 100 l100
1636:0100 A1 82 00 BF-C7 01 B9 07-00 89 CB F2-AF 75 03 29 .............u.)
1636:0110 CB 4B BF 24-09 57 B4 2A-CD 21 51 28-C2 00 DA BE .K.$.W.*.!Q(....
1636:0120 D5 01 A5 B0-20 B9 06 00-00 CA F3 AA-88 F1 49 89 .... .........I.
1636:0130 CD 01 CE 01-CE 01 CE A5-A4 AA 58 52-99 B1 64 F7 ..........XR..d.
1636:0140 F1 52 08 D2-75 02 88 C2-E8 71 00 58-E8 6D 00 BE .R..u....q.X.m..
1636:0150 C5 01 56 A5-01 DE 01 DE-B0 20 B1 07-38 D9 75 03 ..V...... ..8.u.
1636:0160 BE C7 01 A5-AA E2 F5 5E-A5 5B 92 99-4D 75 06 4A .......^.[..Mu.J
1636:0170 24 03 74 01-4A 88 F9 BE-D5 0A D3 EE-83 D2 1E 93 $.t.J...........
1636:0180 BE 0A 0D B1-07 D4 07 98-74 0C 50 28-C1 B0 20 AA ........t.P(.. .
1636:0190 AA AA E2 FB-91 59 40 4A-78 16 50 D4-0A 86 E0 3C ***@Jx.P....<
1636:01A0 00 75 02 B0-10 E8 18 00-B0 20 AA 58-E2 E8 B1 07 .u....... .X....
1636:01B0 96 AB 96 79-E1 5A 89 D0-AA CD 21 C3-B1 0A F6 F1 ...y.Z....!.....
1636:01C0 35 30 30 AB-C3 0D 0A 53-75 4D 6F 54-75 57 65 54 500....SuMoTuWeT
1636:01D0 68 46 72 53-61 0D 0A 4A-61 6E 46 65-62 4D 61 72 hFrSa..JanFebMar
1636:01E0 41 70 72 4D-61 79 4A 75-6E 4A 75 6C-41 75 67 53 AprMayJunJulAugS
1636:01F0 65 70 4F 63-74 4E 6F 76-44 65 63 00-00 00 00 00 epOctNovDec.....
-> q
--
Bah, and indeed Humbug.
Terje Mathisen
2023-08-01 18:55:24 UTC
Permalink
Post by Kerr-Mudd, John
Just print current Month in <256 bytes, start of week as parm.
eg. 'Showmth Tu' (must be exact case to match display letter pairs!).
default with no or invalid parm is 'Su'(nday).
251 bytes (233 without parm code)- possibly add code to prt '*' for
current day?
Should be OK to year 9999; it's bit hard to test without changing the
system clock.
-> d 100 l100
1636:0100 A1 82 00 BF-C7 01 B9 07-00 89 CB F2-AF 75 03 29 .............u.)
1636:0110 CB 4B BF 24-09 57 B4 2A-CD 21 51 28-C2 00 DA BE .K.$.W.*.!Q(....
1636:0120 D5 01 A5 B0-20 B9 06 00-00 CA F3 AA-88 F1 49 89 .... .........I.
1636:0130 CD 01 CE 01-CE 01 CE A5-A4 AA 58 52-99 B1 64 F7 ..........XR..d.
1636:0140 F1 52 08 D2-75 02 88 C2-E8 71 00 58-E8 6D 00 BE .R..u....q.X.m..
1636:0150 C5 01 56 A5-01 DE 01 DE-B0 20 B1 07-38 D9 75 03 ..V...... ..8.u.
1636:0160 BE C7 01 A5-AA E2 F5 5E-A5 5B 92 99-4D 75 06 4A .......^.[..Mu.J
1636:0170 24 03 74 01-4A 88 F9 BE-D5 0A D3 EE-83 D2 1E 93 $.t.J...........
1636:0180 BE 0A 0D B1-07 D4 07 98-74 0C 50 28-C1 B0 20 AA ........t.P(.. .
1636:01A0 00 75 02 B0-10 E8 18 00-B0 20 AA 58-E2 E8 B1 07 .u....... .X....
1636:01B0 96 AB 96 79-E1 5A 89 D0-AA CD 21 C3-B1 0A F6 F1 ...y.Z....!.....
1636:01C0 35 30 30 AB-C3 0D 0A 53-75 4D 6F 54-75 57 65 54 500....SuMoTuWeT
1636:01D0 68 46 72 53-61 0D 0A 4A-61 6E 46 65-62 4D 61 72 hFrSa..JanFebMar
1636:01E0 41 70 72 4D-61 79 4A 75-6E 4A 75 6C-41 75 67 53 AprMayJunJulAugS
1636:01F0 65 70 4F 63-74 4E 6F 76-44 65 63 00-00 00 00 00 epOctNovDec.....
-> q
Calendar program are always fun, I wrote my first one about 30 years
ago. The main feature was that it knew about all the fixed and variable
Norwegian holidays, and would print them in Red, just like it did for
Sat/Sun. It would by default print 12 months in a 3x4 grid. It was much
larger though, about 5KB of Turbo Pascal that compiled into a 10K CAL.EXE.

I could probably start up DosBox and check that it still works?

Terje
--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"
Herbert Kleebauer
2023-08-01 21:20:40 UTC
Permalink
Post by Terje Mathisen
Post by Kerr-Mudd, John
Just print current Month in <256 bytes, start of week as parm.
Calendar program are always fun, I wrote my first one about 30 years
ago. The main feature was that it knew about all the fixed and variable
Norwegian holidays, and would print them in Red, just like it did for
Sat/Sun. It would by default print 12 months in a 3x4 grid. It was much
larger though, about 5KB of Turbo Pascal that compiled into a 10K CAL.EXE.
I could probably start up DosBox and check that it still works?
A better hardware for a calendar program than a DosBox:

https://www.waveshare.com/product/displays/e-paper/photopainter.htm
http://www.waveshare.com/wiki/PhotoPainter
https://www.aliexpress.com/item/1005005547336322.html
Skybuck Flying
2023-09-30 10:00:44 UTC
Permalink
Post by Terje Mathisen
Post by Kerr-Mudd, John
Just print current Month in <256 bytes, start of week as parm.
eg. 'Showmth Tu' (must be exact case to match display letter pairs!).
default with no or invalid parm is 'Su'(nday).
251 bytes (233 without parm code)- possibly add code to prt '*' for
current day?
Should be OK to year 9999; it's bit hard to test without changing the
system clock.
-> d 100 l100
1636:0100 A1 82 00 BF-C7 01 B9 07-00 89 CB F2-AF 75 03 29 .............u.)
1636:0110 CB 4B BF 24-09 57 B4 2A-CD 21 51 28-C2 00 DA BE .K.$.W.*.!Q(....
1636:0120 D5 01 A5 B0-20 B9 06 00-00 CA F3 AA-88 F1 49 89 .... .........I.
1636:0130 CD 01 CE 01-CE 01 CE A5-A4 AA 58 52-99 B1 64 F7 ..........XR..d.
1636:0140 F1 52 08 D2-75 02 88 C2-E8 71 00 58-E8 6D 00 BE .R..u....q.X.m..
1636:0150 C5 01 56 A5-01 DE 01 DE-B0 20 B1 07-38 D9 75 03 ..V...... ..8.u.
1636:0160 BE C7 01 A5-AA E2 F5 5E-A5 5B 92 99-4D 75 06 4A .......^.[..Mu.J
1636:0170 24 03 74 01-4A 88 F9 BE-D5 0A D3 EE-83 D2 1E 93 $.t.J...........
1636:0180 BE 0A 0D B1-07 D4 07 98-74 0C 50 28-C1 B0 20 AA ........t.P(.. .
1636:01A0 00 75 02 B0-10 E8 18 00-B0 20 AA 58-E2 E8 B1 07 .u....... .X....
1636:01B0 96 AB 96 79-E1 5A 89 D0-AA CD 21 C3-B1 0A F6 F1 ...y.Z....!.....
1636:01C0 35 30 30 AB-C3 0D 0A 53-75 4D 6F 54-75 57 65 54 500....SuMoTuWeT
1636:01D0 68 46 72 53-61 0D 0A 4A-61 6E 46 65-62 4D 61 72 hFrSa..JanFebMar
1636:01E0 41 70 72 4D-61 79 4A 75-6E 4A 75 6C-41 75 67 53 AprMayJunJulAugS
1636:01F0 65 70 4F 63-74 4E 6F 76-44 65 63 00-00 00 00 00 epOctNovDec.....
-> q
Calendar program are always fun, I wrote my first one about 30 years
ago. The main feature was that it knew about all the fixed and variable
Norwegian holidays, and would print them in Red, just like it did for
Sat/Sun. It would by default print 12 months in a 3x4 grid. It was much
larger though, about 5KB of Turbo Pascal that compiled into a 10K CAL.EXE.
I could probably start up DosBox and check that it still works?
Terje
Please do, I need something more reliable than the ever changing buggy microsoft windows software...

Bye,
Skybuck

Kerr-Mudd, John
2023-08-02 06:19:13 UTC
Permalink
On Tue, 1 Aug 2023 16:45:23 +0100
Post by Kerr-Mudd, John
Just print current Month in <256 bytes, start of week as parm.
[]
Post by Kerr-Mudd, John
253 bytes version - prints '*' for current day, had to reduce the parm to just 'M' for a Monday week start
Should be OK to year 9999; it's bit hard to test without changing the
system clock.
-> d 100 l100
1636:0100 A0 82 00 3C-4D 75 01 43-BF 24 09 57-B4 2A CD 21 ...<Mu.C.$.W.*.!
1636:0110 52 51 28 C2-00 DA BE D7-01 A5 B0 20-B9 06 00 00 RQ(........ ....
1636:0120 CA F3 AA 88-F1 49 01 CE-01 CE 01 CE-A5 A4 AA 58 .....I.........X
1636:0130 52 99 B1 64-F7 F1 52 08-D2 75 02 88-C2 E8 7E 00 R..d..R..u....~.
1636:0140 58 E8 7A 00-BE C7 01 56-A5 01 DE 01-DE B0 20 B1 X.z....V...... .
1636:0150 07 38 D9 75-03 BE C9 01-A5 AA E2 F5-5E A5 5B 92 .8.u........^.[.
1636:0160 99 80 FF 02-75 06 4A 24-03 74 01 4A-88 F9 BE D5 ....u.J$.t.J....
1636:0170 0A D3 EE 83-D2 1E 93 BE-0A 0D B1 07-D4 07 98 74 ...............t
1636:0180 0C 50 28 C1-B0 20 AA AA-AA E2 FB 91-59 5B 40 4A .P(.. ......Y[@J
1636:0190 78 20 50 38-D8 75 06 B8-20 2A AB EB-0D D4 0A 86 x P8.u.. *......
1636:01A0 E0 3C 00 75-02 B0 10 E8-18 00 B0 20-AA 58 E2 DE .<.u....... .X..
1636:01B0 B1 07 96 AB-96 79 D7 5A-89 D0 AA CD-21 C3 B1 0A .....y.Z....!...
1636:01C0 F6 F1 35 30-30 AB C3 0D-0A 53 75 4D-6F 54 75 57 ..500....SuMoTuW
1636:01D0 65 54 68 46-72 53 61 0D-0A 4A 61 6E-46 65 62 4D eThFrSa..JanFebM
1636:01E0 61 72 41 70-72 4D 61 79-4A 75 6E 4A-75 6C 41 75 arAprMayJunJulAu
1636:01F0 67 53 65 70-4F 63 74 4E-6F 76 44 65-63 00 00 00 gSepOctNovDec...
--
Bah, and indeed Humbug.
Loading...