Hi,

I want to search in a piece of memory, so it doesnt stop at a Zero byte.
I want the search to be NOT case sensitive, so AB is the as ab

Thank you :lol:
Posted on 2004-09-11 08:43:11 by flapper
A double check. You know add 20h and chech again.

A is 41H +20h = a is 61h
Posted on 2004-09-12 09:49:25 by mrgone
There are lots of variations, but how about:

L1:

CMP ESI,EDI ;see if at end of search block yet
JZ >L2 ;yes, finish
MOV AL,[ESI] ;get next character
INC ESI ;increment ready for the next character
AND AL,0DFh ;convert to upper case if required
JZ L1 ;ignore any zeroes found
CMP AL,DL ;see if the same as search character
JNZ L1 ;no, try the next one
.
. ;see if subsequent characters match too
.
L2:


where:
ESI holds the start of the search block
EDI holds one past the end of the search block
DL holds the first character of search string
Posted on 2004-09-13 06:23:45 by jorgon