Skip to content
Small and fast x86 assembler for DOS (without dpmi).
C Assembly Pascal
Branch: master
Clone or download
Pull request Compare This branch is 40 commits ahead of robertostling:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
original Refactoring Nov 25, 2019
.gitignore
LICENSE
README.MD

README.MD

MSA2 x86 assembler for real-mode DOS

 ooo        ooooo  .oooooo..o       .o.         .oooo.
 `88.       .888' d8P'    `Y8      .888.      .dP""Y88b
  888b     d'888  Y88bo.          .8"888.           ]8P'
  8 Y88. .P  888   `"Y8888o.     .8' `888.        .d8P'
  8  `888'   888       `"Y88b   .88ooo8888.     .dP'
  8    Y     888  oo     .d8P  .8'     `888.  .oP     .o
 o8o        o888o 8""88888P'  o88o     o8888o 8888888888

MSA2 is a old and free x86 two-pass assembler for DOS targets. It supports all Intel 8086 instructions and most of the 80186/80286 instructions.

Initialy written by a 14-year old Swedish programmer Robert Ostling (in 2000-2001) in Borland C++ 2.0. Now, MSA2 is ported to Watcom C and GCC (and/or mingw).

MSA2 Consume to small piece of memory - i think, will be enougth just 128K. MSA2 does not require DPMI.

MSA2 is pretty fast and the only file you'll need to build a program is MSA2.EXE (50 KB). It runs fine on my old 286.

MSA2 - has precompiled binary for DOS and win32. You can compile DOS programs in modern windows without DosBox.

I had not test MSA2 in FreeDOS, Linux, windows yet, but there should not be any difference where running MSA2.

To compile your source with MSA2 just type:

MSA2 coolprog.asm -o coolprog.com

Output formats

MSA2 produces next formats:

  • -f bin flat binary output
  • -f com .com file
  • -f texe .exe file with tiny memory model
  • -f ovl .ovl overlay file with tiny memory model (this is the same as texe, but with symbol table).

Examples how to use overlays - see /original/examples/OVL-TP7/ folder.

Differences with NASM

  • No macros / includes
  • No conditional jumps optimization (near/short)

Build MSA2

MSA2 could be compiled for DOS, Linux and windows with Open Watcom C, GCC, GCC/MINGW.

DOS

To build DOS version with Watcom C, just type (in original/src/)

make

or

wmake

Linux

To build Linux version with GCC:

gcc -O3 MSA.C TABLES.C ASSEMBLR.C MISC.C LEX.C -o MSA2
strip MSA2

windows

To build win32 version with mingw:

i686-w64-mingw32-gcc -m32 -O3 MSA.C TABLES.C ASSEMBLR.C MISC.C LEX.C -o MSA2W.EXE
strip MSA2W.EXE

License

This is free software: you can redistribute it and/or modify it under the terms of the MIT license. See LICENSE file.

You can’t perform that action at this time.