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,093 of 4,675   
   aen@nospicedham.spamtrap.com to terje.mathisen@nospicedham.tmsw.no   
   Re: small asm code (compo?)   
   23 Aug 20 16:27:48   
   
   On Sat, 22 Aug 2020 20:52:32 +0200, Terje Mathisen   
    wrote:   
   >...   
   >For the two-letter case:   
   >   
   >mov ah,2ah   
   >int 21h   
   >cbw   
   >mov si,ax   
   >mov dl,first_letter[si]   
   >call print1   
   >mov dl,second_letter[si]   
   >print1:   
   >mov ah,2   
   >int 21h   
   >ret	;; Return after first letter, exit after second   
   >first_letter db "SMTWTFS"   
   >second_letter db "uouehra"   
   >   
   Here's a different version:   
   mov ah,2ah   
   int 21h   
   mov bl,al ; bx 0 on entry   
   shl bl,1   
   mov ah,2   
   mov dx,[daystr+bx]   
   int 21h   
   mov dl,dh   
   int 21h   
   ret   
   daystr db "SuMoTuWeThFrSa"   
   --   
   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