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
Summary of Contents for 80C186EA
Page 1: ...80C186EA 80C188EA Microprocessor User s Manual...
Page 2: ...80C186EA 80C188EA Microprocessor User s Manual 1995...
Page 19: ......
Page 20: ...1 Introduction...
Page 21: ......
Page 28: ...2 Overview of the 80C186 Family Architecture...
Page 29: ......
Page 79: ......
Page 80: ...3 Bus Interface Unit...
Page 81: ......
Page 129: ......
Page 130: ...4 Peripheral Control Block...
Page 131: ......
Page 139: ......
Page 140: ...5 ClockGenerationand Power Management...
Page 141: ......
Page 165: ......
Page 166: ...6 Chip Select Unit...
Page 167: ......
Page 190: ...7 Refresh Control Unit...
Page 191: ......
Page 205: ......
Page 206: ...8 Interrupt Control Unit...
Page 207: ......
Page 239: ...INTERRUPT CONTROL UNIT 8 32...
Page 240: ...9 Timer Counter Unit...
Page 241: ......
Page 265: ......
Page 266: ...10 Direct Memory Access Unit...
Page 267: ......
Page 295: ...DIRECT MEMORY ACCESS UNIT 10 28...
Page 296: ...11 Math Coprocessing...
Page 297: ......
Page 314: ...12 ONCE Mode...
Page 315: ......
Page 318: ...A 80C186 Instruction Set Additions and Extensions...
Page 319: ......
Page 330: ...B Input Synchronization...
Page 331: ......
Page 334: ...C Instruction Set Descriptions...
Page 335: ......
Page 383: ...INSTRUCTION SET DESCRIPTIONS C 48...
Page 384: ...D Instruction Set Opcodes and Clock Cycles...
Page 385: ......
Page 408: ...Index...
Page 409: ......