Ok, at first a hello everyone. I'm familiar with asm (see the link in my sig if you wish) but this win32 coding is killing me.

What to say to the linker that it wouldn't add A LOT of imports to functions I've even heard of? Like, the std "Hello World!" proggy is a 4k file with basically no stuff in the .exe than the code, zeros and some other stuff. Now, when I've used a few imports like "GetModuleHandleA", "ShowCursor" etc. (I believe DirectX stuff doesn't add much to the filesize, except codewise) the .exe is suddenly 8k and there is that forementioned bunch of imports.

Not that this was very annoying (I can always pack the .exe to something like that 4k, yes, I try to code a 4k intro) but I'd really like to know how to cut the file size without any magic.
Posted on 2002-04-16 20:08:36 by tmb
Here are some links that discuss this...

You can also search the board for this topic (comes up pretty often).

Thread 1

Thread 2

Sliver
Posted on 2002-04-16 20:38:44 by Sliver
Ok, thanks! I found out a trick to get int 4096b... i.e. putting all data and structures in .code area so there's not .data... the imports are still there though.

That is:

-----
.data
number dd 42
.code
start: ret
end start
------
becomes...
------
.code
number dd 42
start: ret
end start
------
Posted on 2002-04-16 21:09:03 by tmb
If you write to data in your .code, be sure to make the code segment
writeable :)
Posted on 2002-04-17 07:27:09 by f0dder
f0dder: Of course, of course. I actually have a little patcher in my assy.bat that automatically does that. I'm in love with smc :) I really think that's one of the best parts in asm coding. Dunno if it's any faster nowadays but it sure is damn leet. :)
Posted on 2002-04-17 11:03:20 by tmb