SlideShare a Scribd company logo
Byte and String Manipulation
Unit -1
Presented By
Mrs. M.P.Sasirekha
String Instruction in 8086
• The String Instruction in 8086 are namely,
• REP/REPE/REPZ/REPNE/REPNZ
• MOVS/MOVSB/MOVSN
• CMPS/CMPSB/CMPSW
• SCAS/SCASB/SCASW
• LODS/LODSB/LODSW
• STOS/STOSB/STOSW
REP/REPE/REPZ/REPNE/REPNZ
Instruction
• REP is a prefix which is written before one of the String
Instruction in 8086. These instructions repeat until specified
condition exists.
MOVS/MOVSB/MOVSW Instruction
• This instruction copies a byte or word from a location in the data
segment to a location in the extra segment.
• The offset of the source byte or word in the data segment must
be in the SI register.
• The offset of the destination in the extra segment must be
contained in the DI register.
• For multiple byte or multiple word moves the number of
elements to be moved is put in the CX register so that it can
function as a counter.
• After the byte or word is moved SI and DI are automatically
adjusted to point to the next source and the next destination.
MOVS/MOVSB/MOVSW Instruction
• If the direction flag is 0, then SI and DI will be incremented by 1
after a byte move and they will incremented by 2 after a word
move.
• If the DF is a 1, then SI and DI will be decremented by 1 after a
byte move and they will be decremented by 2 after a word
move.
• MOVS affects no flags.
• The way to tell the assembler whether to code the instruction for
a byte or word move is to add a “B” or a “W” to the MOVS
mnemonic.
• MOVSB, for example, says move a string as bytes. MOVSW
MOVS/MOVSB/MOVSW Instruction
CMPS/CMPSB/CMPSW Instruction
• A String Instruction in 8086 is a series of the same type of data
items in sequential memory locations.
• The CMPS instruction can be used to compare a byte in one
string with a byte in another string or to compare a word in one
string with a word in another string.
• SI is used to hold the offset of a byte or word in the source
string and DI is used to hold the offset of a byte or a word in the
other string. The comparison is done by subtracting the byte or
word pointed to by DI from the byte or word pointed to by SI.
• The AF, CF, OF, PF, SF, and ZF flags are affected by the
comparison, but neither operand is affected.
CMPS/CMPSB/CMPSW Instruction
• After the comparison SI and DI will be automatically
incremented or decremented according to direction flag to point
to the next element in the two strings (if DF = 0, SI and DI ↑ )
CX functions as a counter which is decremented after each
comparison.
• This will go on until CX = 0
SCAS/SCASB/SCASW Instruction
• SCAS compares a string byte with a byte in AL or a string word
with word in AX.
• The instruction affects the flags, but it does not change either
the operand in AL (AX) or the operand in the String Instruction
in 8086.
• The string to be ‘scanned must be in the extra segment and DI
must contain the offset of the byte or the word to be compared.
• After the comparison DI will be automatically incremented or
decremented according to direction flag, to point to the next
element in the two strings (if DF = 0, SI and DI ↑ ) CX functions
as a counter which is decremented after each comparison.
• This will go on until CX = 0. SCAS affects the AF, CF, OF, PF,
SF and ZF flags.
SCAS/SCASB/SCASW Instruction
LODS/LODSB/LODSW Instruction
• This instruction copies a byte from a string location pointed to
by SI to AL, or a word from a string location pointed to by SI to
AX. LODS does not affect any flags. LODSB copies byte and
LODSW copies a word.
STOS/STOSB/STOSW Instruction
• The STOS instruction copies a byte from AL or a word from AX
to a memory location in the extra segment.
• DI is used to hold the offset of the memory location in the extra
segment.
• After the copy, DI is automatically incremented or decremented
to point to the next string element in memory.
• If the direction flag, DF, is cleared, then DI will automatically be
incremented by one for a byte string or incremented by two for a
word String Instruction in 8086.
• If the direction flag is set, DI will be automatically decremented
by ono for a byte string or decremented by two for a word string.
STOS does not affect any flags. STOSB copies byte and
STOSW copies a word.
STOS/STOSB/STOSW Instruction
Thank you
Ad

More Related Content

What's hot (20)

Serial Communication
Serial CommunicationSerial Communication
Serial Communication
UshaRani289
 
8086 String Instructions.pdf
8086 String Instructions.pdf8086 String Instructions.pdf
8086 String Instructions.pdf
A. S. M. Badrudduza
 
Microprocessor 8086 instructions
Microprocessor 8086 instructionsMicroprocessor 8086 instructions
Microprocessor 8086 instructions
Ravi Anand
 
Instruction Set of 8086 Microprocessor
Instruction Set of 8086 MicroprocessorInstruction Set of 8086 Microprocessor
Instruction Set of 8086 Microprocessor
Ashita Agrawal
 
3.programmable interrupt controller 8259
3.programmable interrupt controller 82593.programmable interrupt controller 8259
3.programmable interrupt controller 8259
MdFazleRabbi18
 
Memory & I/O interfacing
Memory & I/O  interfacingMemory & I/O  interfacing
Memory & I/O interfacing
deval patel
 
flag register of 8086
flag register of 8086flag register of 8086
flag register of 8086
asrithak
 
MAXIMUM MODE OF 8086 MICROPROCESSOR-1.pptx
MAXIMUM MODE OF 8086 MICROPROCESSOR-1.pptxMAXIMUM MODE OF 8086 MICROPROCESSOR-1.pptx
MAXIMUM MODE OF 8086 MICROPROCESSOR-1.pptx
ZadockMaloba
 
8251 USART
8251 USART8251 USART
8251 USART
ShivamSood22
 
Instruction formats-in-8086
Instruction formats-in-8086Instruction formats-in-8086
Instruction formats-in-8086
MNM Jain Engineering College
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
saurav kumar
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
Dr. AISHWARYA N
 
DMA and DMA controller
DMA and DMA controllerDMA and DMA controller
DMA and DMA controller
nishant upadhyay
 
8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller
abhikalmegh
 
8086 memory segmentation
8086 memory segmentation8086 memory segmentation
8086 memory segmentation
Sridari Iyer
 
8086 modes
8086 modes8086 modes
8086 modes
PDFSHARE
 
Internal architecture-of-8086
Internal architecture-of-8086Internal architecture-of-8086
Internal architecture-of-8086
Estiak Khan
 
Introduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorIntroduction to 8085 Microprocessor
Introduction to 8085 Microprocessor
Ravi Anand
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
Mahalakshmiv11
 
Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086
Jismy .K.Jose
 
Serial Communication
Serial CommunicationSerial Communication
Serial Communication
UshaRani289
 
Microprocessor 8086 instructions
Microprocessor 8086 instructionsMicroprocessor 8086 instructions
Microprocessor 8086 instructions
Ravi Anand
 
Instruction Set of 8086 Microprocessor
Instruction Set of 8086 MicroprocessorInstruction Set of 8086 Microprocessor
Instruction Set of 8086 Microprocessor
Ashita Agrawal
 
3.programmable interrupt controller 8259
3.programmable interrupt controller 82593.programmable interrupt controller 8259
3.programmable interrupt controller 8259
MdFazleRabbi18
 
Memory & I/O interfacing
Memory & I/O  interfacingMemory & I/O  interfacing
Memory & I/O interfacing
deval patel
 
flag register of 8086
flag register of 8086flag register of 8086
flag register of 8086
asrithak
 
MAXIMUM MODE OF 8086 MICROPROCESSOR-1.pptx
MAXIMUM MODE OF 8086 MICROPROCESSOR-1.pptxMAXIMUM MODE OF 8086 MICROPROCESSOR-1.pptx
MAXIMUM MODE OF 8086 MICROPROCESSOR-1.pptx
ZadockMaloba
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
saurav kumar
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
Dr. AISHWARYA N
 
8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller
abhikalmegh
 
8086 memory segmentation
8086 memory segmentation8086 memory segmentation
8086 memory segmentation
Sridari Iyer
 
8086 modes
8086 modes8086 modes
8086 modes
PDFSHARE
 
Internal architecture-of-8086
Internal architecture-of-8086Internal architecture-of-8086
Internal architecture-of-8086
Estiak Khan
 
Introduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorIntroduction to 8085 Microprocessor
Introduction to 8085 Microprocessor
Ravi Anand
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
Mahalakshmiv11
 
Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086
Jismy .K.Jose
 

