📜  8086微处理器中的字符串操作指令

📅  最后修改于: 2021-06-28 15:33:32             🧑  作者: Mango

字符串是存储器中连续位置处可用的一系列数据字节或字。它被称为字节字符串或字符串。它们的内存始终按顺序分配。用于操纵字符串的指令称为字符串操纵指令。

下表显示了字符串操作指令列表:

OPCODE OPERAND EXPLANATION EXAMPLE
REP instruction repeat the given instruction till CX != 0 REP MOVSB
REPE instruction repeat the given instruction while CX = 0 REPE
REPZ instruction repeat the given instruction while ZF = 1 REPZ
REPNE instruction repeat the given instruction while CX != 0 REPNE
REPNZ instruction repeat the given instruction while ZF = 0 REPNZ
MOVSB none moves contents of byte given by DS:SI into ES:DI MOVSB
MOVSW none moves contents of word given by DS:SI into ES:DI MOVSW
MOVD none moves contents of double word given by DS:SI into ES:DI MOVD
LODSB none moves the byte at address DS:SI into AL; SI is incr/decr by 1 LODSB
LODSW none moves the word at address DS: SI into AX; SI is incr/decr by 2 LODSW
LODSD none moves the double word at address DS:SI into EAX; SI is incr/decr by 4 LODSD
STOSB none moves contents of AL to byte address given by ES:DI; DI is incr/dec by 1 STOSB
STOSW none moves the contents of AX to the word address given by ES:DI; DI is incr/decr by 2 STOSW
STOSD none moves contents of EAX to the DOUBLE WORD address given by ES:DI; DI is incr/decr by 4 STOSD
SCASB none compares byte at ES:DI with AL and sets flags according to result SCASB
SCASW none compares word at ES:DI with AX and sets flags SCASW
SCASD none compares double word at ES:DI with EAX and sets flags SCASD
CMPSB none compares byte at ES:DI with byte at DS:SI and sets flags CMPSB
CMPSW none compares word at ES:DI with word at DS:SI and sets flags CMPSW
CMPSD none compares double word at ES:DI with double word at DS:SI and sets flags CMPSD