Problem: Write an 8086 program to check whether a given string is palindrome or not.
Input String: "abba" Output: String is palindrome Input String: "abbca" Output: String is not palindrome
- Create a string
- Traverse to the end of the string
- Get the address of the end of the string, DI
- Load the starting address of the string, SI
- Compare the value stored at the address
- Increment the pointer, SI
- Decrements the pointer, DI
- Compare again the value stored at si and di
- Repeat the steps until SI<=DI
- If all the characters match print string is palindrome else print not palindrome
String is palindrome
The program cannot be run on an online editor, please use MASM to run the program and use dos box to run MASM, you might use any 8086 emulator to run the program.
- 8086 program to reverse a string
- 8086 program to print a String
- 8086 program to search a number in a string
- 8086 program to transfer a block of bytes by using string instruction
- 8086 program to transfer a block of 4 bytes by using string instructions
- 8085 program to check whether the given 16 bit number is palindrome or not
- 8086 program to add two 8 bit BCD numbers
- 8086 program to subtract two 16 bit BCD numbers
- 8086 program to multiply two 16-bit numbers
- 8086 program to multiply two 8 bit numbers
- 8086 program to subtract two 8 bit BCD numbers
- 8086 program for selection sort
- 8086 program to add two 16 bit BCD numbers with carry
- 8086 program to find the min value in a given array
- 8086 program to add two 16-bit numbers with or without carry
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : andrew1234