First of all, Looooove the new look of this forum!! :D
Second, how would you include a binary file directly into your data section in masm?
Posted on 2006-04-02 09:22:30 by GorillaCoder
In nasm you can use a directive for include a bin file.

1) For masm, perhaps a option (tought I dont know mucha about masm), can be put a block in your data section, some like.

startBlock: db "overwrite me" times 500

And then use a application for search the first "overwrite me" and put your bin there. Not a clean solution, but should work :P.


2) A second option, can be use nasm for output a object file compatible with what you need, when you will link it, pass that object file to the linker, and you are done ;).
Posted on 2006-04-02 13:02:53 by rea
f0dder has a utility, bin2o, which may be of use to you.
Posted on 2006-04-02 13:14:54 by Eóin
As to including binary files in MASM: use the bintodb.exe application from the MASM32 package - it will allow you to load and "convert" any file to a series of "db" value lists
Posted on 2006-04-02 13:18:33 by Morris
All right, thanks guy's.  I'll give these suggestions a try.
It's too bad there's not an 'incbin' function or something in masm, it would make some situations a lot easier.
Posted on 2006-04-02 15:59:22 by GorillaCoder
POASM has an incbin and the masm32 project also has fda.exe

hth,
Paul
Posted on 2006-04-02 16:33:00 by PBrennick
my bin2o (or other binary->coffObject) is vastly superior to a "bin2db" approach, especially if you need to include a good deal of data. Doesn't matter if you're on a high-end machine, but people with low-end machines will certainly feel the difference.

My bin2o is at http://f0dder.reteam.org in the "export" section.
Posted on 2006-04-03 09:33:39 by f0dder
There is also a tool named fda.exe , file data assembler to convert binaries to MS COFF
Posted on 2006-04-03 12:45:47 by Vortex
Yeah, hutch's FDA has a few more options than mine, iirc... I never really got around to updating bin2o for anything but my own needs :)
Posted on 2006-04-03 13:05:07 by f0dder