I have the input sorted out for the palindrome program but I haven't got the slightest idea of how to check whether the inputted word is a palindrome or not.
; Program to read name and output greeting
BR main
name: .BLOCK 32 ;space for up to 32 characters
msg1: .ASCII "The word is: \x00"
msg2: .ASCII "Enter a word: \x00"
main: LDX 0,i ; load index register with 0
STRO msg2,d ;output word prompt
chin: CHARI name,x ;read a character
LDA name,x ;and load accumulator
ADDX 1,I ;add 1 to index register
CPA 0x0A00,i ;compares with line feed
BREQ out ;if line feed go to out
BR chin ;go to chin to read next char
out: LDA '\x00',I ;load acc with end of string
STA name,x ;store end of string in name block
STRO msg1,d ;output word message
STRO name,d ;output stored name
STOP
.END
Can someone help me out on this please? Thank you.