80C186 INSTRUCTION SET ADDITIONS AND EXTENSIONS
A-2
A.1.2
String Instructions
INS source_string, port
INS (in string) performs block input from an I/O port to memory. The port address is placed in
the DX register. The memory address is placed in the DI register. This instruction uses the ES
segment register (which cannot be overridden). After the data transfer takes place, the pointer reg-
ister (DI) increments or decrements, depending on the value of the Direction Flag (DF). The
pointer register changes by one for byte transfers or by two for word transfers.
OUTS port, destination_string
OUTS (out string) performs block output from memory to an I/O port. The port address is placed
in the DX register. The memory address is placed in the SI register. This instruction uses the DS
segment register, but this may be changed with a segment override instruction. After the data
transfer takes place, the pointer register (SI) increments or decrements, depending on the value
of the Direction Flag (DF). The pointer register changes by one for byte transfers or by two for
word transfers.
A.1.3
High-Level Instructions
ENTER size, level
ENTER creates the stack frame required by most block-structured high-level languages. The first
parameter, size, specifies the number of bytes of dynamic storage to be allocated for the procedure
being entered (16-bit value). The second parameter, level, is the lexical nesting level of the pro-
cedure (8-bit value). Note that the higher the lexical nesting level, the lower the procedure is in
the nesting hierarchy.
The lexical nesting level determines the number of pointers to higher level stack frames copied
into the current stack frame. This list of pointers is called the display. The first word of the display
points to the previous stack frame. The display allows access to variables of higher level (lower
lexical nesting level) procedures.
After ENTER creates a display for the current procedure, it allocates dynamic storage space. The
Stack Pointer decrements by the number of bytes specified by size. All PUSH and POP operations
in the procedure use this value of the Stack Pointer as a base.
Two forms of ENTER exist: non-nested and nested. A lexical nesting level of 0 specifies the non-
nested form. In this situation, BP is pushed, then the Stack Pointer is copied to BP and decrement-
ed by the size of the frame. If the lexical nesting level is greater than 0, the nested form is used.
Figure A-1 gives the formal definition of ENTER.
Summary of Contents for 80C186XL
Page 1: ...80C186XL 80C188XL Microprocessor User s Manual...
Page 2: ...80C186XL 80C188XL Microprocessor User s Manual 1995...
Page 18: ...1 Introduction...
Page 19: ......
Page 27: ......
Page 28: ...2 Overview of the 80C186 Family Architecture...
Page 29: ......
Page 79: ......
Page 80: ...3 Bus Interface Unit...
Page 81: ......
Page 127: ......
Page 128: ...4 Peripheral Control Block...
Page 129: ......
Page 137: ......
Page 138: ...5 ClockGenerationand Power Management...
Page 139: ......
Page 154: ...6 Chip Select Unit...
Page 155: ......
Page 178: ...7 Refresh Control Unit...
Page 179: ......
Page 193: ......
Page 194: ...8 Interrupt Control Unit...
Page 195: ......
Page 227: ......
Page 228: ...9 Timer Counter Unit...
Page 229: ......
Page 253: ......
Page 254: ...10 Direct Memory Access Unit...
Page 255: ......
Page 283: ......
Page 284: ...11 Math Coprocessing...
Page 285: ......
Page 302: ...12 ONCE Mode...
Page 303: ......
Page 306: ...A 80C186 Instruction Set Additions and Extensions...
Page 307: ......
Page 318: ...B Input Synchronization...
Page 319: ......
Page 322: ...C Instruction Set Descriptions...
Page 323: ......
Page 371: ......
Page 372: ...D Instruction Set Opcodes and Clock Cycles...
Page 373: ......
Page 396: ...Index...
Page 397: ......