From: zfysz@nospicedham.fysnet.net   
      
   "Terje Mathisen" wrote in message   
   news:oj0b4j$1dri$1@gioia.aioe.org...   
   > wolfgang kern wrote:   
   >   
   > This looks extremely "by the book", i.e. straight forward coding.   
      
   Is that a compliment? :-)   
      
   > You could combine a few of the current ideas:   
   >   
   > next:   
   > lodsb   
   > test al,al   
   > scasb   
   > jz check_end   
   >   
   > ; Is this a case mismatch?   
   > xor al,32   
   > cmp al,es:[di-1]   
   > jnz done   
   >   
   > ; Was it an a-z char?   
   > or al,32   
   > sub al,'a'   
   > jb done   
   > cmp al,'z'   
   > ja done   
   > jmp next   
   >   
   > check_end:   
   > ; All chars up to here have matched   
   > test al,al   
   > jnz next   
   > done:   
   > ret   
   >   
   > Setting the proper return codes is left as an exercise. :-)   
   >   
   > Terje   
      
   One advantage to "by the book" coding compared to your code   
   above, is that in 5 years when I need to make a modification,   
   it is easily understood what the code is doing, and I don't   
   have to re-learn why I coded it that way.   
      
   However, if I need the extra bytes for the boot loader, your   
   code is an advantage over mine.   
      
   Thanks,   
   Ben   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|