;This is a program to find out whether given byte is palindrome or not. ;for this the program uses the bit reversing approach. palin equ 30h mask equ 1 rev equ 2 temp equ 3 cntr equ 4 org 100h clr palin; clear palindrome bit. mov r0,#30h; set the pointer to data memory. mov a,@r0; Get the data in accumulator. acall reverse; call the subroutine to reverse the data bits. mov a,@r0; restore the data in accumulator. xrl a,rev; Xor with the reversed data. jnz skip setb palin; if zero means palindrome. skip:nop; reverse:mov cntr,#8; mov rev,#0; mov mask,#80h; clr c; bck:rrc a; mov temp,a; jnc ahd; mov a,rev; orl a,mask; mov rev,a; ahd:clr c mov a,mask; rrc a; mov mask,a; mov a,temp; djnz cntr,bck; rrc a; ret; end