
Programming
2-8
2.5
SEGMENTS
The Am186ES and Am188ES use four segment registers:
1. Data Segment (DS): The processor assumes that all accesses to the program’s
variables are from the 64K space pointed to by the DS register. The data segment holds
data, operands, etc.
2. Code Segment (CS): This 64K space is the default location for all instructions. All code
must be executed from the code segment.
3. Stack Segment (SS): The processor uses the SS register to perform operations that
involve the stack, such as pushes and pops. The stack segment is used for temporary
space.
4. Extra Segment (ES): Usually this segment is used for large string operations and for
large data structures. Certain string instructions assume the extra segment as the
segment portion of the address. The extra segment is also used (by using segment
override) as a spare data segment.
When a segment is not defined for a data movement instruction, it’s assumed to be a data
segment. An instruction prefix can be used to override the segment register. For speed
and compact instruction encoding, the segment register used for physical address
generation is implied by the addressing mode used (see Table 2-2).
Table 2-2
Segment Register Selection Rules
2.6
DATA TYPES
The Am186ES and Am188ES microcontrollers directly support the following data types:
n
Integer—A signed binary numeric value contained in an 8-bit byte or a 16-bit word. All
operations assume a two’s complement representation.
n
Ordinal—An unsigned binary numeric value contained in an 8-bit byte or a 16-bit word.
n
Double Word—A signed binary numeric value contained in two sequential 16-bit
addresses, or in a DX::AX register pair.
n
Quad Word—A signed binary numeric value contained in four sequential 16-bit
addresses.
n
BCD—An unpacked byte representation of the decimal digits 0–9.
n
ASCII—A byte representation of alphanumeric and control characters using the ASCII
standard of character representation.
n
Packed BCD—A packed byte representation of two decimal digits (0–9). One digit is
stored in each nibble (4 bits) of the byte.
Memory Reference
Needed
Segment Register
Used
Implicit Segment Selection Rule
Local Data
Data (DS)
All data references
Instructions
Code (CS)
Instructions (including immediate data)
Stack
Stack (SS)
All stack pushes and pops
Any memory references that use the BP register
External Data (Global)
Extra (ES)
All string instruction references that use the DI
register as an index
Содержание Am186 ES
Страница 1: ...Am186 ES and Am188 ES User s Manual...
Страница 4: ...iv...
Страница 12: ...Table of Contents xii...
Страница 22: ...Features and Performance 1 8...
Страница 60: ...System Overview 3 28...
Страница 84: ...Chip Select Unit 5 14...
Страница 132: ...Timer Control Unit 8 8...
Страница 166: ...Programmable I O Pins 11 6...
Страница 184: ...Register Summary A 18...