With the code below, MASM seems to assemble forever. There is no error or something, it just won't finish assembling. The DOS window is responsive: I can press Ctrl-C and it asks me immediately if I really want to cancel the batch job.

Why is that? Is the structure too big (78722 bytes), did I use a reserved word, is it something else? Any help appreciated!




.386
.MODEL flat, stdcall
option casemap:none

include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc

includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\user32.lib


.DATA

linespercase = 28 + 28 + 28 + 40 + 28 + 40 + 28 + 40 + 28 + 40

aLine STRUCT
experiment db 20 * linespercase dup (?)
subject db 20 * linespercase dup (?)
session db 20 * linespercase dup (?)
trialproc db 20 * linespercase dup (?)
cycle db 20 * linespercase dup (?)
subtrial db 20 * linespercase dup (?)
datos db 20 * linespercase dup (?)
tipo db 20 * linespercase dup (?)
acc db 20 * linespercase dup (?)
cresp db 20 * linespercase dup (?)
resp db 20 * linespercase dup (?)
rt db 20 * linespercase dup (?)
crlf db 2 dup (?)
aLine ENDS

theData aLine linespercase dup (<>)


.CODE

start: invoke ExitProcess, NULL
end start

Posted on 2002-07-30 14:46:13 by Frank
This is a problem with MASM - allocation with such large structures takes a very long time. It is better to put large structures in a separate object file, or use another assembler. ;) To verify the truth to what I say open Task Manager and watch the memory usage for MASM slowly climb.
Posted on 2002-07-30 14:52:10 by bitRAKE
Use TASM :)
Posted on 2002-07-30 14:55:06 by stryker
Use FASM :)

Posted on 2002-07-30 15:03:42 by bazik
Copycat...

Use SPASM :)

Use NASM :)

Use GoASM :)

No seriously, I would suggest to allocate that structure at runtime.
Posted on 2002-07-30 15:07:07 by stryker

No seriously, I would suggest to allocate that structure at runtime.
I prefer to blue screen the bugger if he doesn't have more RAM. :tongue:
Posted on 2002-07-30 15:08:44 by bitRAKE
Use BRAIN :)

I just noticed that I need only a single instance of the structure, not hundreds of them. Assembly time is now back to less than 1 second.

Thank you, BitRAKE.
Posted on 2002-07-30 15:16:42 by Frank
I prefer to blue screen the bugger if he doesn't have more RAM
Linked List? Deallocation? Memory Allocation Functions returns an error if there isn't much RAM to allocate? :tongue:
Posted on 2002-07-30 15:21:37 by stryker
What good is an error return if you don't use it? :grin:
Posted on 2002-07-30 17:32:02 by bitRAKE
Isn't these horribly long assemble times even with BSS data
sorta ridiculous? I can understand them for normal initialized
data (even though it should be possible to do it in a smarter
way), but for un-initialized data?!
Posted on 2002-07-30 18:18:32 by f0dder
Certainly! And this is kind of shocking given the general power of the assembler - seems like a rather major oversight - some stuff hasn't been updated for the current times.
Posted on 2002-07-30 19:49:59 by bitRAKE
What good is an error return if you don't use it?
Well, it means there isn't much more RAM and we cannot add more to the linked list(This is as much data as we can handle). :grin:
Posted on 2002-07-30 21:08:12 by stryker