Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

String manipulation instructions in 8086 microprocessor

  • Last Updated : 24 May, 2018

String is s series of data byte or word available in memory at consecutive locations. It is either referred as byte string or word string. Their memory is always allocated in a sequential order. Instructions used to manipulate strings are called string manipulation instructions.

Following is the table showing the list of string manipulation instructions:

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

 

OPCODEOPERANDEXPLANATIONEXAMPLE
REPinstructionrepeat the given instruction till CX != 0REP MOVSB
REPEinstructionrepeat the given instruction while CX = 0REPE
REPZinstructionrepeat the given instruction while ZF = 1REPZ
REPNEinstructionrepeat the given instruction while CX != 0REPNE
REPNZinstructionrepeat the given instruction while ZF = 0REPNZ
MOVSBnonemoves contents of byte given by DS:SI into ES:DIMOVSB
MOVSWnonemoves contents of word given by DS:SI into ES:DIMOVSW
MOVDnonemoves contents of double word given by DS:SI into ES:DIMOVD
LODSBnonemoves the byte at address DS:SI into AL; SI is incr/decr by 1LODSB
LODSWnonemoves the word at address DS: SI into AX; SI is incr/decr by 2LODSW
LODSDnonemoves the double word at address DS:SI into EAX; SI is incr/decr by 4LODSD
STOSBnonemoves contents of AL to byte address given by ES:DI; DI is incr/dec by 1STOSB
STOSWnonemoves the contents of AX to the word address given by ES:DI; DI is incr/decr by 2STOSW
STOSDnonemoves contents of EAX to the DOUBLE WORD address given by ES:DI; DI is incr/decr by 4STOSD
SCASBnonecompares byte at ES:DI with AL and sets flags according to resultSCASB
SCASWnonecompares word at ES:DI with AX and sets flagsSCASW
SCASDnonecompares double word at ES:DI with EAX and sets flagsSCASD
CMPSBnonecompares byte at ES:DI with byte at DS:SI and sets flagsCMPSB
CMPSWnonecompares word at ES:DI with word at DS:SI and sets flagsCMPSW
CMPSDnonecompares double word at ES:DI with double word at DS:SI and sets flagsCMPSD
My Personal Notes arrow_drop_up
Recommended Articles
Page :