From Seo Wiki - Search Engine Optimization and Programming Languages
|Stable release||1.68 / 2009-6-13|
|Preview release||1.69.10 / October 28, 2009|
|Operating system||DOS (also IDE), Windows (also IDE), Unix-like (Linux, OpenBSD, etc.), MenuetOS, OctaOS, DexOS (also IDE), SkyOS, Solar_OS|
|License||Freeware / Open Source / BSD|
FASM (Flat Assembler) is a free and open source Intel-style assembler supporting the IA-32 and x86-64 architectures. It is known for its high speed, size optimizations, OS portability, and macro capabilities. It is a low-level assembler and intentionally uses very few command-line options (see 'SSSO').
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). Complex or obscure output file formats, such as OMF, NE, LE, and LX, are not natively supported by FASM (but see ObjConv). An unofficial port targeting the ARM architecture (FASMARM) also exists.
The project was started in 1999 by Tomasz Grysztar, aka Privalov (at that time, an undergraduate student of mathematics from Poland) and its first public release was announced on March 15, 2000. FASM is completely written in assembly language and comes with full source. It is self-hosting and has been able to assemble itself since version 0.90 (May 4, 1999). It has been used to write several operating systems including MenuetOS, and DexOS.
FASM originally only ran in 16-bit flat real mode, which later was changed to 32-bit one, and then supplemented with optional DPMI support. However it had been written in such a way, that it was easy to port it into any operating system that allowed the flat 32-bit addressing (mainly because it was at first intended to be a tool aimed at OS development), and this way the ports for Windows and then Linux were created.
FASM is a low-level assembler. It does not support as many high-level statements as MASM or TASM. Instead it provides syntax features and macros which make it possible to customize or create missing statements. Its memory addressing syntax is similar to TASM's ideal mode and NASM. Brackets are used to denote memory operands as in both assemblers but their size is placed outside the brackets like in NASM.
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. 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. (However, the Win32 FA.EXE wrapper mitigates this somewhat.) FASM projects can be built from a single source directly into executable without a linking stage.
- DexOS,  & BOS - 32-bit DOS-like OS'es
- Derrick,  A 32-bit protected mode OS
- MenuetOS,  - 32-bit and 64-bit GUI operating systems
- Miraculix,  - 32-bit GUI operating systems
- FASMLIB - portable library for x86 32-bit assembly programming
- PROE - x86-64 encryption engine
- uFMOD - .xm player for Win32, Linux, Unix/BSD and KolibriOS
Several compilers also use FASM as a backend:
- ↑ Tomasz Grysztar. "Flat Assembler Programmer's Manual". http://flatassembler.net/docs.php?article=manual. Retrieved 2008-05-12.
- ↑ 2.0 2.1 2.2 2.3 2.4 Randall Hyde. "Which Assembler is the Best?". http://webster.cs.ucr.edu/AsmTools/WhichAsm.html. Retrieved 2008-05-18.
- ↑ "FASMARM". 2008-03-20. http://arm.flatassembler.net/. Retrieved 2008-05-12.
- ↑ 4.0 4.1 "Interview with Privalov the author of FASM". http://www.wasm.ru/print.php?article=privalov_en. Retrieved 2008-05-12.
- ↑ Tomasz Grysztar (2000-03-15). "flat assembler". http://marc.info/?l=freedos-dev&m=95311018003959&w=2. Retrieved 2008-05-19.
- ↑ "MenuetOS". http://www.menuetos.net/. Retrieved 2008-05-18.
- ↑ ""DexOS FAQ"". http://www.dex4u.com/faq.htm. Retrieved 2008-05-18.
- ↑ 8.0 8.1 8.2 Tomasz Grysztar. "Flat Assembler Design Principles". http://flatassembler.net/docs.php?article=design. Retrieved 2008-05-12.
- FASMARM 1.13 - FASM for ARM processors 04-Nov-2008
- FASMLIB 0.8.0 - portable 32-bit x86 asm lib for FASM/MASM/YASM/NASMde:Flat Assembler