JWasm grew out of the Open Watcom assembler and aims at MASM 6 compatibility; it is free under the Sybase Open Watcom licence, and so are JWlink and JWlib from the same author. JWASMR.EXE is the build that runs in real-mode DOS. Assembled with it, 196 of this guide's 198 examples come out byte for byte the same as with MASM 6.11; the other two pick the other of two equivalent encodings of a register-to-register CMP.
| Option | Effect |
|---|---|
| -bin | write the memory image itself: a .COM with ORG 100h |
| -mz | write a .EXE, linked by JWasm (one module) |
| -Fo=name | name of the output file |
| -Fl | write a listing (.LST) |
| -q | quiet: no banner and file names |
| (none) | write an object file (.OBJ, OMF) for a linker |
SET PATH=C:\JWASM ;C:\JWLINK;C:\DEBUG;%PATH%JWASMR -bin -Fo=HELLO.COM HELLO.ASM ; HELLO.COMJWASMR -mz HELLOX.ASM ; HELLOX.EXEJWASMR MAIN.ASM PRINT.ASM ; two .OBJ files ...JWLINK format dos file MAIN.OBJ,PRINT.OBJ name PROG.EXE option mapJWASMR HELLO.ASMJWLINK format dos com file HELLO.OBJ name HELLO2.COMJWLIB -n UTIL.LIB +PRINT.OBJJWLINK format dos file MAIN.OBJ library UTIL.LIB name PROG3.EXE
JWlink
JWlink takes directives instead of fields: format dos for a .EXE (format dos com for a .COM), file with the object files, library with libraries, name for the program, option map for a map. The DOS build is a 32-bit program: it starts the DPMI host HDPMI32.EXE from the PATH by itself, which is why the catalog puts the two side by side in C:\JWLINK.
Where it differs from MASM
Error messages are worded differently, so an old book's error text will not match. The listing puts the offset in the first column and the bytes of an instruction together (0103 A3 0000o, the o marking an address the linker fills in); the workbench debugger reads both kinds. MASM's own bugs are not reproduced, so a rare old source that leans on one may need a change. There is no CodeView: debug with DEBUG.