for a Project at University I need to make small Assembly programs. And for one of those I need to check if the arguments are palindromes. (abba = palindrome / acba = no palindrome)
I have nearly everything but I kind of have a problem with comparing. I planed to have the string in rsi and rax. Then move with inc rsi
from one side and with dec rax
from the other side comparing in each step the characters.
But I think that somehow my rax is empty or the add rax, rdx
doesnt put the Pointer at the end of the string.
eos_found:
pop rsi ; restore starting address of string
push rdx ; store length of string
push rsi
push rsi
pop rax
add rax, rdx ;pointer points to the end of the string
cmp_strings:
cmp [rsi], byte 0
je is_palindrome
mov al, [rax]
cmp [rsi], al
jne not_palindrome
inc rsi
dec rax
jmp cmp_strings