This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GNU C++ Inline Assembler
- From: Bob Plantz <plantz at cds1 dot net>
- To: Robin-Vossen <robin-vossen at hotmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sun, 10 Aug 2008 17:47:17 -0700
- Subject: Re: GNU C++ Inline Assembler
- References: <18912389.post@talk.nabble.com>
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