Compiler Option: -asm
Set assembler format for inline assembly under -gen gcc
The x86 ASM backend (-gen gas) currently only supports -asm intel and using -asm att results in an error.
Syntax
-asm < format >
Parameters
format
The assembler format: intel or att
Description
- -gen gcc -asm intel: FB inline assembly blocks must use FB's usual Intel syntax format. Under -gen gcc, fbc will try to translate it to gcc's format automatically. For example:
Dim a As Long = 1
Print a
Asm
inc dword Ptr [a]
End Asm
Print a
Print a
Asm
inc dword Ptr [a]
End Asm
Print a
- -gen gcc -asm att: FB inline assembly blocks must use gcc's format. For example:
Dim a As Long = 1
Print a
Asm
"incl %0\n" : "+m" (a) : :
End Asm
Print a
Print a
Asm
"incl %0\n" : "+m" (a) : :
End Asm
Print a
See also