FASM
|
FASM is an assembler for the IA-32 architecture. The name stands for "flat assembler". FASM itself is written in assembly language and is also available on Linux, Windows, and Menuet systems. It shatters the "assembly is not portable at all" myth. FASM has some features that are advanced for assembly languages, such as macros, structures, and "virtual data". FASM contains bindings to the Microsoft Windows GUI and OpenGL.
Menuet is an operating system written in 100% FASM assembly language.
Fasm borrows much of its syntax from the NASM assembler, and both include features such as flat binary output, and output of ELF, COFF objects. Fasm can also directly output executables in both ELF format, and PE format. (aka, linux and Windows .exe).
Features common in both Nasm and Fasm (and a few other assemblers): $ describes current location. Useful for determining the size of a block of code or data. Example of use: mystring db "This is my string", 0 mystring.length equ $-mystring
Local Labels, which begin with a .
globallabel:
.locallabelone:
.locallabeltwo:
globallabel2:
.locallableone:
.locallabeltwo:
Some Advanced Features in Fasm: Macros in Fasm are C-Like described and created like this:
macro (name) (parameters) { macro code. }
For example:
macro mov op1,op2,op3 { if op3 eq mov op1,op2 else mov op1,op2 mov op2,op3 end if }
Could be used to overload the mov instruction to accept three parameters in Fasm.
See also
External link
- FASM website (http://flatassembler.net/)
- FASM official manual (http://flatassembler.net/docs.php?article=manual)fr:FASM