Author Topic: Assembling too long  (Read 5371 times)

Vuk123

  • Regular Member
  • *
  • Posts: 3
Assembling too long
« 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?
« Last Edit: June 16, 2017, 11:10:42 AM by Vuk123 »

jj2007

  • Member
  • *****
  • Posts: 13287
  • Assembly is fun ;-)
    • MasmBasic
Re: Assembling to long
« Reply #1 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?
Masm32 Tips, Tricks and Traps

Some members can't live without insulting others. It tells us a lot about them.

Vuk123

  • Regular Member
  • *
  • Posts: 3
Re: Assembling too long
« Reply #2 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

felipe

  • Member
  • *****
  • Posts: 1381
Re: Assembling too long
« Reply #3 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:

sinsi

  • Guest
Re: Assembling too long
« Reply #4 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,
Code: [Select]
mov InputBuffer[eax], 0If the file is exactly the size of InputBuffer you have a buffer overrun problem.

JoeBr

  • Regular Member
  • *
  • Posts: 12
Re: Assembling too long
« Reply #5 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

Vuk123

  • Regular Member
  • *
  • Posts: 3
Re: Assembling too long
« Reply #6 on: June 17, 2017, 03:28:02 AM »
Thanks guys, changing Buffer Size solved my problem. You are life savers. Thank you again :D