Hey all
I have a method (C++) that returns a character and takes an array of characters as its parameters.
I'm messing with assembly for the first time and just trying to return the first character of the array in the dl register. Here's what I have so far:
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 a ♀
Any idea whats going on? Thanks