What is the best way to compile in a large amount of text, such as a README, directly into the executable? Define in a buffer? Create an atom? Into the resource file as string? When I say large I mean about 6KB worth of text that needs to be a single buffer. I just don't want that huge thing in my main code.
Posted on 2002-01-29 10:45:25 by rdaneel
Resource file would be the easiest, IMO. Unfortunately, MASM lacks a command to include a file into the assembly stream.
Posted on 2002-01-29 11:12:03 by bitRAKE
You can convert your text with the bin2db utility that comes with masm32... or as BitRAKE said include is a string resource (be aware that it will be stored as unicode, though).
Posted on 2002-01-29 12:07:33 by JCP
why store the text as a string resource? just store it as raw data :)
Posted on 2002-01-29 14:09:05 by Tola
*Plug for FAsm*:
FAsm has the file directive which will place a file into that location. But you might want to compress the readme part. Maybe someone has a good help subroutine.
Posted on 2002-01-29 14:45:02 by eet_1024
Resource strings have the advantage that you can change them without recompiling. Also you can have different languages resouces.
Posted on 2002-01-29 14:51:03 by dxantos
(be aware that it will be stored as unicode, though).

That's true, but you could store the text as RCDATA (raw data), it will be stored in raw format then.

Posted on 2002-01-29 16:22:55 by Thomas
Why not just shove it into the DATA section like normal, just keep the line length under 256 characters.

Have a look in the EXAMPLE2 directory under POPLIST for a technique to add as much text data as you like directly into an EXE file. I used the same technique for the utility LIBLIST.EXE that has about 11000 lines in it.


Posted on 2002-01-30 02:05:57 by hutch--