i try to read a file via createfile, readfile and so on and it seems that that worx so far fine .. but now i want to scan the filled data buffer that i got for some "special formated strings" for example this way ; ignore me ; ignore me test test1 test test2 test test3 so what would be the best way to do that ? any hint or snippet would be fine ;)
Posted on 2000-12-09 17:11:00 by newbie
if you want to get the offset in memory a declared data varible (cannot be declared using LOCAL), you can use the Offset operator, e.g. mov eax,Offset Buffer or is the it is a LOCAL declared varible, ie on the stack, use the lea opcode, e.g. lea eax,Buffer eax can be used as a pointer to the buffer, e.g. mov dl,byte ptr inc eax (but it would probably be better to use esi to keep things tidy) Another way is to use masm more directly and use code that directly accesses the memory location e.g. mov al,byte ptr Buffer[0] For a sequential scan you could use code like this; xor ecx,ecx mov al,byte ptr Buffer inc ecx You could also use lodsb, lodsw etc to acess the memory once a pointer has been loaded into esi So yeah :) the list goes on, i think this was what you were meaning you needed help on.
Posted on 2000-12-10 01:08:00 by ...rugby...
thanx, i know that i should move the buffer into esi and use than edi as my destination but i have the problem how to read the data in the best way from the buffer and give it nicely formated out. The main problem is so how to make the difference between valid data and "crap"
Posted on 2000-12-10 12:47:00 by newbie