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 2,749 of 4,675    |
|    wolfgang kern to Benjamin David Lunt    |
|    Re: another stricmp()    |
|    28 Jun 17 10:26:12    |
      From: nowhere@never.at              Benjamin David Lunt wrote:       >>>> If your strings contain also numbers then a OR 0x20 would work       >>>> while AND 0xDF wont.              >>> Why not? If guarenteed to only have alpha and numeric chars, an       >>> AND will work also. Numeric chars have bit 6 cleared, while alpha       >>> chars have bit 6 set.              >> ??? don't we talk about bit 5 here (Ucase vs. Lcase) ?       >> If you clear bit 5 on a number ie: 0x30 it becomes a '0x10'.              > This was with the assumption that there would be only alpha and       > numeric characters (and the dot).              Yeah, both AND/OR work as long you compare 'known' strings, but       Filenames may contain padding spaces beside "_~" and a few more.              I found the OR more save than the AND on FileName and ASCIIZ compares,       because a Space would match a Zero with AND. Yes it matches a Zero with       OR as well :) but I check for Zero in the second string before the OR.       __       wolfgang              --- 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