A very small question:
How to save a file that was inserted with the file data type?

Also, would it be possible to insert obj files and use functions inside it?

I've not seen the latest updates, maybe it's useless or not working, but that file data type is one of the things that interested me the most in fasm (the other is the unicode text data type) and I would like to use this correctly.

Thanks
Posted on 2002-08-14 11:12:11 by Silas
I don't know what exactly do you mean, you are asking about output formats or the "file" directive?
Posted on 2002-08-15 09:31:56 by Tomasz Grysztar
Ok, I wasn't very clear. Getting my ideas out of my head and into some text isn't always easy, even more since english isn't my first language...

From the fasm.txt section 2.1.5 Defining data
-------------------
Data can be defined in two ways; if the data is to be initialised
to a specific value, the forms are:

gdtr db 16,0,0,0,0,0,0 ; sequence of bytes
attrib db 0x1E ; single byte (hexadecimal)
command: times 127 db 0 ; byte string
str001 db 'test.bin',0 ; character string
argv: times 10 dd 0 ; ten 32-bit double words
---> picture file 'star.gif' ; whole file contents
------------------

The "file" definition that I like is this one. My question is: How to save this file on disk when it's declared this way?

The other question I had: Can I use this "file" definition to put obj files or Dll or already compiled code directly and use it in the code?

Sorry if I wasn't clear...
Posted on 2002-08-15 10:54:53 by Silas
Well, I will repeat how the "file" directive works. For example, when you have "foo.dat" file which contains 5 bytes of values 1,2,3,4,5, the directive


foo file "foo.dat"

will do the same as would do:


foo db 1,2,3,4,5

And the directive


foo file "foo.dat":1,2

will have the same result as:


foo db 2,3

And this is all the "file" directive can do. Please look at the pre-release of my documentation for detailed information about fasm's directives.
Posted on 2002-08-15 13:51:43 by Tomasz Grysztar
Very nice feature! I always wanted that to have something like that! Otlichnaya rabota, tovarisch Privalov.
Posted on 2002-08-15 15:18:00 by comrade
This is one of the fasm-specific features, which are available from the very first versions. Some of the other assemblers have equivalent INCBIN directive.
Posted on 2002-08-15 17:14:26 by Tomasz Grysztar