Building NASM 2.09 for 8086 (Announce)
In reply to Rugxulo's question in March:
> (NASM
> version 2.09 available)
> >
> > I today got it to compile for an 8086 DOS target after stripping
> > the supported instruction set down to 686 - both executables
> > (NASM and NDISASM) appear to work, but NASM.EXE is a 460 KiB file
> > which means that it barely runs at all and usually crashes if I try
> > to assemble anything at all (at least I hope the crash is only due
> > to running out of memory). NDISASM.EXE works fine though, and is
> > just about 110 KiB.
> >
> > So NASM still can be compiled for 8086 systems. If I have time for that,
> > I might look into stripping it down better to get the executable's size
> > down. Maybe write some code to let it use disk or XMS swapping? Hmm.
>
> ecm, do you remember, ten years ago (2010), saying you reduced NASM
> 2.09 down to get it to build for 16-bit DOS?
I found the source tree / binaries that I'd modified in 2010 August to make it compile with OpenWatcom for an 8086 target. A simple test (in current dosemu2) causes a crash, but I assume the binary worked at some point or on some machine. Running out of memory is the most likely error.
I didn't get around to examining all the changes yet, but you can diff the files present in the original NASM source distribution to the files in my development copy.
The mak.bat file shows that I manually called wcl (the OpenWatcom compiler driver) with the -nd option for several files, each specifying a different name. According to the manual that means:
> nd=<name> set name of the "data" segment
I also modified the instruction set tables to drop many if not all post-686 instructions. I don't know which file I edited to recreate the tables or how I did these edits, though.
---
l
Complete thread:
- Building NASM 2.09 for 8086 - ecm, 06.09.2020, 23:04 (Announce)
- Building NASM 2.09 for 8086 - Rugxulo, 13.09.2020, 01:15