FAsm, by Tomasz Grysztar http://omega.im.uj.edu.pl/~grysztar/ I use an assembler called FAsm. It requires no linking, and will code a .com file with only two required lines:

   use16     ;May not be required
   org  0x100
This is opposed to an old masm I have that required a bunch of assume and other junk. With fasm, you only code what actually ends up into the file. It has macro support, but I prefer to use subs. Taken from the FAsm.doc:

     The flat assembler is a fast, efficient 80x86 assembler that runs in 'flat real mode'.  So, it must be run on at least an 80386 PC, but it can certainly assemble programs for any 80x86 PC.  Unlike many other 80x86 assemblers, fasm only requires the source code to include the information it really needs.
nullHow many FAsm users are there?
Posted on 2001-06-19 23:17:00 by eet_1024

 "We want you for Win32Asm" !

 fasm is cool. but what i don't like is that the size of an exe
 (that does nothing... just an empty window) is 4K. that's tooo

 i guess you should stick with masm, that way - you have more

Posted on 2001-06-19 23:30:00 by disease_2000
I saw in some doc on the PE format that 3072bytes is the minimum for an executable. If this is true the masm may not be fully compliant. Also, is there an easy way to get the forum (the software) to word wrap my messages? This message was edited by eet_1024, on 6/19/2001 11:41:19 PM
Posted on 2001-06-19 23:40:00 by eet_1024
yeah finish your code tags and use CRLF :) the code tag has been designed to specifically preserve any formatting, including length. use quote to get the effect you want This message was edited by Hiroshimator, on 6/20/2001 5:12:25 AM
Posted on 2001-06-20 02:55:00 by Hiroshimator
eet_1024, Both MASM and VC can produce PE files of 1k using standard options so someone is pulling your leg about a minimum size of 3k. The minimum size for a PE to work on all versions of windows is 2 sections which translates to 1024 bytes. There are some that are smaller by using non standard DOS stubs and custom written PE headers but they will not run on some versions of windows, mainly the later ones. The problem with source to binary style assemblers is that they cannot interface with other languages, MASM is produced by Microsoft and it will produce modules and libraries that can be used by C/C++. C runtime libraries and modules written in C can be used in MASM. The real problem is that the world is a complicated place and while it sounds fine to have a "simple" assembler, they cannot do what a big and well developed assembler can do. MASM has its range of directives for good reason, it is among the reason why MASM can do more than any other assembler available at the moment. MASM has been with us since the 80s and an enormous number of people have written in it at some stage so it is more or less the defacto standard for x86 assembler syntax. This is because it conforms with Intel's format. I am pleased to see people develop new tools and it is certainly a lot of work to write a working assembler but I have yet to see an x86 assembler that can compete with MASM for sheer grunt and I guess thats why so many people are using it now. Regards, hutch@pbq.com.au
Posted on 2001-06-20 03:56:00 by hutch--
As I recall, the smallest page size for Window NT, 98, ME and 2K is 4K, so even if you program was 1 byte, it will take up 4K of ram when it loads anyway. It's also worth noting that the file, again even if it was 1 byte, will take up a single cluster on your HDD, mine are also 4K, so a 1 byte file will take up 4K of disk, and if I run it 4K of RAM. It's a good challenge to get your exe really small, but at the end of the day, it's not going to make any difference to running it..... umbongo This message was edited by umbongo, on 6/20/2001 4:05:52 AM
Posted on 2001-06-20 04:03:00 by umbongo
Umbongo, Code size is important. Small code will fit in the code cache and will not be paged to disk. It will run faster.
Posted on 2001-06-20 07:42:00 by karim
The smallest possible PE contains 512B for stub and header, and 512B for one section. One can create that 1kB program using fasm with two lines of source: format PE ret But multiple sections should be used to separate code, data and resources, just because of protection advantages (under WinNT, of course). This will enlarge .exe file for small apps - each 512B is noticeable, when your code and data is about 100B, but when your code is - for example - 30kB large, section alignment won't change much. And that is why my win32app example is 4kB; you can link code and data into the one section and get it a little smaller this way.
Posted on 2001-06-21 08:13:00 by Tomasz Grysztar