
Instruction Set Listing
3-9
3.1.11
Processor Control
Processor Control Instructions
Coprocessor Interface Instructions
3.1.12
String
A string is a contiguous sequence of components stored in memory. For example, a string
might be composed of a list of ASCII characters or a table of numbers.
A string instruction operates on a single component in a string. To manipulate more than
one component in a string, the string instruction
prefixes (REP/REPE/REPNE/REPNZ/
REPZ) can be used to repeatedly execute the same string instruction.
A string instruction uses an index register as the offset of a component in a string. Most
string instructions operate on only one string, in which case they use either the Source
Index (SI) register or the Destination Index (DI) register. String instructions that operate on
two strings use SI as the offset of a component in one string and DI as the offset of the
corresponding component in the other string.
After executing a string instruction, the microcontroller automatically increments or
decrements SI and DI so that they contain the offsets of the next components in their strings.
The microcontroller determines the amount by which the index registers must be
incremented or decremented based on the size of the components.
The microcontroller can process the components of a string in a forward direction (from
lower addresses to higher addresses), or in a backward direction (from higher addresses
to lower ones). The microcontroller uses the value of the Direction Flag (DF) to determine
whether to increment or decrement SI and DI. If DF is cleared to 0, the microcontroller
increments the index registers; otherwise, it decrements them.
String-Instruction Prefixes
Mnemonic
Name
See Page
HLT
Halt
LOCK
Lock the Bus
NOP
No Operation
Mnemonic
Name
See Page
ESC
Escape
WAIT
Wait for Coprocessor 4-245
Mnemonic
Name
See Page
REP
Repeat
REPE
Repeat While Equal
REPNE
Repeat While Not Equal
REPNZ
Repeat While Not Zero (
Synonym for
REPNE)
REPZ
Repeat While Zero (
Synonym for
REPE)
Summary of Contents for Am186 Series
Page 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Page 10: ...Table of Contents x...
Page 18: ...Programming 1 8...
Page 40: ...Instruction Set Listing 3 14...