I have read the forums a couple time now and have seen questions on putting dlls into your exe or other files.

One way is to add it as a resource...... which is ok but I don't like to use the resource to much.

The other way is to put it in as db format.

I have not seen a tool that does this for ASM. I also did not look to hard for one.

I decided to make to tool that converts any file into ASM DM format.

The program is called

HEX 2 ASM DB v1.2

The way you use this program is run it and put in the DB name into the text field and then open the file
to convert.

the output file will be "filename".inc ;no qoutes

This program supports multiple files at once.

so if you type in


the code in the file would look something like this:

TEST_00_00 db 04Dh,05Ah,090h,000h,003h,000h,000h,000h
TEST_00_01 db 000h,004h,000h,000h,000h,0FFh,0FFh,000h
TEST_00_02 db 000h,000h,0B8h,000h,000h,000h,000h,000h
TEST_00_03 db 000h,000h,000h,040h,000h,000h,000h,000h
TEST_00_04 db 000h,000h,000h,000h,000h,000h,000h,000h
TEST_00_05 db 000h,000h,000h,000h,000h,000h,000h,000h
TEST_00_06 db 000h,000h,000h,000h,000h,000h,000h,000h
TEST_00_07 db 000h,000h,000h,000h,000h,000h,000h,000h

TEST = What you typed into the text field
_00 = The file number os if it was the next file it would be _01
_01 - _07 = Are the line numbers
db = Im sure you all know what that is for
The res is the hex code

So as you can see each file will have its own DB String name and not conflict with each other.

The reason for having lines and groups of 8 bytes for each line is so that the DB does not get to complex
for the compiler. other wise it would not compile your program.

I Made this for use with MASM and do not know if it works on any other ASM Compilers because i dont
program in any others right now. I guessing it should work from them also.

Download the pgoram from http://www.devilsclaws.net/asm/tools/hex2asmdb.zip

I hope you all enjoy this program.

Sorry For the original Releasses..

First time i was calculating the lines *8 = extra byes to get the file size and they matched. i noticed the
bottem bytes did not match. then i fixed it to. but then the lines did not match the size anymore
mecause the list byte of each line was also the first byte of the next line. i corrected that and corrected
a bomb out probelm that happend when you when to a lower directory then before... i had to 0 out the
old directory path to fix it...

The current versiom i have tested by bytes. size and by compiling it and extracting it out of the code and compairing... everything matches up..

Posted on 2003-04-02 04:58:13 by devilsclaw
Quick Tip To Those who downloaded version 1.0 or 1.1... go into you internet option and clear you temp internet files... sence the file is cached when downloaded you will end up getting the old version unless you clear out your cache
Posted on 2003-04-02 05:13:18 by devilsclaw
MASM32 has a tool to convert bin files to db format...

f0dder also coded a nice utility that converts a binary file to an object file that can be linked against your program : f0dder.has.it
Posted on 2003-04-02 08:52:01 by JCP