News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

MASM example from Japheth's JWASM distribution.

Started by hutch--, December 11, 2009, 03:45:12 PM

Previous topic - Next topic

hutch--

I was having a poke through Japheth's JWASM distribution files and found this public domain masm2htm converter. Did a quick fiddle to set it up for the libraries I have for VC2003 and it builds fine in both masm and jwasm. Shame about the extra 30k of c library junk but I could not be bothered re-writing it as it works fine and is plenty fast enough.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

z941998

Where can I get a copy of Libc.lib, external link issue

UtillMasm


japheth

Quote from: z941998 on December 12, 2009, 06:49:58 AM
Where can I get a copy of Libc.lib, external link issue

I used the static LIBC.LIB from MS VC++ Toolkit 2003. The libs contained in current MS VC versions should do as well. Alternatively, you can use file LIBC32S.LIB, which can be found in http://www.japheth.de/Download/HX/HXDEV216.zip, directory LIB. With the latter, executable file size will be just 12 kB.

z941998


Vortex

Hi Hutch,

Instead of Microsoft's VC run-time library, you can use a smaller one to get a small executable :


\masm32\bin\ml /c /coff masm2htm.asm
\masm32\bin\polink /SUBSYSTEM:CONSOLE /LIBPATH:\masm32\lib masm2htm.obj kernel32.lib msvcrt.lib crt0\crt0.lib


The result is masm2htm.exe having a size of 5120 bytes.

hutch--

Thats very impressive Erol, sounds like a good replacement for LIBC where you don't need or want all of the added functionality that it bundles with a single call to a maths function.

I took the option of using MSVCRT directly as it still allows the user defined entry point and no static libraries and the current build with a self centering window is 3k which is a reasonable size. Sad to say it does not seem to offer much advantage of a direct masm template once the crt is not available. I see that VC when tweaked carefully is capable of apps in the 100k range that have a massive amount of functionality for their size but it will mean carefully picking what gets added so it does not blow the size out.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php