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
8086 Minimum mode System and Timing In a minimum mode 8086 system, the microprocessor 8086 is operated in minimum mode by strapping its MN/MX pin to logic 1.All the control si

Program is written but has errors returning values from the procedure.

Entering a Program In this section, we will explain the procedure for entering a small program on IBM PC with DOS operating system. Assume a program of addition of 2 bytes, as


The main objective of the assignment is to explore the knowledge regarding parallel ports of a computer system. You can read and write datato/from the parallel port using IN and OU

LENGTH : Byte Length of a Label: This directive is not available in MASM. This is used to mention to the length of a data array or a string. MOV CX. LENGTH ARRAY This sta


write and run a programme using 8086 assembly language that interchange the lower four bits of AL registered with upper four bits.

Assembly Language Example Programs We studied the entire instruction set of 8086/88, pseudo-ops and assembler directives. We have explained the process of entering an assembly

RCR: Rotate Right through Carry:- This instruction rotates the contents  bit-wise of the destination operand right by the specified count through carry flag (CF). For each operati