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,112 of 4,675   
   aen@nospicedham.spamtrap.com to notsaying@nospicedham.127.0.0.1   
   Re: small asm code (compo?)   
   25 Aug 20 05:34:01   
   
   On Mon, 24 Aug 2020 09:32:28 -0000 (UTC), "Kerr-Mudd,John"   
    wrote:   
   >...   
   >One of my 'best' does a table lookup. I don't use xlat, as it changes al.   
   >..   
   Something like that?   
   cpu 8086   
   org 100h   
   mov ah,2ah   
   int 21h   
   push ax   
   mov bl,al   
   mov dx,long_days   
   add dl,[table+bx]   
   mov ah,9   
   int 21h   
   mov dx,day   
   int 21h   
   pop ax   
   add ax,2201h   
   int 21h   
   ret   
   table db 0, 4, 8, 13, 20, 26, 30   
   long_days db "Sun$Mon$Tues$Wednes$Thurs$Fri$Satur$"   
   day db "day$"   
   --   
   aen   
      
   --- 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