任何人都可以帮助将头文件中的以下内联汇编转换为相应的 x86-64 .asm 文件或不带汇编的 c 样式函数吗?
extern const char hexlu[];
void _inline hextoascii(char* a_src , char* a_dest ) {
_asm {
mov esi, a_src;
mov edi, a_dest;
sub ebx,ebx
mov edx,[esi+00]
mov bl,dl
mov ax,word ptr [ebx*2+hexlu]
mov [edi+00],ax
};
}
最佳答案
void hextoascii(char* src, char* dest)
{
dest[0] = hexlu[ 2*(unsigned)src[0]];
dest[1] = hexlu[1+2*(unsigned)src[0]];
}
关于c - 如何将头文件函数中的内联程序集转换为不支持 x64 的程序集的 c++ 函数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15118004/