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
ADC: Add with Carry:- This instruction performs the similar operation a like ADD instruction, but adds the carry flag bit (which might be set as a result of the previous calculatio

Using DEBUG DEBUG.COM is a DOS efficacy that facilitates the trouble-shooting and debugging of assembly language programs. In particular case of personal computers, all of th

Write a program that performs the addition, subtraction, multiplications, division of the given operands. Perform BCD operation for addition and subtraction.

RET : Return from the Procedure:- At each CALL instruction, the register IP and register CS of the next instruction is pushed to stack, before the control is transferred to the

III rd Generation Microprocessor: The single 3rd generation microprocessor chip having 64-pins began with the introduction of 16-bit Intel 8086 in 1978. The other essential

Motorola 68000 Series : 68000microprocessor is a 16 bit processor that has addressing space of 65536 locations, each of which holds a 64-bits word; In order to address those lo

given a sentence, find the number of times a particular character or word appear. the sentence is to be entered by the user

Machine Coding the Programs So far we have describe five programs which were  written  for hand coding  by a programmer. In this, we will now have a deep look at how these prog

1) Write an 80x86 assembly language program in EXE file format to do the following tasks: a) Open and read the contents of a file into memory (use at least 1 kB). b) Sort the li

Multiply two numbers by using shift and rotate instruction