{{fbdoc item="title" value="Compiler Option: -asm"}}----
Set assembler format for inline assembly under -gen gcc

{{fbdoc item="syntax"}}##
	**-asm** < //format// >
##
{{fbdoc item="param"}}
	##//format//##
		The assembler format: //intel// or //att//

{{fbdoc item="desc"}}
	The ##-asm## compiler option sets the assembler format for inline ##[[KeyPgAsm|Asm]]## blocks when using [[CompilerOptgen|-gen gcc]].
	
		- ##-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:
			%%(freebasic)
dim a as long = 1
print a
asm
	inc dword ptr [a]
end asm
print a
%%
			
		- ##-gen gcc -asm att##: FB inline assembly blocks must use [[https://gcc.gnu.org/onlinedocs/gcc/Using-Assembly-Language-with-C.html|gcc's format]]. For example:
			%%(freebasic)
dim a as long = 1
print a
asm
	"incl %0\n" : "+m" (a) : :
end asm
print a
%%
	
	The x86 ASM backend ([[CompilerOptgen|-gen gas]]) currently only supports ##-asm intel## and using ##-asm att## results in an error.

{{fbdoc item="see"}}
	- [[KeyPgDdfbasm|__FB_ASM__]]
	- [[CompilerCmdLine|Using the Command Line]]

{{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}}