Briefly explain CMPSW

Enhanced Discovering Computers 2017 (Shelly Cashman Series) (MindTap Course List)
1st Edition
ISBN:9781305657458
Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Chapter4: Programs And Apps: Productivity, Graphics, Security, And Other Tools
Section: Chapter Questions
Problem 30SG
icon
Related questions
Question

Briefly explain CMPSW

Expert Solution
Step 1

Solution:

CMPSW:(compare string  of type word)

CMPSW(Compare string word)/CMPSB(compare string  of type Byte)/CMPS(compare string ) Instruction :

 String Instruction in 8086 assembly language  contains series of data item which are of same type . The data is present in sequential memory locations. CMPS instruction is used in order to compare a byte present in one string with a byte present in another string or it can also be used to compare a word present in one string with a word present in another string. SI(source)   holds the offset of a word or byte in the source string and DI (destination)is used to hold the offset of a word or byte in the other string. The comparison is carried  by subtracting a word or byte that is pointed  by DI from the word or byte pointed by SI. The  Error Flags such as CF,AF,OF,ZF,SF,PF are affected by the comparison  but ,the  operand is  not affected.

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Fundamentals of Blockchaining
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Enhanced Discovering Computers 2017 (Shelly Cashm…
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning
MIS
MIS
Computer Science
ISBN:
9781337681919
Author:
BIDGOLI
Publisher:
Cengage
Management Of Information Security
Management Of Information Security
Computer Science
ISBN:
9781337405713
Author:
WHITMAN, Michael.
Publisher:
Cengage Learning,