Similar to Byte and string manipulation 8086 (20)

8086inst stringsl
8086inst stringsl8086inst stringsl
8086inst stringsl
HarshitParkar6677
 
Chap 8086 string
Chap 8086 stringChap 8086 string
Chap 8086 string
HarshitParkar6677
 
Chapter3 8086inst stringsl
Chapter3 8086inst stringslChapter3 8086inst stringsl
Chapter3 8086inst stringsl
HarshitParkar6677
 
FLAG & PROCESSOR & STRING INSTRUCTIONS.pptx
FLAG & PROCESSOR & STRING INSTRUCTIONS.pptxFLAG & PROCESSOR & STRING INSTRUCTIONS.pptx
FLAG & PROCESSOR & STRING INSTRUCTIONS.pptx
susmithaganapathi
 
8086 microprocessor assembler directives.ppt
8086   microprocessor assembler directives.ppt8086   microprocessor assembler directives.ppt
8086 microprocessor assembler directives.ppt
NaveenKumar5162
 
Microprocessors-based systems (under graduate course) Lecture 8 of 9
Microprocessors-based systems (under graduate course) Lecture 8 of 9 Microprocessors-based systems (under graduate course) Lecture 8 of 9
Microprocessors-based systems (under graduate course) Lecture 8 of 9
Randa Elanwar
 
Instruction set
Instruction setInstruction set
Instruction set
Kamini Benare
 
String-Instructions-in-Assembly-Language.pptx
String-Instructions-in-Assembly-Language.pptxString-Instructions-in-Assembly-Language.pptx
String-Instructions-in-Assembly-Language.pptx
susmithaganapathi
 
Assembly language
Assembly languageAssembly language
Assembly language
Bathshebaparimala
 
Microprocessor.pptx
Microprocessor.pptxMicroprocessor.pptx
Microprocessor.pptx
NishatNishu5
 
String_manipulations.pdf
String_manipulations.pdfString_manipulations.pdf
String_manipulations.pdf
Anonymous611358
 
instructionsetsofjdtufgmictfgfjh8086.pptx
instructionsetsofjdtufgmictfgfjh8086.pptxinstructionsetsofjdtufgmictfgfjh8086.pptx
instructionsetsofjdtufgmictfgfjh8086.pptx
zarinajinna7432
 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
Bathshebaparimala
 
Instruction Set Of 8086 DIU CSE
Instruction Set Of 8086 DIU CSEInstruction Set Of 8086 DIU CSE
Instruction Set Of 8086 DIU CSE
salmancreation
 
Chap 3_2.ppt
Chap 3_2.pptChap 3_2.ppt
Chap 3_2.ppt
inian2
 
INTRUCTION SET OF 8086 FOR MICROPROCESSOR
INTRUCTION SET OF 8086 FOR MICROPROCESSORINTRUCTION SET OF 8086 FOR MICROPROCESSOR
INTRUCTION SET OF 8086 FOR MICROPROCESSOR
MikkiliSuresh
 
N_Asm Assembly strings (sol)
N_Asm Assembly strings (sol)N_Asm Assembly strings (sol)
N_Asm Assembly strings (sol)
Selomon birhane
 
Instructionsetof8086 by Alwani
Instructionsetof8086 by AlwaniInstructionsetof8086 by Alwani
Instructionsetof8086 by Alwani
Himanshu Alwani
 
Instruction set-of-8086
Instruction set-of-8086Instruction set-of-8086
Instruction set-of-8086
mudulin
 
ppt-U2 - (Instruction Set of 8086, Simple programs).pptx
ppt-U2 - (Instruction Set of 8086, Simple programs).pptxppt-U2 - (Instruction Set of 8086, Simple programs).pptx
ppt-U2 - (Instruction Set of 8086, Simple programs).pptx
RaviKiranVarma4
 
FLAG & PROCESSOR & STRING INSTRUCTIONS.pptx
FLAG & PROCESSOR & STRING INSTRUCTIONS.pptxFLAG & PROCESSOR & STRING INSTRUCTIONS.pptx
FLAG & PROCESSOR & STRING INSTRUCTIONS.pptx
susmithaganapathi
 
