char string[] = "this is a string";
char *cptr;
for( cptr = string; *cptr; cptr++ )
if( *cptr == 'a' )
break;
why doesnt this work:
cld
lea si, string
forloop:
lodsb
cmp al, 0
jz end
cmp al, 'a'
je end
jmp forloop
end:
please
#define work
some random thoughts:
- is that a code snippet or the whole code?
- check ds register
- quoting homework text:
>32-bit Intel assembly instructions
Claudio