HOME

TheInfoList



OR:

FASM (''flat assembler'') is an assembler for
x86 x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel, based on the 8086 microprocessor and its 8-bit-external-bus variant, the 8088. Th ...
processors. It supports Intel-style
assembly language In computing, assembly language (alternatively assembler language or symbolic machine code), often referred to simply as assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence bet ...
on the
IA-32 IA-32 (short for "Intel Architecture, 32-bit", commonly called ''i386'') is the 32-bit version of the x86 instruction set architecture, designed by Intel and first implemented in the i386, 80386 microprocessor in 1985. IA-32 is the first incarn ...
and
x86-64 x86-64 (also known as x64, x86_64, AMD64, and Intel 64) is a 64-bit extension of the x86 instruction set architecture, instruction set. It was announced in 1999 and first available in the AMD Opteron family in 2003. It introduces two new ope ...
computer architectures. It claims high speed, size optimizations,
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
(OS) portability, and macro abilities. It is a low-level assembler and intentionally uses very few command-line options. It is
free and open-source software Free and open-source software (FOSS) is software available under a license that grants users the right to use, modify, and distribute the software modified or not to everyone free of charge. FOSS is an inclusive umbrella term encompassing free ...
. All versions of FASM can directly output any of the following: flat "raw" binary (usable also as MS-DOS COM executable or SYS driver), objects:
Executable and Linkable Format In computing, the Executable and Linkable FormatTool Interface Standard (TIS) Portable Formats SpecificationVersion 1.1'' (October 1993) (ELF, formerly named Extensible Linking Format) is a common standard file format for executable files, obje ...
(ELF) or Common Object File Format (COFF) (classic or MS-specific), or executables in either MZ, ELF, or
Portable Executable The Portable Executable (PE) format is a file format for executables, object file, object code, Dynamic-link library, dynamic-link-libraries (DLLs), and binary files used on 32-bit and 64-bit Microsoft Windows, Windows operating systems, as well ...
(PE) format (including WDM drivers, allows custom MZ DOS stub). An unofficial port targeting the
ARM architecture ARM (stylised in lowercase as arm, formerly an acronym for Advanced RISC Machines and originally Acorn RISC Machine) is a family of reduced instruction set computer, RISC instruction set architectures (ISAs) for central processing unit, com ...
also exists.


History

The project was started in 1999 by Tomasz Grysztar, a.k.a. ''Privalov'', at that time an undergraduate student of mathematics from
Poland Poland, officially the Republic of Poland, is a country in Central Europe. It extends from the Baltic Sea in the north to the Sudetes and Carpathian Mountains in the south, bordered by Lithuania and Russia to the northeast, Belarus and Ukrai ...
. It was released publicly in March 2000. FASM is completely written in
assembly language In computing, assembly language (alternatively assembler language or symbolic machine code), often referred to simply as assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence bet ...
and comes with full source. It is self-hosting and has been able to assemble itself since version 0.90 (May 4, 1999). FASM originally ran in 16-bit flat real mode. 32-bit support was added and then supplemented with optional DPMI support. Designed to be easy to port to any operating system with flat 32-bit addressing, it was ported to Windows, then Linux.


Design

FASM does not support as many high-level statements as MASM or TASM. 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 unconstrained forward referencing. An unusual FASM construct is defining procedures only if they are used somewhere in the code, something that in most languages is done per-object by the
linker Linker or linkers may refer to: Computing * Linker (computing), a computer program that takes one or more object files generated by a compiler or generated by an assembler and links them with libraries, generating an executable program or shar ...
. FASM is based on the "same source, same output" principle: the contents of the resulting file are not affected by the command line. Such an approach saves FASM sources from compiling problems often present in many assembly projects. On the other hand, it makes it harder to maintain a project that consists of multiple separately compiled source files or mixed-language projects. However, there exists a Win32 wrapper called FA, which mitigates this problem. FASM projects can be built from one source file directly into an executable file without a linking stage.


IDE

Fresh, a project started by John Found, is an
integrated development environment An integrated development environment (IDE) is a Application software, software application that provides comprehensive facilities for software development. An IDE normally consists of at least a source-code editor, build automation tools, an ...
for FASM under Windows and Linux.


Use

Operating systems written with FASM: * MenuetOS – 32- and
64-bit In computer architecture, 64-bit integers, memory addresses, or other data units are those that are 64 bits wide. Also, 64-bit central processing units (CPU) and arithmetic logic units (ALU) are those that are based on processor registers, a ...
GUI operating systems by Ville Turijanmaa * KolibriOS Compilers that use FASM as a backend: *
PureBasic PureBasic is a commercial software, commercially distributed procedural programming, procedural computer programming language and integrated development environment based on BASIC and developed by Fantaisie Software for Microsoft Windows, Windo ...
* High Level Assembly (HLA) * BlitzMax


See also

*
Comparison of assemblers This is an incomplete comparison of Assembler (computing), assemblers. Some assemblers are components of a compiler system for a high-level programming language and may have limited or no usable functionality outside of the compiler system. Some a ...


References


External links

* FASM project:
FASMLIB
0.8.0 – portable 32-bit x86 asm lib for FASM/MASM/YASM/NASM/GASM
FASMARM
– FASM for ARM processors, v1.27,
The Fresh IDE
{{X86 assembly topics 2000 software Assemblers DOS software Free software primarily written in assembly language Linux programming tools Programming tools for Windows Self-hosting software Unix programming tools