1

I have been looking for a MASM compiler for Ubuntu. I have moved all of my development tools to Ubuntu. Now I'm taking a MASM class, and I need a MASM compiler very badly. I have seen some videos on YouTube. They mostly use a DOS emulator, and they install MASM compiler in there. I'm not really for looking something like this.

Here is what I am looking for:

  • Ideally it will have some logs to troubleshoot my programs.

  • Graphic user interface is a plus, but I don't need it.

  • I would prefer that the compiler is not an emulation of Windows (it would not need to use WineHQ).

I'm currently using Sublime Text with a MASM package so I don't need an IDE, however if the solution that you have is an IDE that would be OK, like a lightweight alternative to Visual Studio maybe.

What would be a good MASM Compiler under these circumstances?

karel
  • 110,292
  • 102
  • 269
  • 299
itsdarrylnorris
  • 151
  • 1
  • 5

2 Answers2

0

I would suggest jwasm (on sourcforge and on google code)

The google page lists a lot of alternatives and also shows why jwasm is better than these. Nelow a direct copy from the google code page so you get a good suggestion and you get alternative programs. You will need to try them to decide what works for you. JWasm works on Linux; all the others might not.

JWasm

Features

  • Free.
  • native support for output formats Intel OMF, MS Coff (32- and 64-bit), Elf (32-and 64-bit), Bin and DOS MZ.
  • precompiled JWasm binaries are available for DOS, Windows and Linux. For OS/2 and FreeBSD, makefiles are supplied.
  • Instructions up to SSE4.2 are supported.
  • JWasm is written in C. The source is portable and has successfully been tested with Open Watcom, MS VC, GCC and more.
  • JWasm's source code is released under the Sybase Open Watcom Public License, which allows free commercial and non-commercial use.

Compared to other assemblers

MASM

  • JWasm is free, no artificial license restrictions, can be used to create binaries for any OS.
  • JWasm is open source, forget the annoying MASM bugs ...
  • More output formats supported (Bin, ELF).
  • Optionally very small object modules can be created
  • Better support for Open Watcom, for example the register-based calling convention
  • JWasm is faster than Masm.

TASM

  • JWasm is available. TASM isn't legally available. And LZASM, which is sort of a TASM clone, understands IDEAL mode only.
  • JWasm has full support for STRUCTs and UNIONs. TASM has severe limitations and bugs in this area.
  • JWasm supports virtually all MASM v6 features (PROTO, INVOKE, hll directives, ... ), most of which TASM won't understand.
  • JWasm supports instructions up to SSE4, TASM is behind.

POASM

  • JWasm is open source
  • JWasm additionally supports output in OMF, ELF and binary format
  • JWasm supports 16-bit and segmented memory models. POASM understands FLAT only.
  • JWasm is compatible with MASM's implementation of macros. POASM isn't.
  • POASM lacks the ability to create a listing file.

WASM

  • JWasm's macro capabilities are ways better than Wasm's.
  • JWasm fully supports Masm v6 syntax. In Wasm, most of the additions done in Masm v6 are missing.
  • Besides OMF, JWasm supports COFF, ELF and binary output formats. JWasm supports 64-bit.
Rinzwind
  • 293,910
  • 41
  • 570
  • 710
0

I think that it is important to point out that jwasm lack support for POSIX based calling conventions (System V like systems), so, if you are willing to use fetures like proto/procs with parameters, be aware that those parameters will be passed throught the registers by C/C++ compilers, but jwasm wont use the right registers but the stack as parameters so you won't be able to use parameters names as usual on 64bits architecture.