Вы находитесь на странице: 1из 14

Welcome - Guest!

Login / Register Now |

Search:


HOME
 ARTICLES
 FORUM
 INTERVIEW FAQ
 ACTIVITIES
 NEWS
 VIDEOS
 POLL
 LINKS
 PEOPLE
 GROUPS

Assembly Language Articles Submit Article

Home » Articles » Assembly Language » Homework Help RSS Feeds

An Assembly Language Program to check


for Palindrome string
Posted By: Addie Fischer Category: Assembly Language Views: 91199

An Assembly Language Program to check for Palindrome


string.

Code for An Assembly Language Program to check for Palindrome


string in Assembly Language

Data Segment
str1 db 'MADAM','$'
strlen1 dw $-str1
strrev db 20 dup(' ')
str_palin db 'String is Palindrome.','$'
str_not_palin db 'String is not Palindrome.','$'
Data Ends

Code Segment
Assume cs:code, ds:data

Begin:
mov ax, data
mov ds, ax
mov es, ax
mov cx, strlen1
add cx, -2

lea si, str1


lea di, strrev

add si, strlen1


add si, -2
L1:
mov al, [si]
mov [di], al
dec si
inc di
loop L1
mov al, [si]
mov [di], al
inc di
mov dl, '$'
mov [di], dl
mov cx, strlen1

Palin_Check:
lea si, str1
lea di, strrev
repe cmpsb
jne Not_Palin

Palin:
mov ah, 09h
lea dx, str_palin
int 21h
jmp Exit

Not_Palin:
mov ah, 09h
lea dx, str_not_palin
int 21h

Exit:
mov ax, 4c00h
int 21h
Code Ends
End Begin

Share: 289 17 13.2K

Previous Post:
To find the Prime Numbers between 1 to 50
Next Post:
An Assembly Language Program sort a given series in ascending order
Didn't find what you were looking for? Find more on An Assembly Language
Program to check for Palindrome string Or get search suggestion and latest
updates.

Addie Fischer author of An Assembly Language Program to check for


Palindrome string is from Frankfurt, Germany.

View All Articles

Related Articles and Code:

 An Assembly Language Program sort a given series in ascending order


 An Assembly Language Program to find 2's Complement of given binary
number
 Program to check whether the input string is palindrome or not
 Program to check entered string is palindrome or not
 Program to check entered string is palindrome or not
 Program to check whether a word is palindrome or not (using classes &
pointers )
 Prolog program to check whether a given word is a palindrome or not
 Prolog program to check whether a given list is palindrome or not
 @@LANGUAGE - LANGUAGE Function
 Palindrome string
 Develop a CORBA application that takes a string from client and returns
whether it is palindrome
 Write a shell program to check whether a given string is palindrome or not.
 Program to check whether the characters in a string are in ascending order
or not
 Program to check for string
 Program to check the start and end of a String
 PROGRAM TO CHECK THE STRING IS PALINDROM OR NOT, PARALLELY
 Program to check if given strings form an acrostic
 The type 'System.Data.Objects.ObjectContext' is defined in an assembly that
is not referenced
 Word Assembly Program
 Basic C Programming Language

Other Interesting Articles in Assembly Language:

 Program to Print the Fibonacci series


 Program to Calculate the average of n numbers
 Program to compare two strings
 PROGRAM TO CLEAR SCREEN
 DISPLAY THE STRING ON THE SCREEN USING INT 21, SERVICES 01 & 02
ONLY
 To divide 10 8-bit data in an array by 20 and store the result in another
array, first quotient and then remainder
 READ A STRING CHARACTOR BY CHARACTOR AND DISPLAY THE SAME
STRING
 Program that find the greatest common divisor (GCD) of two integers M and
N
 Program to convert an integer number from base 8 to base 10 and store it in
an array
 PROGRAM TO CHECK GIVEN TWO VALUE ARE EQUAL OR NOT
 Program to perform an exchange of elements of two arrays
 Program to display a "?", read two capital letters, and display them on the
