Scas-string manipulation instruction-microprocessor, Assembly Language

SCAS : Scan String Byte or String Word:-

This instruction scans a string of words or byte for an operand word or byte specified in the register AL or  register AX. The string is pointed to by ES: DI register pair. The length of the string is stored in register CX. The DF controls the mode for scanning of the string as stated in the case of MOVSB instruction. Whenever a match to the mention operand is found in string, execution stops and the zero flag is goes set. If no match is found, the zero flag is reset. The REPNE prefix is utilized with the SCAS instruction. The counters and pointers are updated automatically, until a match is found. Following string of instructions elaborates the use of SCAS instruction.

Example :

1987_SCAS.jpg

This string of instructions finds out, if contains WORD. If the WORD is found in the word string, before register CX becomes zero, the ZF is set, or else the ZF is reset. The scanning will continue until a match is found. Once a match is establish, the execution of the programme furtherproceeds.

Posted Date: 10/12/2012 3:36:46 AM | Location : United States







Related Discussions:- Scas-string manipulation instruction-microprocessor, Assignment Help, Ask Question on Scas-string manipulation instruction-microprocessor, Get Answer, Expert's Help, Scas-string manipulation instruction-microprocessor Discussions

Write discussion on Scas-string manipulation instruction-microprocessor
Your posts are moderated
Related Questions

Write a M68000 assembly language subroutine MULSUM that takes an array named A containing n bytes of positive numbers, and fills two arrays, array B containing n

How to print strings in Right Triangle form?

8254 Programmable Timer A diagram of Intel's 8254 interval event/timer counter is given in Figure. The 8254 consists of 3 identical counting circuits, per of which has GATE and

Write a program that will input a number from the keyboard, and then display the number in binary form, as well as the number of one's in the number. Hint: Shift the value left (or

The Pentium Pro    Introduced in the year 1995, the Pentium Pro reflected  still  more  design  breakthroughs.  The Pentium Pro may process 3 instructions in a single clock cy

Pin functions for the minimum mode operation of 8086 are following: 1) M/I/O -Memory/IO: This is a status line logically equivalent to S2 in maximum mode. When it is low, it

Write an assembly language program to perform a rot13 1 conversion on characters in a text file.  The program should read charatcers from the input file, perform the rot13 convers

Assembly Language: Inside the 8085, instructions are really stored like binary numbers, not a very good manner to look at them and very difficult to decipher. An assembler is

Project Description: Write an 80x86 assembly program that performs the following functions: Reads a set of integers from a file into an array. The data file name is to be