In my file .txt

Hello you
its good
good  work

I want to compare a line in the file txt
Example : I want to know if 'good work' is in my txt file

I do not want to use InString.
How to compare line by line ? Have an example ?
Posted on 2005-10-22 05:40:24 by kaos
I first load the whole txt file (and zero-terminate it!), then I copy "Hello you" byte-by-byte into a global
CommandString db 200 dup(?)
, until I reach a byte with value of 13, 10 or 0. Then I zero-terminate CommandString, and use it as I please.
For the next line, skip bytes with values of 13 and 10 until you reach some other value. If that value is 0, then stop reading and free the loaded file-data. Otherwise, repeat reading a line into CommandString.

Or you could simply just have a pointer to the beginning of the current line. But since in most cases I need to reformat the text data (remove comments, replace words....) I tend to use that CommandString global array.
Posted on 2005-10-23 17:45:53 by Ultrano
Why do you not want to use InString?
Posted on 2005-10-24 06:24:24 by roticv
There is an example in the MASM32 example code caled GETINI that does exactly this task, reads a file into memory then line by line.
Posted on 2005-10-24 07:20:27 by hutch--
Where is the example ? because I do not find GETINI
Posted on 2005-10-24 10:54:21 by kaos

Where is the example ? because I do not find GETINI

Posted on 2005-10-24 11:58:33 by Vortex
You can compress GETINI exempl  and uplaod on please ?
thx a lot
Posted on 2005-10-24 12:17:36 by kaos
You can download the example from . These files are placed in Service Pack 2 for MASM32 Version 8.2.
Posted on 2005-10-24 12:26:05 by Kecol