I have my own 'common.lib' file, with all my custom written functions etc. that I include in most of my assembler projects. I've split my RadASM project up into multiple .inc files, which get compiled into separate .obj files. For example, I have a strings.inc file, with functions to manipulate strings. The problem I have with .lib files, is that when I call a function found in strings.inc, the linker adds the entire strings.obj file with all the string functions to my project, so my 2K EXE becomes a 22K EXE, just because I use 1 little function. I want the linker to only link that specific function to my project, what do I do? The only thing I can think of, is to separate every function into its own .inc file, that way, each will be compiled into it's own .obj file and all linked together into 1 .lib file, but imagine how many hundreds of .inc/.obj files I'll have!
Posted on 2004-06-29 01:59:47 by SubEvil
Organizing libs to not bloat your code is a bit of work. You should be putting each function into it's own object file. Do not include any code in your INC file, only in asm files, save your INC files for libs and protos and equates. Declare any data only in the asm file where it is used if possilbe, only if it is common data in a main INC file. No matter how well you arrange your libs you are going to get some bloat, but you can minimize it through proper management. Remember no more than one proc per module, if another proc needs it link will find it and load it if necessary.

You can look at my system.lib file, though for GoAsm it will give you an idea of what I mean about code organization.
Posted on 2004-06-29 02:11:53 by donkey
I have written this sample some time ago, perhaps you find it useful :)
Posted on 2004-06-29 16:20:39 by QvasiModo