Hi all,

lately i'm writing a few cgi's with the very fine assembler MASM. The cgi's are accessing some binary data and i wondered if it could be include like a variable.

So i tried the following:

data db 34,55,4,4,0,3,3,44,55,4,3,2,2,4,55,43,......

but the compiler came with an error message, the declararion was to big.

I think there must be some way..

Thanx in advance,

Eisodur
Posted on 2002-11-08 02:37:46 by eisodur
Hi eisodur,
I do not know which it is the better way in order to resolve the problem but you can break the data in more declaration.

Try to change:
data db 34,55,4,4,0,3,3,44,55,4,3,2,2,4,55,43,..

in:
data0 db 34,55,4,4,0,3,3,44
data1 db 55,4,3,2,2,4,55,43
etc..

ZaiRoN
Posted on 2002-11-08 03:56:15 by ZaiRoN
You don't have to give things labels in MASM, so you can define the start of the data in the normal way, but then have sucessive lines without a label:



myVar db "Hello this is the first line", 13, 10
db "and this is the second!", 0


The myVar is just a label, you can even jump to it I think (although the data section doesn't have execute properties, so NT systems at least will throw a wobbly).

Mirno
Posted on 2002-11-08 04:33:19 by Mirno
Thanx!!
Posted on 2002-11-08 11:06:30 by eisodur
if you need to include "large" binary data into your executable,
have a look at my bin2o which can be found at http://f0dder.has.it .
Posted on 2002-11-10 08:48:52 by f0dder
eisodur,

The tool from f0dder,bin2o is very usefull.You must try it.You can check the thread:

http://www.asmcommunity.net/board/index.php?topic=8699

Regards,

Vortex
Posted on 2002-11-14 03:17:16 by Vortex