Date: Thu, 19 Nov 1998 09:47:36 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Ben Munger cc: djgpp AT delorie DOT com Subject: Re: Intel inline assembly? In-Reply-To: <363016D3.F8D61F8C@idcomm.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Thu, 22 Oct 1998, Ben Munger wrote: > Is there any way I can use intel inline assembly instead of AT&T? Probably, no. To achieve this, you will need to reconfigure and rebuild GCC so that it invokes NASM as its assembler. And for that, you will have to change the output format of the compiler to be acceptable by NASM. The problem is that the compiler generates assembly and then invokes the assembler to assemble it into machine code. Inline assembly is just passed to the assembler verbatim. So this seemingly-innocent request has major impacts on how the compiler works. Seems like learning the AT&T syntax is much simpler, especially since the differences are small (basically, reverse the operand order and use e.g. movl instead of MOV). See section 17.1 of the FAQ for details. Also, it might be that the code you are trying to write or port doesn't require inline assembly at all, but can be written in C without any lossage. See section 17.8 of the FAQ, for one such example.