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!
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
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.
Use TASM :)
Use FASM :)
Posted on 2002-07-30 15:03:42 by bazik
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.
Use SPASM :)
Use NASM :)
Use GoASM :)
No seriously, I would suggest to allocate that structure at runtime.
No seriously, I would suggest to allocate that structure at runtime.
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.
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.
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:What good is an error return if you don't use it? :grin:
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?!
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?!
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.
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: