OVERVIEW OF THE 80C186 FAMILY ARCHITECTURE
2-22
Individual bits in bytes and words can also be rotated. The processor does not discard the bits ro-
tated out of an operand. The bits circle back to the other end of the operand. The number of bits
to be rotated is taken from the count operand, which can specify either an immediate value or the
CL register. The carry flag can act as an extension of the operand in two of the rotate instructions.
This allows a bit to be isolated in the Carry Flag (CF) and then tested by a JC (jump if carry) or
JNC (jump if not carry) instruction.
2.2.1.4
String Instructions
Five basic string operations process strings of bytes or words, one element (byte or word) at a
time. Strings of up to 64 Kbytes can be manipulated with these instructions. Instructions are avail-
able to move, compare or scan for a value, as well as to move string elements to and from the
accumulator. Table 2-7 lists the string instructions. These basic operations can be preceded by a
one-byte prefix that causes the instruction to be repeated by the hardware, allowing long strings
to be processed much faster than is possible with a software loop. The repetitions can be termi-
nated by a variety of conditions. Repeated operations can be interrupted and resumed.
String instructions operate similarly in many respects (see Table 2-8). A string instruction can
have a source operand, a destination operand, or both. The hardware assumes that a source string
resides in the current data segment. A segment prefix can override this assumption. A destination
string must be in the current extra segment. The assembler does not use the operand names to ad-
dress strings. Instead, the contents of the Source Index (SI) register are used as an offset to address
the current element of the source string. The contents of the Destination Index (DI) register are
taken as the offset of the current destination string element. These registers must be initialized to
point to the source and destination strings before executing the string instructions. The LDS, LES
and LEA instructions are useful in performing this function.
Table 2-7. String Instructions
REP
Repeat
REPE/REPZ
Repeat while equal/zero
REPNE/REPNZ
Repeat while not equal/not zero
MOVSB/MOVSW
Move byte string/word string
MOVS
Move byte or word string
INS
Input byte or word string
OUTS
Output byte or word string
CMPS
Compare byte or word string
SCAS
Scan byte or word string
LODS
Load byte or word string
STOS
Store byte or word string
Содержание 80C186XL
Страница 1: ...80C186XL 80C188XL Microprocessor User s Manual...
Страница 2: ...80C186XL 80C188XL Microprocessor User s Manual 1995...
Страница 18: ...1 Introduction...
Страница 19: ......
Страница 27: ......
Страница 28: ...2 Overview of the 80C186 Family Architecture...
Страница 29: ......
Страница 79: ......
Страница 80: ...3 Bus Interface Unit...
Страница 81: ......
Страница 127: ......
Страница 128: ...4 Peripheral Control Block...
Страница 129: ......
Страница 137: ......
Страница 138: ...5 ClockGenerationand Power Management...
Страница 139: ......
Страница 154: ...6 Chip Select Unit...
Страница 155: ......
Страница 178: ...7 Refresh Control Unit...
Страница 179: ......
Страница 193: ......
Страница 194: ...8 Interrupt Control Unit...
Страница 195: ......
Страница 227: ......
Страница 228: ...9 Timer Counter Unit...
Страница 229: ......
Страница 253: ......
Страница 254: ...10 Direct Memory Access Unit...
Страница 255: ......
Страница 283: ......
Страница 284: ...11 Math Coprocessing...
Страница 285: ......
Страница 302: ...12 ONCE Mode...
Страница 303: ......
Страница 306: ...A 80C186 Instruction Set Additions and Extensions...
Страница 307: ......
Страница 318: ...B Input Synchronization...
Страница 319: ......
Страница 322: ...C Instruction Set Descriptions...
Страница 323: ......
Страница 371: ......
Страница 372: ...D Instruction Set Opcodes and Clock Cycles...
Страница 373: ......
Страница 396: ...Index...
Страница 397: ......