The Yasm Modular Assembler Project
Key Current User-Visible Features ¶
Nearly feature-complete lexing and parsing of (preprocessed)
NASM syntax.
AMD64 support (enabled using "BITS 64" and "-m amd64" option)
64-bit (and larger) integer constants allowed (including math operations).
A simple 2-pass optimizer (it's a bit better than the NASM one).
The "real" NASM preprocessor (imported from NASM's source tree).
Portability; currently compilable on:
Key Internal Features ¶
A NASM syntax parser written in yacc. This simplifies the source code and increases performance: yacc-generated parsers are almost always faster than hand-written ones. Also, yacc (and its GNU implementation, bison) is an extremely well-tested and well-documented tool.
Architecture-specific instruction parsers hand-written for simplicity and size, as well as to make it easy to add additional architectures while retaining the same front-end syntax. The blend of yacc for syntax and a hand-written parser for instructions strikes a great balance between the strengths and weaknesses of each approach.
A
NASM syntax lexer written in re2c. A highly efficient scanner generator (almost always faster than lex/flex), it's also very embeddable due to its code generation methodology, allowing a number of re2c scanners to be used in various places in
yasm without any worries about naming conflicts.
A
GAS syntax? lexer and parser written in re2c and yacc, respectively.
Many of the modular interfaces at least superficially finished. This is still an area that needs a lot of work.
A small set of portable equivalants of useful functions that are standard on some systems (detected via configure), such as the
queue(3) set of functions, strdup,
strcasecmp, and
mergesort.
A decent (and growing) set of assembler test input files to test the entire assembler as well as specific modules
http://www.tortall.net/projects/yasm/