Cmps-string manipulation instruction-microprocessor, Assembly Language

Assignment Help:

CMPS : Compare String Byte or String Word:-The CMPS instruction may be utilized to compare two strings of Words or byte. The length of the string ought to be stored in the CX. If both the word or byte strings are equal, zero flag is set. Flags are affected in the similar way as CMP instruction. The DS: SI and ES: DI point to the 2 strings. The REP instruction prefix is utilized to repeat the operation till register CX (counter) becomes zero or the condition specified by the REP prefix is false.

Following string of instructions describe the instruction. Comparison of the string begin from initial byte / word  of the string, after each comparison the index registers  are updated depending on the direction flag and the counter is decremented. This byte by byte / word by word comparison continues until a mismatch is found. When, a mismatch is found, the carry flag and zero flags are modified properly and the execution proceeds further.

Example :

2388_cmps.jpg

If both strings are fully equal, for example the register CX becomes zero, the ZF is set, or else, ZF is reset.

 


Related Discussions:- Cmps-string manipulation instruction-microprocessor

Program on virtual learning environment, Task One Produce a menu such a...

Task One Produce a menu such as the one below (remember to keep to this specification). M E N U 1, Enter Number 1 2, Enter Number 2 3, Display num1 and num2 4, D

Estimation of a definite integral, Can any one assist me with this program....

Can any one assist me with this program. I am not efficient with assembly language and I need assistance badly. I am not asking anyone to do my work I just need help step by step

Encrypting, write an assembly language program that has two subroutines : o...

write an assembly language program that has two subroutines : one for encrypting alphabates of a string and second fo decrypting the encoded string . in encryption simply converta

Intel''s 8237 dma controller-microprocessor, Intel's 8237 DMA controller : ...

Intel's 8237 DMA controller : 1) The 8237 contain 4 independent I/O channels 2) It contains 27 registers, 7 of which are system-wide registers and 5 for each channel. 3)

Ror-logical instruction-microprocessor, ROR : Rotate Right without Carry: ...

ROR : Rotate Right without Carry: This instruction rotates the contents of destination operand to the bit-wise right either by one or by the count specified in register CL, exclud

Prime finder - assembly program, Prime Finder - assembly program: Pro...

Prime Finder - assembly program: Problem:  Prime Finder   In this problem you will write a small program that tests whether a given integer is a prime number or not.  Let's

Interrupt table-how interrupt table processed-microprocessor, Interrupt Tab...

Interrupt Table Each interrupt level has a booked memory location, called an interrupt vector.  All these vectors (or pointers) are stored in the interrupt table. Table lies at

Xml, Write the structure of For…Next loop in VB.Net and also write a progra...

Write the structure of For…Next loop in VB.Net and also write a program to print integers from 1 to 10 on the console.

PIC MCU, CAN U GIVE BRIEF THEORY

CAN U GIVE BRIEF THEORY

Operating System, Why is the capability to relocate processes desirable?

Why is the capability to relocate processes desirable?

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd