FASM
| FASM | |
|---|---|
flat assembler |
|
| Developed by | Tomasz Grysztar |
| Latest release | 1.67.26 / 28th January 2008 |
| OS | DOS (also IDE), Windows (also IDE), Linux, Unix (OpenBSD, etc.), MenuetOS, OctaOS, DexOS, SkyOS, SolarOS |
| Genre | Assembler |
| License | Freeware / Open Source / BSD |
| Website | http://flatassembler.net |
FASM (Flat Assembler) is a free Intel-style assembler supporting the IA-32 and x86-64 architectures.
It is known for its fast speed, size optimizations, OS portability, and powerful macro capabilities. What should be noted is that FASM is very low-level assembler (unlike MASM), and uses almost no command-line options.
FASM contains bindings to the Windows GUI and OpenGL. All versions of FASM can directly output any of the following: flat "raw" binary (usable also as DOS COM executable or SYS driver), objects: ELF or COFF (classic or MS-specific), or executables in either MZ, ELF or PE format (including WDM drivers, allows custom MZ DOS stub). OMF objects, NE, LE, and LX executables are not natively supported by FASM (but see Agner Fog's OBJCONV). An unofficial port targeting the ARM architecture (FASMARM) also exists.
Contents |
[edit] History
The project was started in 1999 by Tomasz Grysztar, aka Privalov (at that time, an undergraduate student of mathematics from Poland). FASM is completely written in assembly language, comes with full source, and has been able to assemble itself since version 0.90 (May 4, 1999). The first public release was announced on March 15, 2000.
[edit] Design
FASM is a very low-level assembler. It doesn't have many common high-level statements built-in (like if-else-endif, while, assume, invoke, ... etc. known from MASM); instead it provides syntax features to emulate some such statements using macros. This makes it possible to customize these statements, and create missing statements.
FASM is a multi-pass assembler. It makes extensive code size optimization, and allows more forward referencing. A usual FASM construct is defining data or procedures only if they are used somewhere in the code, something that in most languages is done per-object by the linker.
FASM is based on the SSSO principle (same source, same output). This means the contents of the resulting file are not affected by the command line (except recently (in 1.67.24) added "-D" switch). Such an approach saves FASM sources from compilation problems often present in many assembly projects. On the other hand, it makes it very hard to maintain a project that consists of multiple separately compiled source files, or mixed-language projects. Most FASM projects are built from a single source directly into executable, without the linking stage.
[edit] Examples
- DexOS, [1] & BOS - 32-bit DOS-like OS'es
- MenuetOS, [2] - 32-bit and 64-bit GUI operating systems
- KolibriOS, [3] 32-bit GUI OS
- FASMLIB - portable library for x86 32-bit assembly programming
- PROE - x86-64 encryption engine
- RevaForth
- uFMOD - .xm player for Win32, Linux, Unix/BSD and KolibriOS
Several compilers also use FASM as a backend:
- PureBasic
- HLA (High Level Assembly)
- BlitzMax
- Context/Win32
- B0
[edit] See also
[edit] External links
- FASM project: website, official manual, examples, message board, archive of older versions
- FASMARM 1.11 - FASM for ARM processors 31-Aug-2007
- FASMLIB 0.8.0 - portable 32-bit x86 asm lib for FASM/MASM/YASM/NASM
Fresh Alpha 1.1.4 - visual FASM IDE with built-in assembler for Win32 (discontinued)
- WASM.RU - FASM message board in Russian