The MASM Forum

General => The Campus => Topic started by: shekel on June 05, 2015, 09:15:41 AM

Title: Save binary file in var
Post by: shekel on June 05, 2015, 09:15:41 AM
Sorry for my English

I require a file in my program and i was thinking put in the code.. exactly in .data section.

The size of the file is 2200 bytes... so i try this code...

.data
my_file       dd 12345678h,
                  dd 87654321h,
                  ...etc...


i get this error..

code.asm(512) : error A2042: statement too complex
code.asm(512) : error A2039: line too long

Can i put the file of this way?? or i need a resource file?

I prefer this way..
Title: Re: Save binary file in var
Post by: jj2007 on June 05, 2015, 10:22:03 AM
Just do it without the commas.

.data
my_file       dd 12345678h
                  dd 87654321h
                  ...etc...
Title: Re: Save binary file in var
Post by: dedndave on June 05, 2015, 10:24:22 AM
commas if the same line
no comma at the end

data1 dd 12345678h,12345678h,12345678h
      dd 12345678h,12345678h,12345678h
Title: Re: Save binary file in var
Post by: shekel on June 05, 2015, 10:36:34 AM
Ohh god... you save my night

thanks both