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 :


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
move a byte string ,16 bytes long from the offset 0200H to 0300H in the segment 7000H

Cache controller The cache controller is the mind of the cache.  Its responsibilities include:  performing the  snarfs and snoops, updating the  TRAM  and SRAM and implementing

PTR : Pointer:- The pointer operator which is used to declare the type of a variable, label or memory operand. The operator PTR is prefixed by either WORD or BYTE. If the prefi

Assume that the registers are initialized to EAX=12345h,EBX =9528h ECX=1275h,EDX=3001h sub AH,AH sub DH,DH mov DL,AL mov CL,3 shl DX,CL shl AX,1 add DX,AX

move a byte string ,16 bytes long from the offset 0200H to 0300H in the segment 7000H..

Program : A program to move a string of the data words from offset 2000H to offset 3000H the length of the string is OFH. Solution : For writing this program, we will use

how to add 111 and 333 in assembly language

#write a program 8086 to find the largest number

Your assignment for this project is to write an assembly language program that checks if the user's input is a valid ISBN number. A sample run of your program might look like:

Program : Write an assembly program to find out the number of positive numbers and negative numbers from a given series of signed numbers. Solution : Take the i th num