Hi, On Thu, May 2, 2019, 7:32 AM ZB <[email protected]> wrote:
> > Well my "host platform" obviously is 16 bit - since it's FreeDOS. > > But yes, I was indeed somewhat amazed at "mammoth size" of NASM binary, > compared, as example, to modest 33 KB of A86.COM. > A86 is well-written, of course, but there are several caveats you must understand before comparing it to NASM. For one, it's self-assembling (according to author), meaning written by hand with no compiler. It's 8086-friendly, meaning it uses 16-bit instructions, which individually are smaller than 32-bit. Also, A86.COM [sic] doesn't support higher than 286, and the only outputs are flat binary (or .COM, close enough) and OMF/.OBJ. Also, I'm vaguely sure that it's compressed! Even A386.COM is only roughly 5 kb bigger, but most of the same caveats apply. (Also, it's one-pass only, meaning simpler but faster.) The 16-bit, UPX-compressed, NASM 0.98.39 from 2005 is 72 kb. It only supports Win32 (PE/COFF), bin, as86/a.out, and OMF/OBJ. But probably up through SSE2 (aka, P4). The 32-bit DJGPP build with all outputs will UPX to 134 kb (but could definitely be smaller with different libc or compiler switches). For comparison, 16-bit NASM 0.97, without -O (automatic size optimizations), only supporting through MMX (late P1), with all output formats, seems to compress to 68 kb. Try also comparing FASM. Clearly all the added AVX and newer stuff bloated it up quite a lot! 1.60 was 65 kb, 1.68 was 77 kb, 1.70.03 was 94 kb, and 1.73.10 is 105 kb. (None of those are compressed, though. Latest compresses to 54 kb.) FASMG has greater flexibility and puts all instructions as external macros, so it's only roughly 53 kb (Win32 console version), uncompressed. There are various other assemblers, often very small, with different features. >
_______________________________________________ Freedos-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freedos-user
