* Asm in GCC
@ 2002-04-04 15:06 Atanas Uzunov
2002-04-04 23:47 ` Laurent Pinchart
0 siblings, 1 reply; 3+ messages in thread
From: Atanas Uzunov @ 2002-04-04 15:06 UTC (permalink / raw)
To: gcc-help
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] 3+ messages in thread
* Re: Asm in GCC
2002-04-04 15:06 Asm in GCC Atanas Uzunov
@ 2002-04-04 23:47 ` Laurent Pinchart
0 siblings, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2002-04-04 23:47 UTC (permalink / raw)
To: gcc-help-return-8513-laurent.pinchart=capflow.com; +Cc: gcc-help
>
>
>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 ...
>
1) Read the documentation.
2) asm in GCC uses the AT&T syntax, where the destination operand is the
second operand. Thus what you want to do is written
mov $2, %ah
Laurent Pinchart
^ permalink raw reply [flat|nested] 3+ messages in thread
* Asm in GCC
@ 2002-04-04 15:10 Atanas Uzunov
0 siblings, 0 replies; 3+ messages in thread
From: Atanas Uzunov @ 2002-04-04 15:10 UTC (permalink / raw)
To: gcc-help
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] 3+ messages in thread
end of thread, other threads:[~2002-04-05 7:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-04 15:06 Asm in GCC Atanas Uzunov
2002-04-04 23:47 ` Laurent Pinchart
2002-04-04 15:10 Atanas Uzunov
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).