8086 microprocessor assembler directives.ppt
8086   microprocessor assembler directives.ppt8086   microprocessor assembler directives.ppt
8086 microprocessor assembler directives.ppt
NaveenKumar5162
 
Microprocessors-based systems (under graduate course) Lecture 8 of 9
Microprocessors-based systems (under graduate course) Lecture 8 of 9 Microprocessors-based systems (under graduate course) Lecture 8 of 9
Microprocessors-based systems (under graduate course) Lecture 8 of 9
Randa Elanwar
 
String-Instructions-in-Assembly-Language.pptx
String-Instructions-in-Assembly-Language.pptxString-Instructions-in-Assembly-Language.pptx
String-Instructions-in-Assembly-Language.pptx
susmithaganapathi
 
Microprocessor.pptx
Microprocessor.pptxMicroprocessor.pptx
Microprocessor.pptx
NishatNishu5
 
String_manipulations.pdf
String_manipulations.pdfString_manipulations.pdf
String_manipulations.pdf
Anonymous611358
 
instructionsetsofjdtufgmictfgfjh8086.pptx
instructionsetsofjdtufgmictfgfjh8086.pptxinstructionsetsofjdtufgmictfgfjh8086.pptx
instructionsetsofjdtufgmictfgfjh8086.pptx
zarinajinna7432
 
Instruction Set Of 8086 DIU CSE
Instruction Set Of 8086 DIU CSEInstruction Set Of 8086 DIU CSE
Instruction Set Of 8086 DIU CSE
salmancreation
 
Chap 3_2.ppt
Chap 3_2.pptChap 3_2.ppt
Chap 3_2.ppt
inian2
 
INTRUCTION SET OF 8086 FOR MICROPROCESSOR
INTRUCTION SET OF 8086 FOR MICROPROCESSORINTRUCTION SET OF 8086 FOR MICROPROCESSOR
INTRUCTION SET OF 8086 FOR MICROPROCESSOR
MikkiliSuresh
 
N_Asm Assembly strings (sol)
N_Asm Assembly strings (sol)N_Asm Assembly strings (sol)
N_Asm Assembly strings (sol)
Selomon birhane
 
Instructionsetof8086 by Alwani
Instructionsetof8086 by AlwaniInstructionsetof8086 by Alwani
Instructionsetof8086 by Alwani
Himanshu Alwani
 
Instruction set-of-8086
Instruction set-of-8086Instruction set-of-8086
Instruction set-of-8086
mudulin
 
ppt-U2 - (Instruction Set of 8086, Simple programs).pptx
ppt-U2 - (Instruction Set of 8086, Simple programs).pptxppt-U2 - (Instruction Set of 8086, Simple programs).pptx
ppt-U2 - (Instruction Set of 8086, Simple programs).pptx
RaviKiranVarma4
 
Ad

More from mpsrekha83 (20)

Line coding
Line codingLine coding
Line coding
mpsrekha83
 
Delta modulation
Delta modulationDelta modulation
Delta modulation
mpsrekha83
 
Block diagram of digital communication
Block diagram of digital communicationBlock diagram of digital communication
Block diagram of digital communication
mpsrekha83
 
Adaptive differential pcm
Adaptive differential pcmAdaptive differential pcm
Adaptive differential pcm
mpsrekha83
 
Adaptive delta modulation
Adaptive delta modulationAdaptive delta modulation
Adaptive delta modulation
mpsrekha83
 
Eye pattern
Eye patternEye pattern
Eye pattern
mpsrekha83
 
Digital modulation techniques
Digital modulation techniquesDigital modulation techniques
Digital modulation techniques
mpsrekha83
 
Comparison of qam and psk
Comparison of qam and pskComparison of qam and psk
Comparison of qam and psk
mpsrekha83
 
Pn sequence
Pn sequencePn sequence
Pn sequence
mpsrekha83
 
Spread spectrum
Spread spectrumSpread spectrum
Spread spectrum
mpsrekha83
 
8086 signals
8086 signals8086 signals
8086 signals
mpsrekha83
 
System bus timing 8086
System bus timing 8086System bus timing 8086
System bus timing 8086
mpsrekha83
 
Pulse modulation
Pulse modulationPulse modulation
Pulse modulation
mpsrekha83
 
