From: notsaying@nospicedham.127.0.0.1   
      
   On Mon, 24 Aug 2020 08:57:30 GMT, Terje Mathisen   
    wrote:   
      
   > Kerr-Mudd,John wrote:   
   >> On Sun, 23 Aug 2020 18:41:33 GMT, aen@nospicedham.spamtrap.com wrote:   
   >>   
   >>> On Sun, 23 Aug 2020 13:11:07 -0400, "Rick C. Hodgin"   
   >>> wrote:   
   >>>> ...   
   >>>> mov ah,2ah   
   >>>> int 21h   
   >>> shl al,1   
   >>>> cbw   
   >>>> mov bx,ax   
   >>>> add bx,offset days   
   >>>> mov byte ptr [bx+2],'$'   
   >>>> mov dx,bx   
   >>>> mov ah,9   
   >>>> int 21h   
   >>>> ret   
   >>   
   >> Yup, that's about it; I forgot to put in the original spec that I want   
   >> the return code set to 1 for Sun etc, Otherwise the 'mov bx,ax' could   
   >> have been an 'xchg'.   
   >>   
   >> Anyone want to try the long version? ('Monday' 'Tuesday' etc?)   
   >>   
   > It seems obvious that you would print "day" separately from the leading   
   > day name chars, since that would save ~18 data bytes.   
   >   
   > One complication is that the names are different lengths, and we cannot   
   > pad them all to fit "Wednes$", so maybe use XLAT to convert day number   
   > to starting offset via a 7-byte table?   
   >   
      
   One of my 'best' does a table lookup. I don't use xlat, as it changes al.   
      
      
      
   --   
   Bah, and indeed, Humbug.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|