answersLogoWhite

0


Best Answer

org 100h

.data

str1 db "Computer"

str2 db "computer"

mes1 db "string are same $"

mes2 db "string are different $"

.code

assume cs:code,ds:data

start: mov ax,@data

mov ds,ax

mov es,ax

mov si,offset str1

mov di,offset str2

cld

mov cx,8

repe cmpsb

mov ah,9

jz skip

lea dx,mes2

jmp over

skip: lea dx,mes1

over: int 21h

mov ax,4c00h

int 21h

end start

ret

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

Mov cx,0005

mov ax,0000

mov ds,ax

mov si,3000

mov di,5000

cld

rep mov sb

mov cx,0005

mov ax,0000

mov ds,ax

mov si,3200

mov di,3000

cld

rep mov sb

mov cx,0005

mov ax,0000

mov ds,ax

mov si,5000

mov di,3200

cld

rep mov sb

int 03

org 3000

db 01

db 02

db 03

db 04

db 05

org 3200

db 06

db 07

db 08

db 09

db 0a

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write an 8086 assembly language program to compare if two strings are of the same length?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How can you do the same thing as the program below but using strings and arrays in C language?

Program below?!


Write a program in 'C' language to accept 6 strings as input and print them in lexicographic?

(ab)*b


How do you campaire Strings in java?

String class in Java has an 'equals' method that can be used to compare strings.


Which operator is used to compare strings in Perl?

eq


What is the difference between assembly language program and high level language program?

There is very little difference, functionally, between assembly language and machine level language. Each assembly language statement corresponds to one machine instruction. The difference is in readability (who wants to read and write in hex code?) and in ease of address computation.


Does C allows you to use equality operators to compare strings?

Yes, it does.


How do electric bass strings compare to upright bass strings?

Well, for one, string bass strings are a lot longer than electric bass strings. I wouldn't recommend putting string bass strings on an electric bass and vice versa.


What is the C plus plus program for string compare?

You don't need a program to compare strings since std::string already provides support for all the comparison operators (<, <=, >, >=, == and !=). To roll your own you must first create a string class and then provide operator overloads for the comparison operators. To compare strings, start at the first character in each string and compare. So long as they remain equal, move onto the next character. The comparison ends as soon as any character differs. You need only compare these two characters to decide which string is the lesser. To perform a case insensitive comparison, copy the two characters and convert the copies to lower case (or upper case, it doesn't matter). Then compare the copies. Do this for each character as you compare them rather than converting the entire string.


Write a script that accepts two strings from the user and compare two strings in web technology?

how to compare two strings that take input from the user and compare it. For example: i give first string as "THE" and give second string as "HTE" then return "match" if i give first as"THE" nd second string as "EHI" then return "NOtMatch" witout using STRCMP ... please help me


Who Assembly language write?

That depends on who you ask and how far back you go. It could be Intel, it could be whoever designed the ENAIC (used for looking up trajectory tables) but I think it was Charles Babbage, inventor of the 'analytical machine.' More: http://en.wikipedia.org/wiki/Turing_complete


Where string arrays belong in a C program?

There is no data type string in C. String is handled as an array of characters. To identify the end of the string, a null character is put. This is called a null terminated character array. So array of strings will be a double dimensioned array of chars. It is implemented as an array of pointers, each pointer pointing to an array of chars.


Why is No Strings Attached rated R?

No Strings Attached (2011) is rated R for sexual content, strong language, and some drug material.