flat assembler
Message board for the users of flat assembler.

Index > Windows > Reading and writing to .txts, and parsing strings

Author
Thread Post new topic Reply to topic
Imagist



Joined: 13 Jun 2004
Posts: 114
Location: Pennsylvania (USA)
Imagist
I am starting my first real programming project in fasm, but I still need a little bit of help with some of the basics. The program I will be building will take a .txt file and encrypt it with a passphrase/key/protocol combination. To decrypt it, one must run the .txt through the same program with the same combination.

There are two things I need to know how to do to complete this project, which I do not know how to do in FASM: read from a .txt, write to a .txt, and parse a string (loaded from the .txt).

_________________
Many things are possible. Few things are likely.
Post 16 Jul 2004, 23:23
View user's profile Send private message Visit poster's website Reply with quote
jekyll



Joined: 25 May 2004
Posts: 14
jekyll
Use API functions:
to read from any file - CreateFile..ReadFile..CloseHandle..
to write a file - CreateFile..WriteFile..CloseHandle

To parse a string you must write your own procedure.
Post 17 Jul 2004, 02:10
View user's profile Send private message Reply with quote
Imagist



Joined: 13 Jun 2004
Posts: 114
Location: Pennsylvania (USA)
Imagist
How would I go about using the API functions (what syntax).

Is it like this?:

CreateFile filename
ReadFile [information_in_file_goes_here],filename
CloseHandle filename
Post 22 Jul 2004, 18:55
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
you need windows api documentation. Look for "winapi" or "win32api" help file (.chm or .hlp), you should find some.
Post 22 Jul 2004, 19:11
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Check here: http://flatassembler.net/docs.php
At the bottom of the page you will find exactly what you need.

Regards.
Post 22 Jul 2004, 19:40
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Imagist



Joined: 13 Jun 2004
Posts: 114
Location: Pennsylvania (USA)
Imagist
Ahh, so that's what that is!

*slaps self repeatedly for not scrolling down before*
Post 22 Jul 2004, 23:27
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.