answersLogoWhite

0

Registers used: ax,ds,si,di,cl

flags affected: zf,cf

program:

assume cs:code,ds:data

code segment

mov ax,data

mov ds,ax

mov si,offset str1

mov di,offset str2

mov cl,count

cld

rep cmpsb

hlt

code ends

data segment

str1 db 04h,05h,07h,08h

count equ 04h

org 0010h

str2 db 04h,06h,07h,09h

data ends

end

result:

input: str1 (ds:0000h) = 04h,05h,07h,08h

str2 (ds:0010h) = 04h,06h,07h,09h

User Avatar

Wiki User

∙ 14y ago

What else can I help you with?

Continue Learning about Engineering
Related Questions

Write a program to compare two strings with out using strcmp function?

#include main() { //please read two strings int str1 and str2// while(str1[i]!='/0' &&str2[i]!='/0') if(str1[i]!=str2[i]) flag=1; if(flag==1) printf("equal"); } #include main() { //please read two strings int str1 and str2// while(str1[i]!='/0' &&str2[i]!='/0') if(str1[i]!=str2[i]) flag=1; if(flag==1) printf("equal"); }


How to write aC program to merge two singly linked list?

write a c program to circular queue


For curiously write the form you would use to compare two things?

what is the form you would use the word curiously to compare two things


How do you write an analogy?

first you would compare two words with others like playing:fun and writing:story


Why are you interested in this degree program?

Write a two- paragraph explanation to address the following questions: Why are you interested in this program (education) and how do you expect to benefit from it?


Write a c program add two polynomial using link list?

GOUDHMARINI


How do you braid a landyard with only three rexlace strings?

i think you cannt but two strings i know how if you dont know how with two strings e mail me at bannajo@gmail.com and i wil email you back


How do you write a program in Perl to swap two variables without using the third one?

Use list assignment i.e. for two variables $a, $b: ($a,$b) = ($b,$a)


Two-thirds of a symphony orchestra consists of what?

strings


What are the two things you should write down if you get an error message on the computer?

Write down the entire error message. Also, list what you were doing before you got the error. Include the program you were working in.


How many strings does a bandurria has?

The modern day bandurria has 12 strings (6 pairs). During the renaissance, they had two.


Why we write java program using classes?

Classes are well organised functions in java which help discriminate between two different functions.