This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Assembler in GCC
- From: "Anand A" <mailanand at lycos dot com>
- To: "Kris Warkentin" <kewarken at qnx dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 07 Apr 2002 12:53:02 +0530
- Subject: Re: Assembler in GCC
- Organization: Lycos Mail (http://mail.lycos.com:80)
- Reply-to: mailanand at lycos dot com
kris,
Could not find any page in the link you specified. If you have the document can you please send it across?
Thanks and Regards
Anand
---
"There are two ways to live your life.
One is as though nothing is a miracle.
The other is as though everything is a miracle."
- by Albert Einstein(1879 - 1955)
On Fri, 5 Apr 2002 09:53:54
Kris Warkentin wrote:
>There's a really good gcc inline assembly tutorial as well - the original
>seems to be missing but the google cache is still there. Might want to
>save/print it.
>
>http://www.google.ca/search?q=cache:XC7wfkWyTPAC:www.intac.com/~avly/djasm.h
>tml+djasm&hl=en&ie=UTF8
>
>cheers,
>Kris
>----- Original Message -----
>From: "Martin Kahlert" <martin.kahlert@infineon.com>
>To: "Atanas Uzunov" <mcubg@mail.bg>
>Cc: <gcc@gcc.gnu.org>
>Sent: Friday, April 05, 2002 1:44 AM
>Subject: Re: Assembler in GCC
>
>
>> Hi,
>>
>> On Fri, Apr 05, 2002 at 02:04:23AM +0300, Atanas Uzunov wrote:
>> > Hi,
>> > I need to know how to implement simple assembler instructions in C for
>> > example:
>> >
>> > mov ah, 2
>> >
>> > when i wrte this (asm ("mov ah, 2"::)) i get the message: Error: suffix
>or
>> > operands invalid for `mov'
>>
>> Try this links:
>> http://www-106.ibm.com/developerworks/linux/library/l-ia.html?dwzone=linux
>> http://www.cs.virginia.edu/~clc5q/links.html
>>
>> Based on that, i would suggest something like that:
>>
>> int main (int argc, char **argv)
>> {
>> asm volatile ("movb $2, %%ah" : : :"eax");
>> }
>>
>> Read gcc's info page about extended inline assembly, too.
>>
>> Hope that helps,
>> Martin.
>>
>> --
>> The early bird catches the worm. If you want something else for
>> breakfast, get up later.
>>
>
>
See Dave Matthews Band live or win a signed guitar
http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_020201/splash.asp