From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21715 invoked by alias); 11 Aug 2008 00:47:53 -0000 Received: (qmail 21706 invoked by uid 22791); 11 Aug 2008 00:47:52 -0000 X-Spam-Check-By: sourceware.org Received: from xena.cds1.net (HELO mail.cds1.net) (216.174.197.150) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 11 Aug 2008 00:47:18 +0000 Received: from localhost (neptune-canopy.cds1.net [172.16.10.246]) by mail.cds1.net (Postfix) with ESMTP id 9EB82E8A5785; Sun, 10 Aug 2008 17:47:16 -0700 (PDT) Received: from mail.cds1.net ([172.16.10.33]) by localhost (neptune.cds1.net [172.16.10.246]) (amavisd-new, port 10024) with ESMTP id t652+PKSjPCP; Sun, 10 Aug 2008 17:47:16 -0700 (PDT) Received: from [192.168.1.103] (dhcp-172-16-14-253.cds1.net [172.16.14.253]) by mail.cds1.net (Postfix) with ESMTP id D30A0E8A4237; Sun, 10 Aug 2008 17:47:13 -0700 (PDT) Subject: Re: GNU C++ Inline Assembler From: Bob Plantz To: Robin-Vossen Cc: gcc-help@gcc.gnu.org In-Reply-To: <18912389.post@talk.nabble.com> References: <18912389.post@talk.nabble.com> Content-Type: text/plain Date: Mon, 11 Aug 2008 06:37:00 -0000 Message-Id: <1218415637.5988.10.camel@bob-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit 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/msg00100.txt.bz2 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