Welcome to the 0.6.2 release of the Yasm Modular Assembler. This is primarily a bugfix release, although a few minor new features are included. Its target audience includes people who want to:
- use a mature NASM-syntax x86 and AMD64 assembler that can target Win32, Win64, MacOS X, and Unix derivatives;
- use a GAS-syntax assembler other than GAS;
- have assembly source-level debugging using either DWARF2 or CodeView 8.0 (2005);
- have a free software assembler that supports Win64 structured exception handling (SEH),
- keep track of Yasm’s progress in terms of stability and feature set;
- contribute to Yasm development from a new release.
Download Yasm 0.6.2
A number of download formats are available. For Windows and DOS users, we recommend downloading the prebuilt binaries. The source tarball contains all sources needed to build Yasm on UNIX-compatible systems, Windows, and DOS.
- Source .tar.gz
- Win32 .exe (for “normal” (Visual Studio or similar) use on 32-bit Windows)
- Win64 .exe (for “normal” (Visual Studio or similar) use on 64-bit Windows)
- Win32 .exe (for CygWin use)
- DOS .exe (for use on pure DOS or for use with DJGPP)
Changes from 0.6.1 to 0.6.2:
- AMD SSE4a and SSE5 instruction support.
- AMD LZCNT, POPCNT, EXTRQ, INSERTQ, MOVNTSD, and MOVNTSS instruction support.
- 16-bit float value (IEEE-754r half precision) support (desirable for SSE5).
- Added “oword”, “do”, and “reso” aliases for “dqword”, “ddq”, “resdq”.
- Added easier RIP-relative addressing with rel/abs modifiers and “default” directive to set default rel/abs mode (see AMD64 for details).
- CPP preprocessor. Contributed by Paul Barker
- GAS local labels (1:, 1f, 1b) support. Noticed by Jung Lee
- GAS .org fill parameter support. Noticed by Jung Lee and Xiaoming Mo
- Command line aliases for -d (-D) and -u (-U) for increased NASM command line compatibility. Requested by Mike Frysinger
- ..gotpc ELF32 bugfix: #114
- Minor bugfixes (CPU setting for a few instructions, hash lookup).
Changes from 0.6.0 to 0.6.1:
- SSE4.1 and SSE4.2 instruction support. Noticed by email@example.com
- AMD Pacifica (SVM) instruction bugfixes. Noticed by firstname.lastname@example.org
- Absolute section handling bugfixes. #103 and #106
- Support for .set directive in GAS parser. Contributed by Sebastian D’Alessandro
- -E and -s command line options, similar to NASM options of the same names (redirect errors to file and stdout, respectively). Suggested by: email@example.com
- -Wsize-override option, to turn on warnings for duplicated size overrides such as
word word. Suggested by: firstname.lastname@example.org
- Reconcile generated prefix order with GAS, to suggested Intel ordering of SEG, ADDR, DATA, LOCKREP (AMD doesn’t care).
- Fix test failure in Mach-O object format. Reported by many (e.g. #105), first by Christophe Malvasio
- end_prolog macro equivalent to end_prologue (for Win64 structured exception handling). Suggested by Brian Gladman
- Allow RIP-relative cross-section references in bin output.
- Mach-O custom sections: #102
- Other bugfixes: #104, #107
Features available in previous version of Yasm include:
Object and debugging format support:
- Full support for ELF, including support for both AMD64 and 32-bit x86 static and shared objects.
- Support for Mach-O object format used in MacOS X, including both the 32-bit (x86) and 64-bit (AMD64) versions (contributed by Henryk Richter).
- Full support for COFF (DJGPP) and Win32 (PE32) and Win64 (PE32+) object formats.
- Support for structured exception handling on Win64.
- Support for RDOFF2 (.rdf) object format.
XDF object format (64-bit basic format, similar in spirit to NASM’s RDF).
- STABS, DWARF2, and CodeView 8 debugging formats (enable with “-g …”).
Assembler syntax support:
- Full NASM-compatible parser, including the “real” NASM preprocessor (imported from NASM tree).
- GAS parser good enough to take GCC output for both AMD64 and 32-bit x86 (including DWARF2 debug information).
- Support for AMD64 instruction set, registers, and addressing modes. This is enabled in one of three ways: using the
[BITS 64]directive, using a 64-bit object format such as win64 or elf64, or setting the machine to “amd64”. Only the last two will actually generate a 64-bit object file.
- Full support for AMD64 RIP-relative addressing; the two forms supported are
[rip+val](direct index) and
[sym wrt rip](relocated relative).
- Fast and efficient “virtual multi-pass” optimizer that automatically generates much smaller code for jumps and immediates.
- Full warnings for integer overflow.
- NASM-like list format.
- Most code licensed under 2-clause BSD license, although some portions are still LGPL-licensed (NASM preprocessor module).
- Support for the -I option to specify include directories, with a search pattern essentially identical to most C compilers.
- Support for CALL/JMP FAR, including proper handling of
location EQU seg:off;
- Man pages: yasm(1), yasm_objfmts(7), yasm_dbgfmts(7), and yasm_arch(7).
Important Differences from NASM
- A number of command line options are different. Run “yasm –help” for a quick command line option summary, or read the full yasm(1) manpage for detailed descriptions of all command line options.
- Include files with relative paths are not searched in the same way. Yasm’s search behavior is essentially that of most C compilers.
As Yasm is still under development, there are some caveats and features that do not yet work or are not yet fully functional. The following are the known issues at the time of release:
- The binary object format does not yet support sections other than .text, .bss, and .data, unlike newer versions of NASM (see #71).
- Other bugs/missing features documented in Tickets area of Yasm’s website.
Compiling Yasm from source
On UNIX-compatible operating systems, Yasm builds using the standard “./configure; make; make install” commands. GNU make is not required. While Yasm development requires a larger toolchain (see the HACKING file), building Yasm should not require more than just a C compiler.
For Windows and DOS systems, we recommend simply downloading the prebuilt executables. However, for those that want to build YASM directly using DJGPP, CygWin, or Visual C++, Makefiles and all required specialized files are provided in the Mkfiles/ directory of the distribution tarball.
Command Line Option Help:
Assemble test.asm to Win32 object file test.obj with CodeView 8.0 (VS2005) source debug info:
yasm -f win32 -g cv8 test.asm
Assemble test2.asm to Win64 object file test.obj with CodeView 8.0 source debug info:
yasm -f win64 -g cv8 test2.asm
Assemble test3.asm to AMD64 ELF object file test3.o with DWARF2 debugging information:
yasm -f elf64 -g dwarf2 test3.asm
Alternative to above:
yasm -f elf -m amd64 -g dwarf2 test3.asm
Assemble test4.s (GAS syntax file) to 32-bit x86 ELF object file testo.o with DWARF2 debugging information:
yasm -p gas -f elf32 -g dwarf2 -o testo.o test4.s