Home

JWasm

1. About

JWasm is a MASM v6 compatible assembler. It's a fork of Open Watcom's WASM and released under the Sybase Open Watcom Public License, which allows free commercial and non-commercial use. JWasm is written in C, source code is open.

JWasm Features:
- JWasm natively supports output formats Intel OMF, MS Coff, Elf, 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 SSSE3 are supported.
- The JWasm source is portable and has successfully been tested with Open Watcom, MS VC, GCC and more.
- As far as programming for Windows is concerned, JWasm can be used with both Win32Inc and Masm32.
- C header files can be converted to include files for JWasm with h2incX.

More details.

2. User Feedback

JWasm uses SourceForge for user feedback:

3. JWasm compared with other MASM-like Assemblers

There are - at least - 4 assemblers available which (partially) understand MASM syntax:
  • MASM, the original from Microsoft
  • WASM, part of Open Watcom
  • TASM, from Borland
  • POASM, part of PellesC
JWasm compared with Advantages Disadvantages
MASM JWasm is free, no artificial license restrictions, can be used to create binaries for any OS. JWasm's debug information is limited
JWasm is open source, forget the annoying MASM bugs ...
ELF output format is supported.
optionally very small object modules can be created
better support for Open Watcom, for example the register-based calling convention
Since v1.9, JWasm is faster than Masm.
WASM JWasm is a fork of Wasm; there was a huge amount of additions and bugfixes. [Wasm isn't Masm v6 compatible. It's also not really Masm v5 compatible. It understands both Masm v5 and v6 syntax partially. Additionally it knows how to encode instructions implemented in newer cpus.] None
TASM JWasm is available. TASM isn't legally available. And LZASM, which is sort of a TASM clone, understands IDEAL mode only. TASM additionally understands IDEAL mode. This was a big advantage compared to MASM v5.1, but compared to MASM v6 syntax there are no benefits anymore.
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 SSSE3, TASM is behind.
POASM JWasm is open source JWasm (at least v1.xx) doesn't support 64bit.
JWasm supports output in OMF 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.

 

4. Samples

A Win32 console sample program for JWasm

;--- Win32 "hello world" console application

    .386
    .MODEL FLAT, stdcall
    option casemap:none

STD_OUTPUT_HANDLE equ -11

WriteConsoleA proto :dword, :dword, :dword, :dword, :dword
GetStdHandle  proto :dword
ExitProcess   proto :dword

    .CONST

szString    db 13,10,"hello, world.",13,10
LSTRING     equ $ - szString

    .CODE

main    proc

local   dwWritten:dword
local   hConsole:dword

        invoke  GetStdHandle, STD_OUTPUT_HANDLE
        mov     hConsole,eax

        invoke  WriteConsoleA, hConsole, addr szString, LSTRING, addr dwWritten, 0

        xor     eax,eax
        ret
main    endp

;--- entry

mainCRTStartup  proc c

        invoke  main
        invoke  ExitProcess, eax

mainCRTStartup endp

    END mainCRTStartup


DOS COM Sample
DOS DPMI16 Sample
DOS DPMI32 Sample
DOS Sample how to switch to 64-bit
OS/2 16bit Console Sample
OS/2 32bit Console Sample
Win16 GUI Sample
Win32 console Sample (Win32Inc)
Win32 GUI Sample (Masm32)
Win32: create PE binary without linker
Win64 MessageBox Sample
Win64 GUI Sample
Win64 GUI Sample with SEH support (Masm comp.)
Win64 GUI Sample with SEH support (JWasm only)
Linux Sample using syscalls
Linux Sample using libc
Linux X GUI Sample
Linux 64-bit Sample using syscalls

5. Roadmap

Pipeline for next releases:
  • support for 64-bit.
  • improve debug info output (type information).

6. Downloads

Binary
Win32, DOS
Binary
Linux
Binary
DOS 16-bit
Source
JWasm v1.96 07/26/2009 JWasm196b.zip JWasm196bl.zip JWasm196br.zip JWasm196s.zip change log
JWasm v2.0pre (64bit capable) 08/31/2009 JWasm200b.zip JWasm200bl.zip JWasm200s.zip
 
JWasm v1.95 05/26/2009 JWasm195b.zip JWasm195bl.zip JWasm195s.zip
JWasm v1.94c 12/24/2008 JWasm194cb.zip JWasm194cbl.zip JWasm194cs.zip