The MASM Forum

Miscellaneous => Irvine Book Questions. => Topic started by: Vuk123 on June 16, 2017, 09:35:22 AM

Title: Assembling too long
Post by: Vuk123 on June 16, 2017, 09:35:22 AM
Hi guys,

i am using visual studio 2015 with Irvine library, but assembling non simple program (more than 10 lines) takes few minutes. Any ideas on why is this happening?
Title: Re: Assembling to long
Post by: jj2007 on June 16, 2017, 10:30:08 AM
My crystal ball is currently not working. Maybe you could post your code, and some more info on your configuration?
Btw how much .data do you reserve for your variables?
Title: Re: Assembling too long
Post by: Vuk123 on June 16, 2017, 11:24:30 AM
I have visual studio 2015 and i followed instructions from Irvine's website(downloaded Irvine lib and sample project). This code just opens file and store it's data in InputBuffer variable. Any help is appreciated. Thank you
Title: Re: Assembling too long
Post by: felipe on June 16, 2017, 12:34:48 PM
Maybe it would be a good idea putting the code with the '#' option. Probably it will be more easy for others to help you.  :icon14:
Title: Re: Assembling too long
Post by: sinsi on June 16, 2017, 05:36:13 PM
There is a problem with ML and large buffers (in this case 256*256*20 bytes) which takes a long time to create the .obj

One other possible problem,
mov InputBuffer[eax], 0
If the file is exactly the size of InputBuffer you have a buffer overrun problem.
Title: Re: Assembling too long
Post by: JoeBr on June 17, 2017, 01:28:57 AM
Also, your var declaration
...
(nope, Sinsi already got it and I didn't READ IT, mybad :()
On that, look up the GlobalAlloc() and HeapAlloc() API calls, and also GlobalFree() and HeapFree() for deallocation.
...
Joe
Title: Re: Assembling too long
Post by: Vuk123 on June 17, 2017, 03:28:02 AM
Thanks guys, changing Buffer Size solved my problem. You are life savers. Thank you again :D