home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 4,103 of 4,675   
   Kerr-Mudd,John to aen@nospicedham.spamtrap.com   
   Re: small asm code (compo?)   
   24 Aug 20 09:28:15   
   
   From: notsaying@nospicedham.127.0.0.1   
      
   On Mon, 24 Aug 2020 03:43:58 GMT, aen@nospicedham.spamtrap.com wrote:   
      
   > On Sun, 23 Aug 2020 17:19:14 -0400, "Rick C. Hodgin"   
   >  wrote:   
   >>...   
   >>         mov     ah,2ah   
   >>         int     21h   
   >>         mov     di,offset long_days   
   >>         std   
   >>         scasb   
   >>         mov     dx,di   
   >>         inc     dx   
   >>         mov     ah,9   
   >>         int     21h   
   >>         mov     dx,offset day   
   >>         int     21h   
   >>         ret   
   > Try:   
   >          mov     ah,2ah   
   >          int     21h   
   >          mov     di,long_days   
   >          cld   
   >          repne   scasb   
   >          mov     dx,di   
   >          mov     ah,9   
   >          int     21h   
   >          mov     dx,day   
   >          int     21h   
   >          ret   
   > long_days db 0,"Sun$",1,"Mon$",2,"Tues$",3,"Wednes$"   
   >           db 4,"Thurs$",5,"Fri$",6,"Satur$"   
   > day db "day$"   
      
   Yup needs the 'rep'; we can assume 'cld' to save 1.   
      
      
   --   
   Bah, and indeed, Humbug.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca