Babble Software Text Dolphin Info Image Gallery Forums HOME

Bin2Inc - v0.1


If this software is cool or useful to you, consider a small donation to the programmer! There is *no* need to pay to download and enjoy this software! But it's a lot of work and I do it in my so-called spare time, so a couple of dollars would be really appreciated! :)
(Alternately, there's my Amazon Wishlist)

Click here to download:
0 downloads this week
112 downloads total
windows.gif Download bin2inc and source for Windows (40.6 k)  

This program converts binary files into include files for C or assembly programs. It created an array for C, or a labelled block of data for asm, and the assembly side lets you specify the tokens used by the assembler. It also provides a size reference for you to use.

C looks like this:

bin2inc stdafx.obj outfile.c temp

// Data file stdafx.obj - Nov 15, 2009

const unsigned char temp[] = {
	0x4C,0x01,0x5A,0x00,0xBB,0xAF,0x00,0x4B,0x3C,0x86,0x00,0x00,0x6B,0x01,0x00,0x00,	// L.Z....K<...k... //
	0x00,0x00,0x00,0x00,0x2E,0x64,0x72,0x65,0x63,0x74,0x76,0x65,0x00,0x00,0x00,0x00,	// .....drectve.... //
	0x00,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x24,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,	// ....X...$....... //
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0A,0x10,0x00,0x2E,0x64,0x65,0x62,	// .............deb //
	0x64,0x40,0x40,0x59,0x41,0x58,0x50,0x41,0x58,0x40,0x5A,0x00,0x00,0x00,0x00,0x00,	// d@@YAXPAX@Z..... //

// Size of data in above array (Array may be padded but this will be correct)
#define SIZE_OF_TEMP 44012

Assembly looks like this (example for the TI assembler):

bin2inc stdafx.obj outfile.asm TEMP BYTE *

* Data file stdafx.obj - Nov 15, 2009

 BYTE 0x4C,0x01,0x5A,0x00,0x61,0xB1,0x00,0x4B  * L.Z.a..K
 BYTE 0x3C,0x86,0x00,0x00,0x6B,0x01,0x00,0x00  * <...k...
 BYTE 0x00,0x00,0x00,0x00,0x2E,0x64,0x72,0x65  * .....dre
 BYTE 0x64,0x40,0x40,0x59,0x41,0x58,0x50,0x41  * d@@YAXPA
 BYTE 0x58,0x40,0x5A,0x00,0x00,0x00,0x00,0x00  * X@Z.....

* Size of data in above array (Array may be padded but this will be correct)

Last Update:2009-11-15

<-- Previous software in Windows (ID3Cover)Next software in Windows (ModConvertPSG) -->
<-- Previous software in All (TI Artist+ Photoshop Plugin)Next software in All (MUFopoly) -->

Back to Software Menu

Babble Software Text Dolphin Info Image Gallery Forums HOME

This page belongs to
Let's see your energy!
Email addresses are provided for personal contact only. The operator of this website will not give, sell, or otherwise transfer email addresses maintained by or for this website to any other party for the purposes of initiating, or enabling others to initiate, unsolicited electronic mail messages. Personal pages on do not necessarily reflect opinions or official stances of HarmlessLion as a business, which is in itself only me anyway. ;)