next line in alphabetical order.
 PROGRAM TO WRITE A PROGRAM TO COMPARE TO MEMORY LOCATION
 PROGRAM TO DISPLAY DAY OF WEEK AND MONTH
 PROGRAM TO READ TODAY'S DATE THROUGH KEYBOARD AND THEN DISPLAY
THE CORRESPONDING DAY AND MONTH
 Program to print characters from A to Z on the screen
 Program to read a character and display it on new line with user prompts
initialized by constants.
 Store any five 8-bit data check if >30 then add 10 otherwise add 20
 An Assembly Language Program sort a given series in ascending order
 Program of an array that prints it's value before and after clearing the 3rd
row and 4th column using based index mode

Please enter your Comment

 Comment should be atleast 30 Characters.


 Please put code inside [Code] your code [/Code].

Please login to post comment

Kondaparthy Gayatri from India Comment on: Apr 05


please provide me the armstrong number program in microprocessor 8086
Mikro Mikross from Canada Comment on: Dec 16
i have a problem with creating an aplication for finding how many palindrome words are
in one sentence that is put in the data segment
please help me :)
View All Comments
 Assembly Language

o View All
o General
o Homework Help
o

 Artificial Intelligence
 C Programming
 C++ Programming
 Visual C++
 OOAD
 Cobol
 Java
 SQL Server
 Asp.net MVC
 Rest and WCF Services
 Entity Framework
 Knockout.Js
 Unix / Linux / Ubuntu
 Networking
 OOPs Concept
 HTML
 Dos
 SQL
 System Analysis & Design
 Gadgets
 Internet
 CSS
 Javascript
 .Net Framework
 Asp.net
 C#
 VB.Net
 Python
 Perl
 Oracle
 Software Engineering
 RDBMS Terms
 AJAX Framework
 Design Pattern
 UML
 WPF
 WCF
 SEO
 PowerShell
 Visual Studio
 WWF
 BizTalk Server
 Azure
 General
 Testing
 Online Certifications
 PHP
 My SQL
 LinQ
 Project Management
 Silverlight
 XML
 MS Office
 Windows OS
 DHTML
 Sharepoint

Articles | Forum | New Users | Activities | Interview


RSS Feeds:
FAQ | Poll | Hotlinks
Social
Hall of Fame | Facebook | Twitter | LinkedIn
Networking:
Terms: Terms of Use | Privacy Policy | Contact us

Copyright © 2008-2012
Welcome - Guest! Login / Register Now |

Search:


HOME
 ARTICLES
 FORUM
 INTERVIEW FAQ
 ACTIVITIES
 NEWS
 VIDEOS
 POLL
 LINKS
 PEOPLE
 GROUPS
Assembly Language Articles Submit Article

Home » Articles » Assembly Language » Homework Help RSS Feeds

An Assembly Language Program to check


for Palindrome string
Posted By: Addie Fischer Category: Assembly Language Views: 91199

An Assembly Language Program to check for Palindrome


string.

Code for An Assembly Language Program to check for Palindrome


string in Assembly Language

Data Segment
str1 db 'MADAM','$'
strlen1 dw $-str1
strrev db 20 dup(' ')
str_palin db 'String is Palindrome.','$'
str_not_palin db 'String is not Palindrome.','$'
Data Ends

Code Segment
Assume cs:code, ds:data

Begin:
mov ax, data
mov ds, ax
mov es, ax
mov cx, strlen1
add cx, -2

lea si, str1


lea di, strrev

add si, strlen1


add si, -2
L1:
mov al, [si]
mov [di], al
dec si
inc di
loop L1
mov al, [si]
mov [di], al
inc di
mov dl, '$'
mov [di], dl
mov cx, strlen1

Palin_Check:
lea si, str1
lea di, strrev
repe cmpsb
jne Not_Palin

Palin:
mov ah, 09h
lea dx, str_palin
int 21h
jmp Exit

Not_Palin:
mov ah, 09h
lea dx, str_not_palin
int 21h

Exit:
mov ax, 4c00h
int 21h
Code Ends
End Begin

Share: 289 17 13.2K

