linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to move two valuables to x86 CPU register ebx, ecx by using AT&A  inline asm.
@ 2009-11-19  9:50 Johnny Hung
  2009-11-19 10:05 ` Viral Mehta
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Johnny Hung @ 2009-11-19  9:50 UTC (permalink / raw)
  To: kernelnewbies, linux-kernel, linux-embedded

Hi All:
    I want to move two local valuables to x86 arch CPU ebx, ecx
register and do outb cpu instruction by using AT&A inline asm in
kernel driver.  The following code was I wrote but gcc report syntax
error:
==
    unsigned int val = 10;
    unsigned int tmp = 5;
    ....
    __asm__ volatile ("movl %0, %%ebx"
          "movl %1, %%ecx"
          "outb $0x27, $0xb2"
          :
          :"r"(val), "r"(tmp)
          :"%ebx", "%ecx"
   );

Does anyone can point me out. Any reply is appreciated.

BRs, H. Johnny

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-11-23  5:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-19  9:50 How to move two valuables to x86 CPU register ebx, ecx by using AT&A inline asm Johnny Hung
2009-11-19 10:05 ` Viral Mehta
2009-11-19 10:19   ` Johnny Hung
2009-11-19 10:21     ` Viral Mehta
2009-11-19 11:11       ` Johnny Hung
2009-11-20  6:04         ` stas
2009-11-20 10:43           ` David Woodhouse
2009-11-20  6:48 ` Américo Wang
2009-11-20  8:45 ` Jiri Slaby
2009-11-23  3:14   ` Johnny Hung
2009-11-23  5:43     ` Brian Gerst

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 NNTP newsgroup(s).