不正确的操作数类型是什么意思?
我正在尝试将一些 c++ 代码转换为汇编程序
temp_char = OChar[i] //temp_char is a character and OChar is array and i is the index
我试过了
mov eax, i
mov temp_char, [eax+OChar]
并且
mov eax, i
movsx temp_char, [eax+OChar]
谁能解释我如何避免不正确的操作数类型?
这是完整的代码
char temp_char;
int i;
__asm{
mov i,0
jmp checkend
startfor: mov eax,i
add eax,1
mov i,eax
checkend: cmp i,length
jge endloop
movsx temp_char, [eax+OChars]
//encryption of string//
push eax
and eax,0xAA
not al
mov edx,eax
pop eax
and eax,0x55
xor ecx,edx
xor ecx,eax
rol cl,2
sub al,0x20
pop ebp
//end of encryption//
movsx [eax+EChars], temp_char
jmp startfor
endloop: ret
}