AM diode envelope demodulator
AM diode envelope demodulatorAM diode envelope demodulator
AM diode envelope demodulator
mpsrekha83
 
Interrupts of 8086
Interrupts of 8086Interrupts of 8086
Interrupts of 8086
mpsrekha83
 
Super heterodyne receiver
Super heterodyne receiverSuper heterodyne receiver
Super heterodyne receiver
mpsrekha83
 
Pre emphasis and de-emphasis
Pre emphasis and de-emphasisPre emphasis and de-emphasis
Pre emphasis and de-emphasis
mpsrekha83
 
Fm generation
Fm generationFm generation
Fm generation
mpsrekha83
 
Fm demodulation using zero crossing detector
Fm demodulation using zero crossing detectorFm demodulation using zero crossing detector
Fm demodulation using zero crossing detector
mpsrekha83
 
FM demodulation using PLL
FM demodulation using PLLFM demodulation using PLL
FM demodulation using PLL
mpsrekha83
 
Delta modulation
Delta modulationDelta modulation
Delta modulation
mpsrekha83
 
Block diagram of digital communication
Block diagram of digital communicationBlock diagram of digital communication
Block diagram of digital communication
mpsrekha83
 
Adaptive differential pcm
Adaptive differential pcmAdaptive differential pcm
Adaptive differential pcm
mpsrekha83
 
Adaptive delta modulation
Adaptive delta modulationAdaptive delta modulation
Adaptive delta modulation
mpsrekha83
 
Digital modulation techniques
Digital modulation techniquesDigital modulation techniques
Digital modulation techniques
mpsrekha83
 
Comparison of qam and psk
Comparison of qam and pskComparison of qam and psk
Comparison of qam and psk
mpsrekha83
 
Spread spectrum
Spread spectrumSpread spectrum
Spread spectrum
mpsrekha83
 
System bus timing 8086
System bus timing 8086System bus timing 8086
System bus timing 8086
mpsrekha83
 
Pulse modulation
Pulse modulationPulse modulation
Pulse modulation
mpsrekha83
 
AM diode envelope demodulator
AM diode envelope demodulatorAM diode envelope demodulator
AM diode envelope demodulator
mpsrekha83
 
Interrupts of 8086
Interrupts of 8086Interrupts of 8086
Interrupts of 8086
mpsrekha83
 
Super heterodyne receiver
Super heterodyne receiverSuper heterodyne receiver
Super heterodyne receiver
mpsrekha83
 
Pre emphasis and de-emphasis
Pre emphasis and de-emphasisPre emphasis and de-emphasis
Pre emphasis and de-emphasis
mpsrekha83
 
Fm demodulation using zero crossing detector
Fm demodulation using zero crossing detectorFm demodulation using zero crossing detector
Fm demodulation using zero crossing detector
mpsrekha83
 
FM demodulation using PLL
FM demodulation using PLLFM demodulation using PLL
FM demodulation using PLL
mpsrekha83
 
Ad

Recently uploaded (20)

ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdfATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ssuserda39791
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
Artificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptxArtificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptx
rakshanatarajan005
 
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdfML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
rameshwarchintamani
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...
Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...
Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...
Journal of Soft Computing in Civil Engineering
 
Design of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdfDesign of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdf
Kamel Farid
 
Autodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User InterfaceAutodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User Interface
Atif Razi
 
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
Reflections on Morality, Philosophy, and History
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
Slide share PPT of NOx control technologies.pptx
Slide share PPT of  NOx control technologies.pptxSlide share PPT of  NOx control technologies.pptx
Slide share PPT of NOx control technologies.pptx
vvsasane
 
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic AlgorithmDesign Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Journal of Soft Computing in Civil Engineering
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Journal of Soft Computing in Civil Engineering
 
Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
Machine foundation notes for civil engineering students
Machine foundation notes for civil engineering studentsMachine foundation notes for civil engineering students
Machine foundation notes for civil engineering students
DYPCET
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdfATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ssuserda39791
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
Artificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptxArtificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptx
rakshanatarajan005
 
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdfML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
rameshwarchintamani
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
Design of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdfDesign of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdf
Kamel Farid
 
Autodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User InterfaceAutodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User Interface
Atif Razi
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
Slide share PPT of NOx control technologies.pptx
Slide share PPT of  NOx control technologies.pptxSlide share PPT of  NOx control technologies.pptx
Slide share PPT of NOx control technologies.pptx
vvsasane
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
Machine foundation notes for civil engineering students
Machine foundation notes for civil engineering studentsMachine foundation notes for civil engineering students
Machine foundation notes for civil engineering students
DYPCET
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 

Byte and string manipulation 8086

  • 1. Byte and String Manipulation Unit -1 Presented By Mrs. M.P.Sasirekha
  • 2. String Instruction in 8086 • The String Instruction in 8086 are namely, • REP/REPE/REPZ/REPNE/REPNZ • MOVS/MOVSB/MOVSN • CMPS/CMPSB/CMPSW • SCAS/SCASB/SCASW • LODS/LODSB/LODSW • STOS/STOSB/STOSW
  • 3. REP/REPE/REPZ/REPNE/REPNZ Instruction • REP is a prefix which is written before one of the String Instruction in 8086. These instructions repeat until specified condition exists.
  • 4. MOVS/MOVSB/MOVSW Instruction • This instruction copies a byte or word from a location in the data segment to a location in the extra segment. • The offset of the source byte or word in the data segment must be in the SI register. • The offset of the destination in the extra segment must be contained in the DI register. • For multiple byte or multiple word moves the number of elements to be moved is put in the CX register so that it can function as a counter. • After the byte or word is moved SI and DI are automatically adjusted to point to the next source and the next destination.
  • 5. MOVS/MOVSB/MOVSW Instruction • If the direction flag is 0, then SI and DI will be incremented by 1 after a byte move and they will incremented by 2 after a word move. • If the DF is a 1, then SI and DI will be decremented by 1 after a byte move and they will be decremented by 2 after a word move. • MOVS affects no flags. • The way to tell the assembler whether to code the instruction for a byte or word move is to add a “B” or a “W” to the MOVS mnemonic. • MOVSB, for example, says move a string as bytes. MOVSW
  • 7. CMPS/CMPSB/CMPSW Instruction • A String Instruction in 8086 is a series of the same type of data items in sequential memory locations. • The CMPS instruction can be used to compare a byte in one string with a byte in another string or to compare a word in one string with a word in another string. • SI is used to hold the offset of a byte or word in the source string and DI is used to hold the offset of a byte or a word in the other string. The comparison is done by subtracting the byte or word pointed to by DI from the byte or word pointed to by SI. • The AF, CF, OF, PF, SF, and ZF flags are affected by the comparison, but neither operand is affected.
  • 8. CMPS/CMPSB/CMPSW Instruction • After the comparison SI and DI will be automatically incremented or decremented according to direction flag to point to the next element in the two strings (if DF = 0, SI and DI ↑ ) CX functions as a counter which is decremented after each comparison. • This will go on until CX = 0
  • 9. SCAS/SCASB/SCASW Instruction • SCAS compares a string byte with a byte in AL or a string word with word in AX. • The instruction affects the flags, but it does not change either the operand in AL (AX) or the operand in the String Instruction in 8086. • The string to be ‘scanned must be in the extra segment and DI must contain the offset of the byte or the word to be compared. • After the comparison DI will be automatically incremented or decremented according to direction flag, to point to the next element in the two strings (if DF = 0, SI and DI ↑ ) CX functions as a counter which is decremented after each comparison. • This will go on until CX = 0. SCAS affects the AF, CF, OF, PF, SF and ZF flags.
  • 11. LODS/LODSB/LODSW Instruction • This instruction copies a byte from a string location pointed to by SI to AL, or a word from a string location pointed to by SI to AX. LODS does not affect any flags. LODSB copies byte and LODSW copies a word.
  • 12. STOS/STOSB/STOSW Instruction • The STOS instruction copies a byte from AL or a word from AX to a memory location in the extra segment. • DI is used to hold the offset of the memory location in the extra segment. • After the copy, DI is automatically incremented or decremented to point to the next string element in memory. • If the direction flag, DF, is cleared, then DI will automatically be incremented by one for a byte string or incremented by two for a word String Instruction in 8086. • If the direction flag is set, DI will be automatically decremented by ono for a byte string or decremented by two for a word string. STOS does not affect any flags. STOSB copies byte and STOSW copies a word.
  翻译: