[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to add assembler?



Felix Kollmann <fkollmann@gmx.net> writes:

> how to add assembler in C++?
> 
> I tried:
> 
> 	asm mov eax, 80000000h
> 
> 	extern "asm" mov eax, 8000000h
> 
> Does anybody have knowlegde of this?

The GCC uses another Syntax (AT&T?!), you should have a look at nasm,
which supports the Intel Syntax.

But in 99,9% of the cases you shouldn't need to use any
assembler. Assembler will just give you errors, unportability and 
problems. Which you can easily avoid when using good old C or C++, or
whatever you like.
So if you really want to use assembler you should have a good reason
for it and you should really know what you are doing, but that is
nearly never the case.

-- 
                                  http://dark.x.dtu.dk/~grumbel/pingus/ | 
Ingo Ruhnke <grumbel@gmx.de>             http://home.pages.de/~grumbel/ |
------------------------------------------------------------------------+