* Re: Assembler in GCC
@ 2002-04-06 23:10 Anand A
0 siblings, 0 replies; 4+ messages in thread
From: Anand A @ 2002-04-06 23:10 UTC (permalink / raw)
To: Kris Warkentin; +Cc: gcc
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Assembler in GCC
2002-04-05 0:07 ` Martin Kahlert
@ 2002-04-05 6:54 ` Kris Warkentin
0 siblings, 0 replies; 4+ messages in thread
From: Kris Warkentin @ 2002-04-05 6:54 UTC (permalink / raw)
To: martin.kahlert, Atanas Uzunov; +Cc: gcc
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.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Assembler in GCC
2002-04-04 15:27 Atanas Uzunov
@ 2002-04-05 0:07 ` Martin Kahlert
2002-04-05 6:54 ` Kris Warkentin
0 siblings, 1 reply; 4+ messages in thread
From: Martin Kahlert @ 2002-04-05 0:07 UTC (permalink / raw)
To: Atanas Uzunov; +Cc: 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Assembler in GCC
@ 2002-04-04 15:27 Atanas Uzunov
2002-04-05 0:07 ` Martin Kahlert
0 siblings, 1 reply; 4+ messages in thread
From: Atanas Uzunov @ 2002-04-04 15:27 UTC (permalink / raw)
To: gcc
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'
In help files there are examples only with somthing like that : mov %0,%1
...
nothing said about ah, al ...
Atanas Uzunov
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-04-07 6:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-06 23:10 Assembler in GCC Anand A
-- strict thread matches above, loose matches on Subject: below --
2002-04-04 15:27 Atanas Uzunov
2002-04-05 0:07 ` Martin Kahlert
2002-04-05 6:54 ` Kris Warkentin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).