flat assembler
Message board for the users of flat assembler.

Index > High Level Languages > file directive in c

Author
Thread Post new topic Reply to topic
bcdsys



Joined: 04 Aug 2008
Posts: 41
bcdsys
What is c version of fasm "file" directive? I need to include some raw binary data generated by fasm in c program, how do I do that?
Post 26 Oct 2008, 13:14
View user's profile Send private message Reply with quote
bcdsys



Joined: 04 Aug 2008
Posts: 41
bcdsys
also, I want access it as raw binary data included in exe with pointer, so I can write data to another file
method should have data access with pointer for read data
Post 26 Oct 2008, 13:16
View user's profile Send private message Reply with quote
lsa



Joined: 10 Aug 2006
Posts: 17
Location: Denmark
lsa
So, have you found a macro to do this?
I have had these problems when writing CGI programs in C (to include HTML).
An alternative is to use a fasm written object file (which uses 'file') and then link it to your C program.
Post 01 Feb 2009, 10:00
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Properly you should use resources i quess. If you really want to do it, just make a FASM object file which uses "file" and then link it to C app.
Post 01 Feb 2009, 11:53
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
There's no way to do it directly in C.

Either you use a bin2h program and include the .h files, or you use a bin2obj program (or a small f.asm using "file") and link with that. PE Resources is another possibility, but (in this example) more complex for no good reason.
Post 02 Feb 2009, 16:09
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.

Powered by rwasa.