Scas-string manipulation instruction-microprocessor, Assembly Language

Assignment Help:

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.


Related Discussions:- Scas-string manipulation instruction-microprocessor

Relocate program and data, ) What is the difference between re-locatable pr...

) What is the difference between re-locatable program and re-locatable data?

Instruction formats-microprocessor, Instruction Formats A machine langu...

Instruction Formats A machine language instruction format has 1 or more number of fields linked with it. The first field is known as operation code field or op code field, whic

Xor-logical instruction-microprocessor, XOR: Logical Exclusive OR: The XOR...

XOR: Logical Exclusive OR: The XOR operation is again carried out in a similar way to the AND and OR operation. The constraint over operands are also similar. The XOR operation pr

Assembling a program-microprocessor, Assembling a program Microsoft Ass...

Assembling a program Microsoft Assembler MASM is one of the simple to use and famous assemblers.  All the references and discussions in this section are belonging to the MASM.

Rcr-rcl-logic instruction-microprocessor, RCR: Rotate Right through Carry:...

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

Assembly help, use">http://www.raritanval.edu/uploadedFiles/faculty/cs/full...

use">http://www.raritanval.edu/uploadedFiles/faculty/cs/full-time/Brower/CISY256/2013Spring/CISY256%20Assembly%20Project.pdf use microsoft visual 2010 and http://www.asmirvine.c

8088 associated with 8259 a-microprocessor, For an 8088 the 2 addresses lin...

For an 8088 the 2 addresses linked with an 8259A are normally consecutive, and the AO line is associated to the AO pin, but because there are just 8 data pins on the 8259A and the

Input output memory mapped-microprocessor, Memory Mapped I/O Memory I/O...

Memory Mapped I/O Memory I/O devices are mapped into the system memory map with ROM and RAM. To access a hardware  device, simply write or  read  to  those  'special'  addresse

ADDITION-SUBTRACTION, HELLO I AM TRYING TO ADD AND SUBTRACT BUT I SEEM CAN'...

HELLO I AM TRYING TO ADD AND SUBTRACT BUT I SEEM CAN''T FIND THE CORRECT REGISTER TO PUT IN

Programming with an assembler-microprocessor, Programming with an assembler...

Programming with an assembler The procedure of hand-coding 8086 programs is somewhat tiresome; hence generally a programmer may find it hard to get a correct listing of the mac

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