I have a method (C ++) that returns a character and takes an array of characters as parameters.
This is the first time I enter the assembly and just try to return the first character of the array to the dl register. Here is what I still have:
char returnFirstChar(char arrayOfLetters[])
{
char max;
__asm
{
push eax
push ebx
push ecx
push edx
mov dl, 0
mov eax, arrayOfLetters[0]
xor edx, edx
mov dl, al
mov max, dl
pop edx
pop ecx
pop ebx
pop eax
}
return max;
}
For some reason, this method returns ♀
Any idea what is going on? Thanks
source
share