Rugxulo
Usono, 21.12.2023, 18:10 |
mininasm (Developers) |
mininasm is a fork of Oscar Toledo's tinyasm which aims to be both more compatible with regular NASM as well as more efficient in memory. The latest release version v6 on Github is dated from late last year (Dec. 2022).
The prebuilt DOS .COM is 20 kb, but it seems to be buggy and doesn't fully work for me. If I compile it manually with a C compiler, then it works. Even his tests don't fully work anymore, but at least a TC++ compile matches (partial) output with my i16gcc build (mentioned below).
In the interest of Free Software, i.e. instead of Turbo C or even OpenWatcom, I tried to patch it to build with i16gcc (IA16-ELF). I don't know if it's 100% correct, but it seems to work.
diff -s --color -U0 old/mininasm.c new/mininasm.c
--- old/mininasm.c 2022-12-14 11:25:12 +0000
+++ new/mininasm.c 2023-12-19 04:27:20 +0000
@@ -0,0 +1,4 @@
+#ifdef __IA16_SYS_MSDOS /* tested with 20230701 */
+#include <fcntl.h>
+#define creat(filename, mode) open(filename, O_CREAT | O_TRUNC | O_WRONLY | O_BINARY, mode)
+#endif
Part of the advantage to mininasm is that you can compile it with Tiny model, and it's still very efficient and will work! Other memory models might be better. (i16gcc also supports Small, obviously.) He recommends "-mc -O -X" for TC and similarly Compact model for OpenWatcom. I believe his prebuilt .COM is disassembled / tweaked manually, hence it's slightly smaller size. For i16gcc Small, I'm getting roughly 25 kb (UPX'd down to 16 kb).
Once recompiled, it does seem to work fairly well. More feedback and testing is welcome. |
Zyzzle
22.12.2023, 03:47
@ Rugxulo
|
mininasm |
>
> Once recompiled, it does seem to work fairly well. More feedback and
> testing is welcome.
Please post your (smallest, working) binaries, if possible, or link to where you've placed them. Would like to try & compare. |
roytam
22.12.2023, 09:05
@ Rugxulo
|
mininasm |
> The prebuilt DOS .COM is 20 kb, but it seems to be buggy and doesn't fully
> work for me.
then it could be a bug of https://github.com/pts/dosmc |
roytam
25.12.2023, 06:30
@ Zyzzle
|
mininasm |
> >
> > Once recompiled, it does seem to work fairly well. More feedback and
> > testing is welcome.
> Please post your (smallest, working) binaries, if possible, or link to
> where you've placed them. Would like to try & compare.
I put binary compiled with dosmc latest rev here:
https://github.com/pts/dosmc/issues/8 |