FASM

Screenshot with supplied example

Developer(s)| Tomasz Grysztar
Initial release| March 2000; 26 years ago (2000-03)
Written in| Assembly
Operating system| Unix-like, Linux, Windows and IDE, MS-DOS and IDE, OpenBSD, etc., MenuetOS, KolibriOS, OctaOS, DexOS and IDE, SkyOS, Solar_OS
Platform| x86, x86-64
Type| Assembler
License| Simplified BSD with a weak copyleft clause
Website| flatassembler.net

FASM (flat assembler) is an assembler for x86 processors. It supports Intel-style assembly language on the IA-32 and x86-64 computer architectures. It claims high speed, size optimizations, operating system (OS) portability, and macro abilities.[1][2] It is a low-level assembler[2] and intentionally uses very few command-line options. It is free and open-source software.

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 (ELF) or Common Object File Format (COFF) (classic or MS-specific), or executables in either MZ, ELF, or Portable Executable (PE) format (including WDM drivers, allows custom MZ DOS stub). An unofficial port targeting the ARM architecture also exists.[3]

## Contents

* 1 History
* 2 Design
* 3 IDE
* 4 Use
* 5 See also
* 6 References
* 7 External links

## History

The project was started in 1999 by Tomasz Grysztar, a.k.a. Privalov, at that time an undergraduate student of mathematics from Poland. It was released publicly in March 2000.[4][5] 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).

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.[2] It provides syntax features and macros, which make it possible to customize or create missing statements.[4] 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.[6]

FASM is a multi-pass assembler. It makes extensive code-size optimization and allows unconstrained forward referencing.[2][6] 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.

FASM is based on the "same source, same output" principle: the contents of the resulting file are not affected by the command line.[6] 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.[7] FASM projects can be built from one source file directly into an executable file without a linking stage.[2]

## IDE

Fresh, a project started by John Found, is an integrated development environment for FASM under Windows and Linux.[8]

## Use

Operating systems written with FASM:

* MenuetOS[9] – 32- and 64-bit GUI operating systems by Ville Turijanmaa
* KolibriOS

Compilers that use FASM as a backend:

* PureBasic
* High Level Assembly (HLA)
* BlitzMax

## See also

* Comparison of assemblers

## References

1. ↑ Grysztar, Tomasz (2008-05-12). "Flat Assembler Programmer's Manual". http://flatassembler.net/docs.php?article=manual. Retrieved 2008-05-12.
2. ↑ 2.0 2.1 2.2 2.3 2.4 Hyde, Randall. "Which Assembler is the Best?". http://mmcs.sfedu.ru/~ulysses/Edu/MP/WhichAsm.html. Retrieved 2008-05-18.
3. ↑ "FASMARM". 2008-03-20. http://arm.flatassembler.net/. Retrieved 2008-05-12.
4. ↑ 4.0 4.1 "Interview with Privalov the author of FASM". 2004-08-12. http://www.wasm.ru/article.php?article=privalov_en.
5. ↑ Grysztar, Tomasz (2000-03-15). "flat assembler". http://marc.info/?l=freedos-dev&m=95311018003959&w=2. Retrieved 2008-05-19.
6. ↑ 6.0 6.1 6.2 Grysztar, Tomasz. "Flat Assembler Design Principles". http://flatassembler.net/docs.php?article=design. Retrieved 2008-05-12.
7. ↑ Grysztar, Tomasz. "FA – command line extension for fasm". http://board.flatassembler.net/topic.php?t=9948. Retrieved 2012-05-11.
8. ↑ Found, John. "Fresh ID project". https://fresh.flatassembler.net/.
9. ↑ "MenuetOS". http://www.menuetos.net/. Retrieved 2008-05-18.

## External links

* FASM project: Official website
* FASMLIB 0.8.0 – portable 32-bit x86 asm lib for FASM/MASM/YASM/NASM/GASM
* FASMARM – FASM for ARM processors,  v1.27, June 9, 2012 (2012-06-09)
* The Fresh IDE

* v
* t
* e

x86 assembly topics

Topics|

* Assembly language
* Comparison of assemblers
* Disassembler
* Instruction set
* Low-level programming language
* Machine code
* Microassembler
* x86 assembly language

Assemblers|

* A86/A386
* Flat Assembler (FASM)
* GNU Assembler (GAS)
* High Level Assembly (HLA)
* Microsoft Macro Assembler (MASM)
* Netwide Assembler (NASM)
* Turbo Assembler (TASM)
* Open Watcom Assembler (WASM)

Programming
issues|

* Call stack
* Flags
* Carry flag
* Direction flag
* Interrupt flag
* Overflow flag
* Zero flag
* Opcode
* Program counter
* Processor register
* Calling conventions
* Instruction listings
* Registers

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/FASM. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:FASM&oldid=4143669"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template