How add assebly in linux kernel module program?
Hello,
I am writing a linux kernel module program on Fedora core 6 and I am wondering if anyone could tell me how to add an assembly code shown below in my program. The assembly code was written for Windows and I have no idea how to convert to Linux kernel program.
#ifdef _MSC_VER
Unsigned char lookKbits(char k)
{
_asm {
mov dl, k
mov cl, 16
sub cl, dl
mov eax, [wordval]
shr eax, cl
}
}
Unsigned char WORD_hi_lo(char byte_high, char byte_low)
{
_asm {
mov ah,byte_high
mov al,byte_low
}
}
#endif
Last edited by aminoamide; 02-23-2009 at 03:05 PM.
Reason: Title was not good
|