Previous Post:
To find the Prime Numbers between 1 to 50
Next Post:
An Assembly Language Program sort a given series in ascending order

Didn't find what you were looking for? Find more on An Assembly Language
Program to check for Palindrome string Or get search suggestion and latest
updates.

Addie Fischer author of An Assembly Language Program to check for


Palindrome string is from Frankfurt, Germany.

View All Articles

Related Articles and Code:


 An Assembly Language Program sort a given series in ascending order
 An Assembly Language Program to find 2's Complement of given binary
number
 Program to check whether the input string is palindrome or not
 Program to check entered string is palindrome or not
 Program to check entered string is palindrome or not
 Program to check whether a word is palindrome or not (using classes &
pointers )
 Prolog program to check whether a given word is a palindrome or not
 Prolog program to check whether a given list is palindrome or not
 @@LANGUAGE - LANGUAGE Function
 Palindrome string
 Develop a CORBA application that takes a string from client and returns
whether it is palindrome
 Write a shell program to check whether a given string is palindrome or not.
 Program to check whether the characters in a string are in ascending order
or not
 Program to check for string
 Program to check the start and end of a String
 PROGRAM TO CHECK THE STRING IS PALINDROM OR NOT, PARALLELY
 Program to check if given strings form an acrostic
 The type 'System.Data.Objects.ObjectContext' is defined in an assembly that
is not referenced
 Word Assembly Program
 Basic C Programming Language

Other Interesting Articles in Assembly Language:

 Program to Print the Fibonacci series


 Program to Calculate the average of n numbers
 Program to compare two strings
 PROGRAM TO CLEAR SCREEN
 DISPLAY THE STRING ON THE SCREEN USING INT 21, SERVICES 01 & 02
ONLY
 To divide 10 8-bit data in an array by 20 and store the result in another
array, first quotient and then remainder
 READ A STRING CHARACTOR BY CHARACTOR AND DISPLAY THE SAME
STRING
 Program that find the greatest common divisor (GCD) of two integers M and
N
 Program to convert an integer number from base 8 to base 10 and store it in
an array
 PROGRAM TO CHECK GIVEN TWO VALUE ARE EQUAL OR NOT
 Program to perform an exchange of elements of two arrays
 Program to display a "?", read two capital letters, and display them on the
next line in alphabetical order.
 PROGRAM TO WRITE A PROGRAM TO COMPARE TO MEMORY LOCATION
 PROGRAM TO DISPLAY DAY OF WEEK AND MONTH
 PROGRAM TO READ TODAY'S DATE THROUGH KEYBOARD AND THEN DISPLAY
THE CORRESPONDING DAY AND MONTH
 Program to print characters from A to Z on the screen
 Program to read a character and display it on new line with user prompts
initialized by constants.
 Store any five 8-bit data check if >30 then add 10 otherwise add 20
 An Assembly Language Program sort a given series in ascending order
 Program of an array that prints it's value before and after clearing the 3rd
row and 4th column using based index mode

Please enter your Comment

 Comment should be atleast 30 Characters.


 Please put code inside [Code] your code [/Code].

Please login to post comment

Kondaparthy Gayatri from India Comment on: Apr 05


please provide me the armstrong number program in microprocessor 8086

Mikro Mikross from Canada Comment on: Dec 16


i have a problem with creating an aplication for finding how many palindrome words are
in one sentence that is put in the data segment
please help me :)
View All Comments
 Assembly Language

o View All
o General
o Homework Help
o

 Artificial Intelligence
 C Programming
 C++ Programming
 Visual C++
 OOAD
 Cobol
 Java
 SQL Server
 Asp.net MVC
 Rest and WCF Services
 Entity Framework
 Knockout.Js
 Unix / Linux / Ubuntu
 Networking
 OOPs Concept
 HTML
 Dos
 SQL
 System Analysis & Design
 Gadgets
 Internet
 CSS
 Javascript
 .Net Framework
 Asp.net
 C#
 VB.Net
 Python
 Perl
 Oracle
 Software Engineering
 RDBMS Terms
 AJAX Framework
 Design Pattern
 UML
 WPF
 WCF
 SEO
 PowerShell
 Visual Studio
 WWF
 BizTalk Server
 Azure
 General
 Testing
 Online Certifications
 PHP
 My SQL
 LinQ
 Project Management
 Silverlight
 XML
 MS Office
 Windows OS
 DHTML
 Sharepoint

