12-20-2001
Correction to a stupid message of mine.
I recently posted a message concerning the slow time it
took to assemble a program that had
hG DD 65000 and that the time increased wiht the size of the
number.
What I failed to do was to post what actually I meant.
It should have read:

hG DD 65000 dup(0)

On my machine that took about 5 seconds.
When the size was increased to 1000000 it took a very long timeindeed.
My apologies for that omission.
Posted on 2001-12-20 07:42:36 by nolpak
just try... uninitialized data should not make any
problems i think...



.DATA?
hG DD 1000000 dup ( ? )
Posted on 2001-12-20 08:01:41 by mob
Thanks for the suggestion but it does not help.
Posted on 2001-12-20 09:34:54 by nolpak
youre right... this is the fault of this dumb masm compiler...
what the f**k... calculating the size of uninitialized data
should only take a few millisec's, what does this compiler
do? counting all doublewords together? making a crc32
checksum on each dup entry??? i think tasm compiles alot
faster...

but then... why do you need such amount of data, if i have
to use large buffers i use GlobalAlloc...
Posted on 2001-12-20 09:46:51 by mob
Thanks for confirming that I am not doing something really
stupid.

The application I am working on uses a lot of arrays. Some
are small and are set normallyh in the program but some are
very very large and I do use GlobalAlloc for them.

I just go curious about things and tried a large buffer as
hG DD 10000000 dup(0) out of curiosity and was quite
sujrprised when it took almost forever to assembler.
Posted on 2001-12-20 10:20:46 by nolpak
It probably takes longer because it has to write all those 0s in the .OBJ file. :)
Posted on 2001-12-20 16:36:51 by S/390
yeah thats true for initialized data i think but we speak
about uninitialized data... in my opinion thats only a
single dword in the pe-header so why should the compiler
write one million bytes to a obj. file and then represent
them with a single dword entry in the pe-hdr? btw, just
try it for yourself and write 1000000 bytes to a file, i can't
believe that this operation takes more than 1 minute ;)
Posted on 2001-12-20 17:21:15 by mob
Yes and I have done that and it is very quick.
Bt the assembler still chokes on

xx DD 10000000 dup() whether uninitilaized or not.
Posted on 2001-12-20 18:23:27 by nolpak
Yeah, MASM is not so hot (wishing this was in the crusades).
Fasm did this in a blink of the eye


format PE console
entry S

section '.code' code executable readable
S:

section '.data' data readable writeable
Phat rd 1000000
Posted on 2001-12-21 00:54:36 by eet_1024
and it created a 512 byte exe.
Posted on 2001-12-21 00:57:07 by eet_1024
If your trying to allocate soooo much data shouldnt you be trying it with GlobalAlloc or perhaps the Heap?

Just thought i would point out a tangental point of view :)

NaN
Posted on 2001-12-21 12:06:52 by NaN