From: notsaying@nospicedham.127.0.0.1   
      
   On Fri, 09 Oct 2020 16:51:42 GMT, Terje Mathisen   
    wrote:   
      
   > Kerr-Mudd,John wrote:   
   >> On Thu, 08 Oct 2020 11:19:09 GMT, "Kerr-Mudd,John"   
   >> wrote:   
   >>   
   >>> 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]   
   >>> 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   
   >>>   
   >> 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?   
   >>   
   >> 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.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|