I am writing a Linux kernel module on Fedora core 6 and I am wondering if anyone could tell me how to add the assembly code shown below to 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