Programming with FASM – reading from file.

In the last article tutorial, I wrote about how to write a message to a text file named file.txt.
Now, I will show you how to read that message.
You must use the ReadFile function defined after fileapi.h, in WIN32AX.INC.
The text is shown in modal dialog – has some limitations in terms of mode or the number of lines.
In the source code that writes the file, I don’t use CreateFile, but you can use it.
There are many exceptions and peculiarities in assembly language programming.

You can use the same commands to create the EXE file and run it:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.