From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29823 invoked by alias); 11 Aug 2008 16:32:09 -0000 Received: (qmail 29764 invoked by uid 22791); 11 Aug 2008 16:32:08 -0000 X-Spam-Check-By: sourceware.org Received: from kuber.nabble.com (HELO kuber.nabble.com) (216.139.236.158) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 11 Aug 2008 16:31:22 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KSaIh-00043K-Lw for gcc-help@gcc.gnu.org; Mon, 11 Aug 2008 09:31:19 -0700 Message-ID: <18929255.post@talk.nabble.com> Date: Mon, 11 Aug 2008 16:35:00 -0000 From: Robin-Vossen To: gcc-help@gcc.gnu.org Subject: Re: GNU C++ Inline Assembler In-Reply-To: <1218415637.5988.10.camel@bob-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: robin-vossen@hotmail.com References: <18912389.post@talk.nabble.com> <1218415637.5988.10.camel@bob-desktop> X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-08/txt/msg00102.txt.bz2 Well, thanks: But, I just want to use Intel-Style ASM in there. with dest, src setup. Since I do quite a lot of Revercing and well I sometimes need to Copy Directly from Olly/IDA into C Code. Since that uses Intel I need the intel. Also, Well as you saw I used Pointers to Variables in my C Code. I didnt find a way to do that in GCC C Compiler. I never heard of the -masm line. I am going to read up on that. Thanks already, I hope I made my question a bit clearer now. Cheers, Robin Bob Plantz wrote: > > On Sun, 2008-08-10 at 04:11 -0700, Robin-Vossen wrote: > > I'm not aware of any use of the inc instruction that takes two operands: > >> __asm{ >> mov eax, [INTEGER] >> inc eax, esp >> mov [INTEGER], eax >> mov [CHARACTER], ah >> } >> return 0; >> } > > so I don't completely understand your code. > > Have you tried -masm=intel? I've only gone as far as seeing that it > generates intel-style asm from C/C++. I decided that it was better to > follow the "when in Rome..." rule. > > The syntax issue seems arbitrary to me. I've used lots of assemblers. > They're all different. > > For several years in the 1980s I had contracts with two companies that > used different chips. One assembler used source,destination and the > other destination,source. I would work with one in the morning, the > other in the afternoon. Just had to be careful. > > Bob > > > > -- View this message in context: http://www.nabble.com/GNU-C%2B%2B-Inline-Assembler-tp18912389p18929255.html Sent from the gcc - Help mailing list archive at Nabble.com.