回文プログラム用に入力を整理しましたが、入力された単語が回文であるかどうかを確認する方法がまったくわかりません。
; 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
誰かがこれについて私を助けてくれますか? ありがとうございました。