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,108 of 4,675   
   Rick C. Hodgin to aen@nospicedham.spamtrap.com   
   Re: small asm code (compo?)   
   24 Aug 20 11:43:27   
   
   From: rick.c.hodgin@nospicedham.gmail.com   
      
   On 8/23/20 11:43 PM, 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   
      
   I would've found that too on any day other than Sunday.   
      
   >           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$"   
      
   All of these were off the top of my head, with minimal testing.  I find   
   Open Watcom somewhat difficult to wield as I'm used to Visual Studio.   
   One flaw is if CAPS LOCK is on, your function keys to step into and over   
   code doesn't work in the version I have.   
      
   I have Visual Studio 2003, and I tried to get it to compile a 16-bit   
   DOS application but it's not supported in that version.  I think I have   
   to go back to VS98 for that.   
      
   --   
   Rick C. Hodgin   
      
   --- 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