lkml.org 
[lkml]   [2009]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectHow to move two valuables to x86 CPU register ebx, ecx by using AT&A inline asm.
From
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


\
 
 \ /
  Last update: 2009-11-19 10:53    [W:0.055 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site