Skip to content

Instantly share code, notes, and snippets.

@kmjayadeep
Created December 1, 2016 15:52
Show Gist options
  • Save kmjayadeep/eeacc30830eaaf5b0af88d10f7de9928 to your computer and use it in GitHub Desktop.
Save kmjayadeep/eeacc30830eaaf5b0af88d10f7de9928 to your computer and use it in GitHub Desktop.
8051 program for checking palindrome
mov dptr,#0000
movx a,@dptr
mov r1,a
mov b,#0
mov r0,#8
loop:
rrc a
mov r1,a
mov a,b
rlc a
mov b,a
mov a,r1
djnz r0,loop
movx a,@dptr
inc dptr
subb a,b
jz nott
mov a,#0
jmp endpp
nott: mov a,#1
movx @dptr,a
endpp: sjmp endpp
@bleedinedge007
Copy link

How can we find the output that the given number is palindrome or not ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment