Hello all,

Here is my final release of the LIBM.EXE library assembly tool. Im postin in a new thread because this thread had become very convoluted from working out a few past bugs.

Im releasing it with source for those who are interested. It uses our OOP model for file access. The CFile.inc is the File handler class, and is an old quick and dirty hack that I once did a long while ago. It works, but its far from optimized code ( there is some fat in this class that can use some trimming ~ but for the tool's purpose it doesnt matter) ;)

The program should be straight forward to follow

    [*]1) Get the commandline
    [*]2) Check Params and if need be delete/create a working directory
    [*]3) Open asm file
    [*]4) Find header start
    [*]5) Find header end
    [*]While more PROC's
    [*]- 6) Find first PROC
    [*]- 7) Find first following ENDP
    [*]- 8) Get ProcName
    [*]- 9) Make new Asm Called 00[?].asm
    [*]- 10) Copy Header to new ASM
    [*]- 11) Copy PROC to new ASM
    [*]- 12) CLose ASM and loop back to step 6
    [*]13) Make Include file from ProcNames and ProtoLists
    [*]14) Run ML /c /nologo /coff *.asm
    [*]15) Run LIB *.obj /out:filename.lib
    [*]16) Copy back to current user directory filename.*
    [*]17) Exit.

    What there is more?
    To compile an asm file the tool will accept both x:\path and .\path (. being current directory). Here are valid examples:

    LIBM x:\path\path2\libfile.asm
    LIBM libfile.asm
    LIBM .\subfolder\libfile.asm

    All of these above examples will use the \WINDOWS\TEMP\MASMLIB\ temp directory to do its dirty work. The directory is either created if not present, or will have its contents deleted before running.

    If you hate digging thu your \windows folder, the tool has an optional output directory which can be more local to your project.

    LIBM x:\path\libfile.asm x:\OutputDir\Workhere
    LIBM libfile.asm .\OutputDir

    In this case, if the optional output directory is not there is creates it and works in it. If the directory already exists, you will be greated with a message "WARNING: About To Delete Unknown Directory! Proceed: ?". This is to ensure your dont accidently erease say your \Masm\include\ directory ;) . If you hit any other key than ( y ) it will automatically abort.

    Files generated are labled by the first 5 characters from the public PROC function, followed by a three digit number, dot ASM. The 3 digit number increments from each function to the next. This is to ensure no two files are the same name, yet give you a 5 char 'best guess' as to what fucntion is in the file. The .obj's and .ams's are not erased from the working directory until it is used again by the LIBM tool. So you can also collect them and save them for other uses later...

    Well i think i covered everything... Hope you can enjoy it. It works well on my WIN98SE machine and im presently happy with it. Let me know what you think.. I tried to give it as much punch as i could within the timeframe of last weekend (i didnt want to spend alot of time on this)...

Posted on 2003-01-06 22:50:07 by NaN
Hi NaN :)

I was so busy for the last couple days and i am still busy working.
Anyway, I just want to say thanks for your tools & source code. Also thank you very much for your time for making this lib :alright:

Best regards
Posted on 2003-01-08 14:45:22 by HermanT