Articles | Forum | New Users | Activities | Interview


RSS Feeds:
FAQ | Poll | Hotlinks
Social
Hall of Fame | Facebook | Twitter | LinkedIn
Networking:
Terms: Terms of Use | Privacy Policy | Contact us

Copyright © 2008-2012
ShareThis Copy and Paste
Welcome - Guest! Login / Register Now | Search: HOME ARTICLES FORUM
INTERVIEW FAQ ACTIVITIES NEWS VIDEOS POLL LINKS PEOPLE GROUPS Assembly
Language Articles Submit Article Home » Articles » Assembly Language » Homework Help
RSS Feeds An Assembly Language Program to check for Palindrome string Posted By: Addie
Fischer Category: Assembly Language Views: 91199 An Assembly Language Program to
check for Palindrome string. Code for An Assembly Language Program to check for
Palindrome string in Assembly Language Data Segment str1 db 'MADAM','$' strlen1 dw $-str1
strrev db 20 dup(' ') str_palin db 'String is Palindrome.','$' str_not_palin db 'String is not
Palindrome.','$' Data Ends Code Segment Assume cs:code, ds:data Begin: mov ax, data mov
ds, ax mov es, ax mov cx, strlen1 add cx, -2 lea si, str1 lea di, strrev add si, strlen1 add si, -
2 L1: mov al, [si] mov [di], al dec si inc di loop L1 mov al, [si] mov [di], al inc di mov dl, '$'
mov [di], dl mov cx, strlen1 Palin_Check: lea si, str1 lea di, strrev repe cmpsb jne Not_Palin
Palin: mov ah, 09h lea dx, str_palin int 21h jmp Exit Not_Palin: mov ah, 09h lea dx,
str_not_palin int 21h Exit: mov ax, 4c00h int 21h Code Ends End
Begin Share: 289 17 13.2K Previous Post: To find the Prime Numbers between 1 to
50 Next Post: An Assembly Language Program sort a given series in ascending
order Didn't find what you were looking for? Find more on An Assembly Language Program
to check for Palindrome string Or get search suggestion and latest updates. Addie Fischer
author of An Assembly Language Program to check for Palindrome string is from Frankfurt,
Germany. View All Articles Related Articles and Code: An Assembly Language Program sort
a given series in ascending order An Assembly Language Program to find 2's Complement of
given binary number Program to check whether the input string is palindrome or not Program
to check entered string is palindrome or not Program to check entered string is palindrome or
not Program to check whether a word is palindrome or not (using classes & pointers ) Prolog
program to check whether a given word is a palindrome or not Prolog program to check
whether a given list is palindrome or not @@LANGUAGE - LANGUAGE Function Palindrome
string Develop a CORBA application that takes a string from client and returns whether it is
palindrome Write a shell program to check whether a given string is palindrome or not.
Program to check whether the characters in a string are in ascending order or not Program to
check for string Program to check the start and end of a String PROGRAM TO CHECK THE
STRING IS PALINDROM OR NOT, PARALLELY Program to check if given strings form an
acrostic The type 'System.Data.Objects.ObjectContext' is defined in an assembly that is not
referenced Word Assembly Program Basic C Programming Language Other Interesting
Articles in Assembly Language: Program to Print the Fibonacci series Program to Calculate
the average of n numbers Program to compare two strings PROGRAM TO CLEAR SCREEN
DISPLAY THE STRING ON THE SCREEN USING INT 21, SERVICES 01 & 02 ONLY To divide 10
8-bit data in an array by 20 and store the result in another array, first quotient and then
remainder READ A STRING CHARACTOR BY CHARACTOR AND DISPLAY THE SAME STRING
Program that find the greatest common divisor (GCD) of two integers M and N Program to
convert an integer number from base 8 to base 10 and store it in an array PROGRAM TO
CHECK GIVEN TWO VALUE ARE EQUAL OR NOT Program to perform an exchange of elements
of two arrays Program to display a "?", read two capital letters, and display them on the next
line in alphabetical order. PROGRAM TO WRITE A PROGRAM TO COMPARE TO MEMORY
LOCATION PROGRAM TO DISPLAY DAY OF WEEK AND MONTH PROGRAM TO READ TODAY'S
DATE THROUGH KEYBOARD AND THEN DISPLAY THE CORRESPONDING DAY AND MONTH
Program to print characters from A to Z on the screen Program to read a character and
display it on new line with user prompts initialized by constants. Store any five 8-bit data
check if >30 then add 10 otherwise add 20 An Assembly Language Program sort a given
series in ascending order Program of an array that prints it's value before and after clearing
the 3rd row and 4th column using based index mode Please enter your Comment Comment
should be atleast 30 Characters. Please put code inside [Code] your code [/Code]. Please
login to post comment Kondaparthy Gayatri from India Comment on: Apr 05 please provide
me the armstrong number program in microprocessor 8086 Mikro Mikross from Canada
Comment on: Dec 16 i have a problem with creating an aplication for finding how many
palindrome words are in one sentence that is put in the data segment please help me :) View
All Comments Assembly Language View All General Homework Help Artificial
Intelligence C Programming C++ Programming Visual C++ OOAD Cobol Java SQL
Server Asp.net MVC Rest and WCF Services Entity Framework Knockout.Js Unix / Linux /
Ubuntu Networking OOPs Concept HTML Dos SQL System Analysis &
Design Gadgets Internet CSS Javascript .Net
Framework Asp.net C# VB.Net Python Perl Oracle Software Engineering RDBMS
Terms AJAX Framework Design Pattern UML WPF WCF SEO PowerShell Visual
Studio WWF BizTalk Server Azure General Testing Online Certifications PHP My
SQL LinQ Project Management Silverlight XML MS Office Windows
OS DHTML Sharepoint RSS Feeds: Articles | Forum | New
Users | Activities | Interview FAQ | Poll | Hotlinks Social Networking: Hall of
Fame | Facebook | Twitter | LinkedIn Terms: Terms of Use | Privacy Policy | Contact
us Copyright © 2008-2012 Welcome - Guest! Login / Register Now | Search:
HOME ARTICLES FORUM INTERVIEW FAQ ACTIVITIES NEWS VIDEOS POLL LINKS PEOPLE
GROUPS Assembly Language Articles Submit Article Home » Articles » Assembly
Language » Homework Help RSS Feeds An Assembly Language Program to check for
Palindrome string Posted By: Addie Fischer Category: Assembly Language Views: 91199
An Assembly Language Program to check for Palindrome string. Code for An Assembly
Language Program to check for Palindrome string in Assembly Language Data Segment str1
db 'MADAM','$' strlen1 dw $-str1 strrev db 20 dup(' ') str_palin db 'String is Palindrome.','$'
str_not_palin db 'String is not Palindrome.','$' Data Ends Code Segment Assume cs:code,
ds:data Begin: mov ax, data mov ds, ax mov es, ax mov cx, strlen1 add cx, -2 lea si, str1 lea
di, strrev add si, strlen1 add si, -2 L1: mov al, [si] mov [di], al dec si inc di loop L1 mov al,
[si] mov [di], al inc di mov dl, '$' mov [di], dl mov cx, strlen1 Palin_Check: lea si, str1 lea di,
strrev repe cmpsb jne Not_Palin Palin: mov ah, 09h lea dx, str_palin int 21h jmp Exit
Not_Palin: mov ah, 09h lea dx, str_not_palin int 21h Exit: mov ax, 4c00h int 21h Code Ends
End Begin Share: 289 17 13.2K Previous Post: To find the Prime Numbers between 1 to
50 Next Post: An Assembly Language Program sort a given series in ascending
order Didn't find what you were looking for? Find more on An Assembly Language Program
to check for Palindrome string Or get search suggestion and latest updates. Addie Fischer
author of An Assembly Language Program to check for Palindrome string is from Frankfurt,
Germany. View All Articles Related Articles and Code: An Assembly Language Program sort
a given series in ascending order An Assembly Language Program to find 2's Complement of
given binary number Program to check whether the input string is palindrome or not Program
to check entered string is palindrome or not Program to check entered string is palindrome or
not Program to check whether a word is palindrome or not (using classes & pointers ) Prolog
program to check whether a given word is a palindrome or not Prolog program to check
whether a given list is palindrome or not @@LANGUAGE - LANGUAGE Function Palindrome
string Develop a CORBA application that takes a string from client and returns whether it is
palindrome Write a shell program to check whether a given string is palindrome or not.
Program to check whether the characters in a string are in ascending order or not Program to
check for string Program to check the start and end of a String PROGRAM TO CHECK THE
STRING IS PALINDROM OR NOT, PARALLELY Program to check if given strings form an
acrostic The type 'System.Data.Objects.ObjectContext' is defined in an assembly that is not
referenced Word Assembly Program Basic C Programming Language Other Interesting
Articles in Assembly Language: Program to Print the Fibonacci series Program to Calculate
the average of n numbers Program to compare two strings PROGRAM TO CLEAR SCREEN
DISPLAY THE STRING ON THE SCREEN USING INT 21, SERVICES 01 & 02 ONLY To divide 10
8-bit data in an array by 20 and store the result in another array, first quotient and then
remainder READ A STRING CHARACTOR BY CHARACTOR AND DISPLAY THE SAME STRING
Program that find the greatest common divisor (GCD) of two integers M and N Program to
convert an integer number from base 8 to base 10 and store it in an array PROGRAM TO
CHECK GIVEN TWO VALUE ARE EQUAL OR NOT Program to perform an exchange of elements
of two arrays Program to display a "?", read two capital letters, and display them on the next
line in alphabetical order. PROGRAM TO WRITE A PROGRAM TO COMPARE TO MEMORY
LOCATION PROGRAM TO DISPLAY DAY OF WEEK AND MONTH PROGRAM TO READ TODAY'S
DATE THROUGH KEYBOARD AND THEN DISPLAY THE CORRESPONDING DAY AND MONTH
Program to print characters from A to Z on the screen Program to read a character and
display it on new line with user prompts initialized by constants. Store any five 8-bit data
check if >30 then add 10 otherwise add 20 An Assembly Language Program sort a given
series in ascending order Program of an array that prints it's value before and after clearing
the 3rd row and 4th column using based index mode Please enter your Comment Comment
should be atleast 30 Characters. Please put code inside [Code] your code [/Code]. Please
login to post comment Kondaparthy Gayatri from India Comment on: Apr 05 please provide
me the armstrong number program in microprocessor 8086 Mikro Mikross from Canada
Comment on: Dec 16 i have a problem with creating an aplication for finding how many
palindrome words are in one sentence that is put in the data segment please help me :) View
All Comments Assembly Language View All General Homework Help Artificial
Intelligence C Programming C++ Programming Visual C++ OOAD Cobol Java SQL
Server Asp.net MVC Rest and WCF Services Entity Framework Knockout.Js Unix / Linux /
Ubuntu Networking OOPs Concept HTML Dos SQL System Analysis &
Design Gadgets Internet CSS Javascript .Net
Framework Asp.net C# VB.Net Python Perl Oracle Software Engineering RDBMS
Terms AJAX Framework Design Pattern UML WPF WCF SEO PowerShell Visual
Studio WWF BizTalk Server Azure General Testing Online Certifications PHP My
SQL LinQ Project Management Silverlight XML MS Office Windows
OS DHTML Sharepoint RSS Feeds: Articles | Forum | New
Users | Activities | Interview FAQ | Poll | Hotlinks Social Networking: Hall of
Fame | Facebook | Twitter | LinkedIn Terms: Terms of Use | Privacy Policy | Contact
us Copyright © 2008-2012 ShareThis Copy and Paste

Вам также может понравиться